/**
 * Kubernetes
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1.22.2
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */ import localVarRequest from 'request' ; import http from 'http' ; import { AuthenticationV1TokenRequest } from '../model/authenticationV1TokenRequest' ; import { CoreV1Event } from '../model/coreV1Event' ; import { CoreV1EventList } from '../model/coreV1EventList' ; import { V1APIResourceList } from '../model/v1APIResourceList' ; import { V1Binding } from '../model/v1Binding' ; import { V1ComponentStatus } from '../model/v1ComponentStatus' ; import { V1ComponentStatusList } from '../model/v1ComponentStatusList' ; import { V1ConfigMap } from '../model/v1ConfigMap' ; import { V1ConfigMapList } from '../model/v1ConfigMapList' ; import { V1DeleteOptions } from '../model/v1DeleteOptions' ; import { V1Endpoints } from '../model/v1Endpoints' ; import { V1EndpointsList } from '../model/v1EndpointsList' ; import { V1Eviction } from '../model/v1Eviction' ; import { V1LimitRange } from '../model/v1LimitRange' ; import { V1LimitRangeList } from '../model/v1LimitRangeList' ; import { V1Namespace } from '../model/v1Namespace' ; import { V1NamespaceList } from '../model/v1NamespaceList' ; import { V1Node } from '../model/v1Node' ; import { V1NodeList } from '../model/v1NodeList' ; import { V1PersistentVolume } from '../model/v1PersistentVolume' ; import { V1PersistentVolumeClaim } from '../model/v1PersistentVolumeClaim' ; import { V1PersistentVolumeClaimList } from '../model/v1PersistentVolumeClaimList' ; import { V1PersistentVolumeList } from '../model/v1PersistentVolumeList' ; import { V1Pod } from '../model/v1Pod' ; import { V1PodList } from '../model/v1PodList' ; import { V1PodTemplate } from '../model/v1PodTemplate' ; import { V1PodTemplateList } from '../model/v1PodTemplateList' ; import { V1ReplicationController } from '../model/v1ReplicationController' ; import { V1ReplicationControllerList } from '../model/v1ReplicationControllerList' ; import { V1ResourceQuota } from '../model/v1ResourceQuota' ; import { V1ResourceQuotaList } from '../model/v1ResourceQuotaList' ; import { V1Scale } from '../model/v1Scale' ; import { V1Secret } from '../model/v1Secret' ; import { V1SecretList } from '../model/v1SecretList' ; import { V1Service } from '../model/v1Service' ; import { V1ServiceAccount } from '../model/v1ServiceAccount' ; import { V1ServiceAccountList } from '../model/v1ServiceAccountList' ; import { V1ServiceList } from '../model/v1ServiceList' ; import { V1Status } from '../model/v1Status' ; import { ObjectSerializer , Authentication , VoidAuth , Interceptor } from '../model/models' ; import { HttpBasicAuth , HttpBearerAuth , ApiKeyAuth , OAuth } from '../model/models' ; import { HttpError , RequestFile } from './apis' ; let defaultBasePath = 'http://localhost' ; export enum CoreV1ApiApiKeys { BearerToken } export class CoreV1Api { protected _basePath = defaultBasePath ; protected _defaultHeaders : any = { } ; protected _useQuerystring : boolean = false ; protected authentications = { 'default' : < Authentication > new VoidAuth ( ) , 'BearerToken' : new ApiKeyAuth ( 'header' , 'authorization' ) , } ; protected interceptors : Interceptor [ ] = [ ] ; constructor ( basePath ? ) ; constructor ( basePathOrUsername , password ? , basePath ? ) { if ( password ) { if ( basePath ) { this . basePath = basePath ; } } else { if ( basePathOrUsername ) { this . basePath = basePathOrUsername ; } } } set useQuerystring ( value ) { this . _useQuerystring = value ; } set basePath ( basePath ) { this . _basePath = basePath ; } set defaultHeaders ( defaultHeaders ) { this . _defaultHeaders = defaultHeaders ; } get defaultHeaders ( ) { return this . _defaultHeaders ; } get basePath ( ) { return this . _basePath ; } public setDefaultAuthentication ( auth ) { this . authentications . default = auth ; } public setApiKey ( key , value ) { ( this . authentications as any ) [ CoreV1ApiApiKeys [ key ] ] . apiKey = value ; } public addInterceptor ( interceptor ) { this . interceptors . push ( interceptor ) ; } param name param namespace param path public async connectDeleteNamespacedPodProxy ( name , namespace , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectDeleteNamespacedPodProxy.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectDeleteNamespacedPodProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path param path2 public async connectDeleteNamespacedPodProxyWithPath ( name , namespace , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path public async connectDeleteNamespacedServiceProxy ( name , namespace , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectDeleteNamespacedServiceProxy.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectDeleteNamespacedServiceProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path param path2 public async connectDeleteNamespacedServiceProxyWithPath ( name , namespace , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param path public async connectDeleteNodeProxy ( name , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectDeleteNodeProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param path param path2 public async connectDeleteNodeProxyWithPath ( name , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectDeleteNodeProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectDeleteNodeProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param container param stderr param stdin param stdout param tty public async connectGetNamespacedPodAttach ( name , namespace , container ? , stderr ? , stdin ? , stdout ? , tty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/attach' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectGetNamespacedPodAttach.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectGetNamespacedPodAttach.' ) ; } if ( container !== undefined ) { localVarQueryParameters [ 'container' ] = ObjectSerializer . serialize ( container , "string" ) ; } if ( stderr !== undefined ) { localVarQueryParameters [ 'stderr' ] = ObjectSerializer . serialize ( stderr , "boolean" ) ; } if ( stdin !== undefined ) { localVarQueryParameters [ 'stdin' ] = ObjectSerializer . serialize ( stdin , "boolean" ) ; } if ( stdout !== undefined ) { localVarQueryParameters [ 'stdout' ] = ObjectSerializer . serialize ( stdout , "boolean" ) ; } if ( tty !== undefined ) { localVarQueryParameters [ 'tty' ] = ObjectSerializer . serialize ( tty , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param command param container param stderr param stdin param stdout param tty public async connectGetNamespacedPodExec ( name , namespace , command ? , container ? , stderr ? , stdin ? , stdout ? , tty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/exec' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectGetNamespacedPodExec.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectGetNamespacedPodExec.' ) ; } if ( command !== undefined ) { localVarQueryParameters [ 'command' ] = ObjectSerializer . serialize ( command , "string" ) ; } if ( container !== undefined ) { localVarQueryParameters [ 'container' ] = ObjectSerializer . serialize ( container , "string" ) ; } if ( stderr !== undefined ) { localVarQueryParameters [ 'stderr' ] = ObjectSerializer . serialize ( stderr , "boolean" ) ; } if ( stdin !== undefined ) { localVarQueryParameters [ 'stdin' ] = ObjectSerializer . serialize ( stdin , "boolean" ) ; } if ( stdout !== undefined ) { localVarQueryParameters [ 'stdout' ] = ObjectSerializer . serialize ( stdout , "boolean" ) ; } if ( tty !== undefined ) { localVarQueryParameters [ 'tty' ] = ObjectSerializer . serialize ( tty , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param ports public async connectGetNamespacedPodPortforward ( name , namespace , ports ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/portforward' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectGetNamespacedPodPortforward.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectGetNamespacedPodPortforward.' ) ; } if ( ports !== undefined ) { localVarQueryParameters [ 'ports' ] = ObjectSerializer . serialize ( ports , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path public async connectGetNamespacedPodProxy ( name , namespace , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectGetNamespacedPodProxy.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectGetNamespacedPodProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path param path2 public async connectGetNamespacedPodProxyWithPath ( name , namespace , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectGetNamespacedPodProxyWithPath.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectGetNamespacedPodProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectGetNamespacedPodProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path public async connectGetNamespacedServiceProxy ( name , namespace , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectGetNamespacedServiceProxy.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectGetNamespacedServiceProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path param path2 public async connectGetNamespacedServiceProxyWithPath ( name , namespace , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectGetNamespacedServiceProxyWithPath.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectGetNamespacedServiceProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectGetNamespacedServiceProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param path public async connectGetNodeProxy ( name , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectGetNodeProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param path param path2 public async connectGetNodeProxyWithPath ( name , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectGetNodeProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectGetNodeProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path public async connectHeadNamespacedPodProxy ( name , namespace , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectHeadNamespacedPodProxy.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectHeadNamespacedPodProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'HEAD' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path param path2 public async connectHeadNamespacedPodProxyWithPath ( name , namespace , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectHeadNamespacedPodProxyWithPath.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectHeadNamespacedPodProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectHeadNamespacedPodProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'HEAD' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path public async connectHeadNamespacedServiceProxy ( name , namespace , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectHeadNamespacedServiceProxy.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectHeadNamespacedServiceProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'HEAD' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path param path2 public async connectHeadNamespacedServiceProxyWithPath ( name , namespace , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'HEAD' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param path public async connectHeadNodeProxy ( name , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectHeadNodeProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'HEAD' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param path param path2 public async connectHeadNodeProxyWithPath ( name , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectHeadNodeProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectHeadNodeProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'HEAD' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path public async connectOptionsNamespacedPodProxy ( name , namespace , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectOptionsNamespacedPodProxy.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectOptionsNamespacedPodProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'OPTIONS' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path param path2 public async connectOptionsNamespacedPodProxyWithPath ( name , namespace , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'OPTIONS' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path public async connectOptionsNamespacedServiceProxy ( name , namespace , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectOptionsNamespacedServiceProxy.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectOptionsNamespacedServiceProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'OPTIONS' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path param path2 public async connectOptionsNamespacedServiceProxyWithPath ( name , namespace , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'OPTIONS' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param path public async connectOptionsNodeProxy ( name , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectOptionsNodeProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'OPTIONS' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param path param path2 public async connectOptionsNodeProxyWithPath ( name , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectOptionsNodeProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectOptionsNodeProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'OPTIONS' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path public async connectPatchNamespacedPodProxy ( name , namespace , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPatchNamespacedPodProxy.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectPatchNamespacedPodProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path param path2 public async connectPatchNamespacedPodProxyWithPath ( name , namespace , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPatchNamespacedPodProxyWithPath.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectPatchNamespacedPodProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectPatchNamespacedPodProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path public async connectPatchNamespacedServiceProxy ( name , namespace , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPatchNamespacedServiceProxy.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectPatchNamespacedServiceProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path param path2 public async connectPatchNamespacedServiceProxyWithPath ( name , namespace , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param path public async connectPatchNodeProxy ( name , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPatchNodeProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param path param path2 public async connectPatchNodeProxyWithPath ( name , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPatchNodeProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectPatchNodeProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param container param stderr param stdin param stdout param tty public async connectPostNamespacedPodAttach ( name , namespace , container ? , stderr ? , stdin ? , stdout ? , tty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/attach' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPostNamespacedPodAttach.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectPostNamespacedPodAttach.' ) ; } if ( container !== undefined ) { localVarQueryParameters [ 'container' ] = ObjectSerializer . serialize ( container , "string" ) ; } if ( stderr !== undefined ) { localVarQueryParameters [ 'stderr' ] = ObjectSerializer . serialize ( stderr , "boolean" ) ; } if ( stdin !== undefined ) { localVarQueryParameters [ 'stdin' ] = ObjectSerializer . serialize ( stdin , "boolean" ) ; } if ( stdout !== undefined ) { localVarQueryParameters [ 'stdout' ] = ObjectSerializer . serialize ( stdout , "boolean" ) ; } if ( tty !== undefined ) { localVarQueryParameters [ 'tty' ] = ObjectSerializer . serialize ( tty , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param command param container param stderr param stdin param stdout param tty public async connectPostNamespacedPodExec ( name , namespace , command ? , container ? , stderr ? , stdin ? , stdout ? , tty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/exec' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPostNamespacedPodExec.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectPostNamespacedPodExec.' ) ; } if ( command !== undefined ) { localVarQueryParameters [ 'command' ] = ObjectSerializer . serialize ( command , "string" ) ; } if ( container !== undefined ) { localVarQueryParameters [ 'container' ] = ObjectSerializer . serialize ( container , "string" ) ; } if ( stderr !== undefined ) { localVarQueryParameters [ 'stderr' ] = ObjectSerializer . serialize ( stderr , "boolean" ) ; } if ( stdin !== undefined ) { localVarQueryParameters [ 'stdin' ] = ObjectSerializer . serialize ( stdin , "boolean" ) ; } if ( stdout !== undefined ) { localVarQueryParameters [ 'stdout' ] = ObjectSerializer . serialize ( stdout , "boolean" ) ; } if ( tty !== undefined ) { localVarQueryParameters [ 'tty' ] = ObjectSerializer . serialize ( tty , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param ports public async connectPostNamespacedPodPortforward ( name , namespace , ports ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/portforward' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPostNamespacedPodPortforward.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectPostNamespacedPodPortforward.' ) ; } if ( ports !== undefined ) { localVarQueryParameters [ 'ports' ] = ObjectSerializer . serialize ( ports , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path public async connectPostNamespacedPodProxy ( name , namespace , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPostNamespacedPodProxy.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectPostNamespacedPodProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path param path2 public async connectPostNamespacedPodProxyWithPath ( name , namespace , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPostNamespacedPodProxyWithPath.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectPostNamespacedPodProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectPostNamespacedPodProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path public async connectPostNamespacedServiceProxy ( name , namespace , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPostNamespacedServiceProxy.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectPostNamespacedServiceProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path param path2 public async connectPostNamespacedServiceProxyWithPath ( name , namespace , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPostNamespacedServiceProxyWithPath.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectPostNamespacedServiceProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectPostNamespacedServiceProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param path public async connectPostNodeProxy ( name , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPostNodeProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param path param path2 public async connectPostNodeProxyWithPath ( name , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPostNodeProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectPostNodeProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path public async connectPutNamespacedPodProxy ( name , namespace , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPutNamespacedPodProxy.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectPutNamespacedPodProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path param path2 public async connectPutNamespacedPodProxyWithPath ( name , namespace , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPutNamespacedPodProxyWithPath.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectPutNamespacedPodProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectPutNamespacedPodProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path public async connectPutNamespacedServiceProxy ( name , namespace , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPutNamespacedServiceProxy.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectPutNamespacedServiceProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param path param path2 public async connectPutNamespacedServiceProxyWithPath ( name , namespace , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPutNamespacedServiceProxyWithPath.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling connectPutNamespacedServiceProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectPutNamespacedServiceProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param path public async connectPutNodeProxy ( name , path ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}/proxy' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPutNodeProxy.' ) ; } if ( path !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param path param path2 public async connectPutNodeProxyWithPath ( name , path , path2 ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}/proxy/{path}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'path' + '}' , encodeURIComponent ( String ( path ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ '*/*' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling connectPutNodeProxyWithPath.' ) ; } if ( path === null || path === undefined ) { throw new Error ( 'Required parameter path was null or undefined when calling connectPutNodeProxyWithPath.' ) ; } if ( path2 !== undefined ) { localVarQueryParameters [ 'path' ] = ObjectSerializer . serialize ( path2 , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param body param pretty param dryRun param fieldManager public async createNamespace ( body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespace.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Namespace" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Namespace ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Namespace" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param body param dryRun param fieldManager param pretty public async createNamespacedBinding ( namespace , body , dryRun ? , fieldManager ? , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/bindings' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedBinding.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedBinding.' ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Binding" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Binding ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Binding" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param body param pretty param dryRun param fieldManager public async createNamespacedConfigMap ( namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/configmaps' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedConfigMap.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedConfigMap.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1ConfigMap" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ConfigMap ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ConfigMap" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param body param pretty param dryRun param fieldManager public async createNamespacedEndpoints ( namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/endpoints' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedEndpoints.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedEndpoints.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Endpoints" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Endpoints ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Endpoints" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param body param pretty param dryRun param fieldManager public async createNamespacedEvent ( namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/events' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedEvent.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedEvent.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "CoreV1Event" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : CoreV1Event ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "CoreV1Event" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param body param pretty param dryRun param fieldManager public async createNamespacedLimitRange ( namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/limitranges' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedLimitRange.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedLimitRange.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1LimitRange" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1LimitRange ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1LimitRange" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param body param pretty param dryRun param fieldManager public async createNamespacedPersistentVolumeClaim ( namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedPersistentVolumeClaim.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedPersistentVolumeClaim.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1PersistentVolumeClaim" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolumeClaim ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolumeClaim" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param body param pretty param dryRun param fieldManager public async createNamespacedPod ( namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedPod.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedPod.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Pod" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Pod ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Pod" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param dryRun param fieldManager param pretty public async createNamespacedPodBinding ( name , namespace , body , dryRun ? , fieldManager ? , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/binding' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling createNamespacedPodBinding.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedPodBinding.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedPodBinding.' ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Binding" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Binding ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Binding" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param dryRun param fieldManager param pretty public async createNamespacedPodEviction ( name , namespace , body , dryRun ? , fieldManager ? , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/eviction' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling createNamespacedPodEviction.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedPodEviction.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedPodEviction.' ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Eviction" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Eviction ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Eviction" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param body param pretty param dryRun param fieldManager public async createNamespacedPodTemplate ( namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/podtemplates' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedPodTemplate.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedPodTemplate.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1PodTemplate" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PodTemplate ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PodTemplate" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param body param pretty param dryRun param fieldManager public async createNamespacedReplicationController ( namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedReplicationController.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedReplicationController.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1ReplicationController" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ReplicationController ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ReplicationController" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param body param pretty param dryRun param fieldManager public async createNamespacedResourceQuota ( namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/resourcequotas' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedResourceQuota.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedResourceQuota.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1ResourceQuota" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ResourceQuota ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ResourceQuota" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param body param pretty param dryRun param fieldManager public async createNamespacedSecret ( namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/secrets' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedSecret.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedSecret.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Secret" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Secret ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Secret" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param body param pretty param dryRun param fieldManager public async createNamespacedService ( namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedService.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedService.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Service" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Service ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Service" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param body param pretty param dryRun param fieldManager public async createNamespacedServiceAccount ( namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/serviceaccounts' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedServiceAccount.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedServiceAccount.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1ServiceAccount" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ServiceAccount ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ServiceAccount" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param dryRun param fieldManager param pretty public async createNamespacedServiceAccountToken ( name , namespace , body , dryRun ? , fieldManager ? , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}/token' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling createNamespacedServiceAccountToken.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedServiceAccountToken.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedServiceAccountToken.' ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "AuthenticationV1TokenRequest" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : AuthenticationV1TokenRequest ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "AuthenticationV1TokenRequest" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param body param pretty param dryRun param fieldManager public async createNode ( body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNode.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Node" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Node ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Node" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param body param pretty param dryRun param fieldManager public async createPersistentVolume ( body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/persistentvolumes' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createPersistentVolume.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1PersistentVolume" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolume ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolume" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param _continue param dryRun param fieldSelector param gracePeriodSeconds param labelSelector param limit param orphanDependents param propagationPolicy param resourceVersion param resourceVersionMatch param timeoutSeconds param body public async deleteCollectionNamespacedConfigMap ( namespace , pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/configmaps' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteCollectionNamespacedConfigMap.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param _continue param dryRun param fieldSelector param gracePeriodSeconds param labelSelector param limit param orphanDependents param propagationPolicy param resourceVersion param resourceVersionMatch param timeoutSeconds param body public async deleteCollectionNamespacedEndpoints ( namespace , pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/endpoints' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEndpoints.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param _continue param dryRun param fieldSelector param gracePeriodSeconds param labelSelector param limit param orphanDependents param propagationPolicy param resourceVersion param resourceVersionMatch param timeoutSeconds param body public async deleteCollectionNamespacedEvent ( namespace , pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/events' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEvent.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param _continue param dryRun param fieldSelector param gracePeriodSeconds param labelSelector param limit param orphanDependents param propagationPolicy param resourceVersion param resourceVersionMatch param timeoutSeconds param body public async deleteCollectionNamespacedLimitRange ( namespace , pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/limitranges' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteCollectionNamespacedLimitRange.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param _continue param dryRun param fieldSelector param gracePeriodSeconds param labelSelector param limit param orphanDependents param propagationPolicy param resourceVersion param resourceVersionMatch param timeoutSeconds param body public async deleteCollectionNamespacedPersistentVolumeClaim ( namespace , pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPersistentVolumeClaim.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param _continue param dryRun param fieldSelector param gracePeriodSeconds param labelSelector param limit param orphanDependents param propagationPolicy param resourceVersion param resourceVersionMatch param timeoutSeconds param body public async deleteCollectionNamespacedPod ( namespace , pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPod.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param _continue param dryRun param fieldSelector param gracePeriodSeconds param labelSelector param limit param orphanDependents param propagationPolicy param resourceVersion param resourceVersionMatch param timeoutSeconds param body public async deleteCollectionNamespacedPodTemplate ( namespace , pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/podtemplates' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodTemplate.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param _continue param dryRun param fieldSelector param gracePeriodSeconds param labelSelector param limit param orphanDependents param propagationPolicy param resourceVersion param resourceVersionMatch param timeoutSeconds param body public async deleteCollectionNamespacedReplicationController ( namespace , pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteCollectionNamespacedReplicationController.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param _continue param dryRun param fieldSelector param gracePeriodSeconds param labelSelector param limit param orphanDependents param propagationPolicy param resourceVersion param resourceVersionMatch param timeoutSeconds param body public async deleteCollectionNamespacedResourceQuota ( namespace , pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/resourcequotas' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteCollectionNamespacedResourceQuota.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param _continue param dryRun param fieldSelector param gracePeriodSeconds param labelSelector param limit param orphanDependents param propagationPolicy param resourceVersion param resourceVersionMatch param timeoutSeconds param body public async deleteCollectionNamespacedSecret ( namespace , pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/secrets' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteCollectionNamespacedSecret.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param _continue param dryRun param fieldSelector param gracePeriodSeconds param labelSelector param limit param orphanDependents param propagationPolicy param resourceVersion param resourceVersionMatch param timeoutSeconds param body public async deleteCollectionNamespacedServiceAccount ( namespace , pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/serviceaccounts' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteCollectionNamespacedServiceAccount.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param pretty param _continue param dryRun param fieldSelector param gracePeriodSeconds param labelSelector param limit param orphanDependents param propagationPolicy param resourceVersion param resourceVersionMatch param timeoutSeconds param body public async deleteCollectionNode ( pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param pretty param _continue param dryRun param fieldSelector param gracePeriodSeconds param labelSelector param limit param orphanDependents param propagationPolicy param resourceVersion param resourceVersionMatch param timeoutSeconds param body public async deleteCollectionPersistentVolume ( pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/persistentvolumes' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNamespace ( name , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNamespace.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNamespacedConfigMap ( name , namespace , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNamespacedConfigMap.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteNamespacedConfigMap.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNamespacedEndpoints ( name , namespace , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNamespacedEndpoints.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteNamespacedEndpoints.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNamespacedEvent ( name , namespace , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/events/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNamespacedEvent.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteNamespacedEvent.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNamespacedLimitRange ( name , namespace , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNamespacedLimitRange.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteNamespacedLimitRange.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNamespacedPersistentVolumeClaim ( name , namespace , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNamespacedPersistentVolumeClaim.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteNamespacedPersistentVolumeClaim.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolumeClaim ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolumeClaim" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNamespacedPod ( name , namespace , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNamespacedPod.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteNamespacedPod.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Pod ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Pod" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNamespacedPodTemplate ( name , namespace , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNamespacedPodTemplate.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteNamespacedPodTemplate.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PodTemplate ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PodTemplate" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNamespacedReplicationController ( name , namespace , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNamespacedReplicationController.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteNamespacedReplicationController.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNamespacedResourceQuota ( name , namespace , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNamespacedResourceQuota.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteNamespacedResourceQuota.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ResourceQuota ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ResourceQuota" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNamespacedSecret ( name , namespace , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/secrets/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNamespacedSecret.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteNamespacedSecret.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNamespacedService ( name , namespace , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNamespacedService.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteNamespacedService.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNamespacedServiceAccount ( name , namespace , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNamespacedServiceAccount.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteNamespacedServiceAccount.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ServiceAccount ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ServiceAccount" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNode ( name , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNode.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deletePersistentVolume ( name , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/persistentvolumes/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deletePersistentVolume.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolume ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolume" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } /**
     * get available resources
     */ public async getAPIResources ( options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1APIResourceList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1APIResourceList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param pretty param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listComponentStatus ( allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , pretty ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/componentstatuses' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ComponentStatusList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ComponentStatusList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param pretty param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listConfigMapForAllNamespaces ( allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , pretty ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/configmaps' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ConfigMapList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ConfigMapList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param pretty param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listEndpointsForAllNamespaces ( allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , pretty ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/endpoints' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1EndpointsList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1EndpointsList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param pretty param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listEventForAllNamespaces ( allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , pretty ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/events' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : CoreV1EventList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "CoreV1EventList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param pretty param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listLimitRangeForAllNamespaces ( allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , pretty ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/limitranges' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1LimitRangeList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1LimitRangeList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNamespace ( pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1NamespaceList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1NamespaceList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNamespacedConfigMap ( namespace , pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/configmaps' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling listNamespacedConfigMap.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ConfigMapList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ConfigMapList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNamespacedEndpoints ( namespace , pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/endpoints' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling listNamespacedEndpoints.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1EndpointsList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1EndpointsList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNamespacedEvent ( namespace , pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/events' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling listNamespacedEvent.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : CoreV1EventList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "CoreV1EventList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNamespacedLimitRange ( namespace , pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/limitranges' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling listNamespacedLimitRange.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1LimitRangeList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1LimitRangeList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNamespacedPersistentVolumeClaim ( namespace , pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling listNamespacedPersistentVolumeClaim.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolumeClaimList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolumeClaimList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNamespacedPod ( namespace , pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling listNamespacedPod.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PodList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PodList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNamespacedPodTemplate ( namespace , pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/podtemplates' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling listNamespacedPodTemplate.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PodTemplateList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PodTemplateList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNamespacedReplicationController ( namespace , pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling listNamespacedReplicationController.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ReplicationControllerList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ReplicationControllerList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNamespacedResourceQuota ( namespace , pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/resourcequotas' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling listNamespacedResourceQuota.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ResourceQuotaList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ResourceQuotaList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNamespacedSecret ( namespace , pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/secrets' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling listNamespacedSecret.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1SecretList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1SecretList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNamespacedService ( namespace , pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling listNamespacedService.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ServiceList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ServiceList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNamespacedServiceAccount ( namespace , pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/serviceaccounts' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling listNamespacedServiceAccount.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ServiceAccountList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ServiceAccountList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNode ( pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1NodeList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1NodeList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listPersistentVolume ( pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/persistentvolumes' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolumeList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolumeList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param pretty param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listPersistentVolumeClaimForAllNamespaces ( allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , pretty ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/persistentvolumeclaims' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolumeClaimList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolumeClaimList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param pretty param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listPodForAllNamespaces ( allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , pretty ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/pods' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PodList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PodList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param pretty param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listPodTemplateForAllNamespaces ( allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , pretty ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/podtemplates' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PodTemplateList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PodTemplateList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param pretty param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listReplicationControllerForAllNamespaces ( allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , pretty ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/replicationcontrollers' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ReplicationControllerList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ReplicationControllerList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param pretty param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listResourceQuotaForAllNamespaces ( allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , pretty ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/resourcequotas' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ResourceQuotaList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ResourceQuotaList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param pretty param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listSecretForAllNamespaces ( allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , pretty ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/secrets' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1SecretList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1SecretList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param pretty param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listServiceAccountForAllNamespaces ( allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , pretty ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/serviceaccounts' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ServiceAccountList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ServiceAccountList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param pretty param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listServiceForAllNamespaces ( allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , pretty ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/services' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ServiceList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ServiceList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param body param pretty param dryRun param fieldManager param force public async patchNamespace ( name , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespace.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespace.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Namespace ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Namespace" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param body param pretty param dryRun param fieldManager param force public async patchNamespaceStatus ( name , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespaceStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespaceStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Namespace ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Namespace" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedConfigMap ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedConfigMap.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedConfigMap.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedConfigMap.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ConfigMap ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ConfigMap" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedEndpoints ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedEndpoints.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedEndpoints.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedEndpoints.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Endpoints ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Endpoints" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedEvent ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/events/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedEvent.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedEvent.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedEvent.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : CoreV1Event ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "CoreV1Event" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedLimitRange ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedLimitRange.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedLimitRange.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedLimitRange.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1LimitRange ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1LimitRange" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedPersistentVolumeClaim ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedPersistentVolumeClaim.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedPersistentVolumeClaim.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedPersistentVolumeClaim.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolumeClaim ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolumeClaim" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedPersistentVolumeClaimStatus ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolumeClaim ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolumeClaim" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedPod ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedPod.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedPod.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedPod.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Pod ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Pod" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedPodEphemeralcontainers ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedPodEphemeralcontainers.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedPodEphemeralcontainers.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedPodEphemeralcontainers.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Pod ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Pod" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedPodStatus ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedPodStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedPodStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedPodStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Pod ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Pod" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedPodTemplate ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedPodTemplate.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedPodTemplate.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedPodTemplate.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PodTemplate ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PodTemplate" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedReplicationController ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedReplicationController.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedReplicationController.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedReplicationController.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ReplicationController ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ReplicationController" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedReplicationControllerScale ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedReplicationControllerScale.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedReplicationControllerScale.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedReplicationControllerScale.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Scale ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Scale" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedReplicationControllerStatus ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedReplicationControllerStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedReplicationControllerStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedReplicationControllerStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ReplicationController ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ReplicationController" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedResourceQuota ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedResourceQuota.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedResourceQuota.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedResourceQuota.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ResourceQuota ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ResourceQuota" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedResourceQuotaStatus ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedResourceQuotaStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedResourceQuotaStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedResourceQuotaStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ResourceQuota ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ResourceQuota" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedSecret ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/secrets/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedSecret.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedSecret.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedSecret.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Secret ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Secret" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedService ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedService.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedService.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedService.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Service ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Service" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedServiceAccount ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedServiceAccount.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedServiceAccount.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedServiceAccount.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ServiceAccount ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ServiceAccount" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedServiceStatus ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedServiceStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedServiceStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedServiceStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Service ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Service" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param body param pretty param dryRun param fieldManager param force public async patchNode ( name , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNode.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNode.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Node ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Node" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param body param pretty param dryRun param fieldManager param force public async patchNodeStatus ( name , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNodeStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNodeStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Node ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Node" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param body param pretty param dryRun param fieldManager param force public async patchPersistentVolume ( name , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/persistentvolumes/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchPersistentVolume.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchPersistentVolume.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolume ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolume" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param body param pretty param dryRun param fieldManager param force public async patchPersistentVolumeStatus ( name , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/persistentvolumes/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchPersistentVolumeStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchPersistentVolumeStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolume ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolume" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param pretty public async readComponentStatus ( name , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/componentstatuses/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readComponentStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ComponentStatus ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ComponentStatus" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param pretty public async readNamespace ( name , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespace.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Namespace ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Namespace" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param pretty public async readNamespaceStatus ( name , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespaceStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Namespace ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Namespace" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedConfigMap ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedConfigMap.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedConfigMap.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ConfigMap ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ConfigMap" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedEndpoints ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedEndpoints.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedEndpoints.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Endpoints ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Endpoints" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedEvent ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/events/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedEvent.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedEvent.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : CoreV1Event ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "CoreV1Event" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedLimitRange ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedLimitRange.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedLimitRange.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1LimitRange ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1LimitRange" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedPersistentVolumeClaim ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedPersistentVolumeClaim.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedPersistentVolumeClaim.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolumeClaim ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolumeClaim" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedPersistentVolumeClaimStatus ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedPersistentVolumeClaimStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedPersistentVolumeClaimStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolumeClaim ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolumeClaim" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedPod ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedPod.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedPod.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Pod ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Pod" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedPodEphemeralcontainers ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedPodEphemeralcontainers.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedPodEphemeralcontainers.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Pod ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Pod" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param container param follow param insecureSkipTLSVerifyBackend param limitBytes param pretty param previous param sinceSeconds param tailLines param timestamps public async readNamespacedPodLog ( name , namespace , container ? , follow ? , insecureSkipTLSVerifyBackend ? , limitBytes ? , pretty ? , previous ? , sinceSeconds ? , tailLines ? , timestamps ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/log' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'text/plain' , 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedPodLog.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedPodLog.' ) ; } if ( container !== undefined ) { localVarQueryParameters [ 'container' ] = ObjectSerializer . serialize ( container , "string" ) ; } if ( follow !== undefined ) { localVarQueryParameters [ 'follow' ] = ObjectSerializer . serialize ( follow , "boolean" ) ; } if ( insecureSkipTLSVerifyBackend !== undefined ) { localVarQueryParameters [ 'insecureSkipTLSVerifyBackend' ] = ObjectSerializer . serialize ( insecureSkipTLSVerifyBackend , "boolean" ) ; } if ( limitBytes !== undefined ) { localVarQueryParameters [ 'limitBytes' ] = ObjectSerializer . serialize ( limitBytes , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( previous !== undefined ) { localVarQueryParameters [ 'previous' ] = ObjectSerializer . serialize ( previous , "boolean" ) ; } if ( sinceSeconds !== undefined ) { localVarQueryParameters [ 'sinceSeconds' ] = ObjectSerializer . serialize ( sinceSeconds , "number" ) ; } if ( tailLines !== undefined ) { localVarQueryParameters [ 'tailLines' ] = ObjectSerializer . serialize ( tailLines , "number" ) ; } if ( timestamps !== undefined ) { localVarQueryParameters [ 'timestamps' ] = ObjectSerializer . serialize ( timestamps , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : string ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "string" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedPodStatus ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedPodStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedPodStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Pod ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Pod" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedPodTemplate ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedPodTemplate.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedPodTemplate.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PodTemplate ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PodTemplate" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedReplicationController ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedReplicationController.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedReplicationController.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ReplicationController ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ReplicationController" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedReplicationControllerScale ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedReplicationControllerScale.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedReplicationControllerScale.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Scale ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Scale" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedReplicationControllerStatus ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedReplicationControllerStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedReplicationControllerStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ReplicationController ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ReplicationController" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedResourceQuota ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedResourceQuota.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedResourceQuota.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ResourceQuota ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ResourceQuota" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedResourceQuotaStatus ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedResourceQuotaStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedResourceQuotaStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ResourceQuota ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ResourceQuota" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedSecret ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/secrets/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedSecret.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedSecret.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Secret ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Secret" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedService ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedService.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedService.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Service ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Service" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedServiceAccount ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedServiceAccount.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedServiceAccount.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ServiceAccount ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ServiceAccount" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedServiceStatus ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedServiceStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedServiceStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Service ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Service" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param pretty public async readNode ( name , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNode.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Node ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Node" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param pretty public async readNodeStatus ( name , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNodeStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Node ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Node" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param pretty public async readPersistentVolume ( name , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/persistentvolumes/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readPersistentVolume.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolume ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolume" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param pretty public async readPersistentVolumeStatus ( name , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/persistentvolumes/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readPersistentVolumeStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolume ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolume" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param body param pretty param dryRun param fieldManager public async replaceNamespace ( name , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespace.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespace.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Namespace" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Namespace ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Namespace" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param body param dryRun param fieldManager param pretty public async replaceNamespaceFinalize ( name , body , dryRun ? , fieldManager ? , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{name}/finalize' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespaceFinalize.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespaceFinalize.' ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Namespace" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Namespace ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Namespace" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param body param pretty param dryRun param fieldManager public async replaceNamespaceStatus ( name , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespaceStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespaceStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Namespace" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Namespace ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Namespace" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedConfigMap ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedConfigMap.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedConfigMap.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedConfigMap.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1ConfigMap" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ConfigMap ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ConfigMap" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedEndpoints ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedEndpoints.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedEndpoints.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedEndpoints.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Endpoints" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Endpoints ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Endpoints" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedEvent ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/events/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedEvent.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedEvent.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedEvent.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "CoreV1Event" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : CoreV1Event ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "CoreV1Event" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedLimitRange ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedLimitRange.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedLimitRange.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedLimitRange.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1LimitRange" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1LimitRange ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1LimitRange" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedPersistentVolumeClaim ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedPersistentVolumeClaim.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedPersistentVolumeClaim.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedPersistentVolumeClaim.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1PersistentVolumeClaim" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolumeClaim ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolumeClaim" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedPersistentVolumeClaimStatus ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1PersistentVolumeClaim" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolumeClaim ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolumeClaim" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedPod ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedPod.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedPod.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedPod.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Pod" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Pod ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Pod" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedPodEphemeralcontainers ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedPodEphemeralcontainers.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedPodEphemeralcontainers.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedPodEphemeralcontainers.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Pod" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Pod ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Pod" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedPodStatus ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedPodStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedPodStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedPodStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Pod" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Pod ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Pod" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedPodTemplate ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedPodTemplate.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedPodTemplate.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedPodTemplate.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1PodTemplate" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PodTemplate ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PodTemplate" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedReplicationController ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedReplicationController.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedReplicationController.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedReplicationController.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1ReplicationController" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ReplicationController ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ReplicationController" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedReplicationControllerScale ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedReplicationControllerScale.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedReplicationControllerScale.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedReplicationControllerScale.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Scale" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Scale ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Scale" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedReplicationControllerStatus ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedReplicationControllerStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedReplicationControllerStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedReplicationControllerStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1ReplicationController" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ReplicationController ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ReplicationController" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedResourceQuota ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedResourceQuota.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedResourceQuota.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedResourceQuota.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1ResourceQuota" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ResourceQuota ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ResourceQuota" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedResourceQuotaStatus ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedResourceQuotaStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedResourceQuotaStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedResourceQuotaStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1ResourceQuota" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ResourceQuota ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ResourceQuota" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedSecret ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/secrets/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedSecret.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedSecret.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedSecret.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Secret" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Secret ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Secret" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedService ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedService.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedService.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedService.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Service" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Service ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Service" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedServiceAccount ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedServiceAccount.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedServiceAccount.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedServiceAccount.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1ServiceAccount" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ServiceAccount ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1ServiceAccount" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedServiceStatus ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/namespaces/{namespace}/services/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedServiceStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedServiceStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedServiceStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Service" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Service ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Service" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param body param pretty param dryRun param fieldManager public async replaceNode ( name , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNode.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNode.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Node" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Node ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Node" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param body param pretty param dryRun param fieldManager public async replaceNodeStatus ( name , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/nodes/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNodeStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNodeStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Node" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Node ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Node" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param body param pretty param dryRun param fieldManager public async replacePersistentVolume ( name , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/persistentvolumes/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replacePersistentVolume.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replacePersistentVolume.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1PersistentVolume" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolume ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolume" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param body param pretty param dryRun param fieldManager public async replacePersistentVolumeStatus ( name , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/api/v1/persistentvolumes/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replacePersistentVolumeStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replacePersistentVolumeStatus.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1PersistentVolume" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1PersistentVolume ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1PersistentVolume" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } }