/**
 * 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 { V1APIResourceList } from '../model/v1APIResourceList' ; import { V1CSIDriver } from '../model/v1CSIDriver' ; import { V1CSIDriverList } from '../model/v1CSIDriverList' ; import { V1CSINode } from '../model/v1CSINode' ; import { V1CSINodeList } from '../model/v1CSINodeList' ; import { V1DeleteOptions } from '../model/v1DeleteOptions' ; import { V1Status } from '../model/v1Status' ; import { V1StorageClass } from '../model/v1StorageClass' ; import { V1StorageClassList } from '../model/v1StorageClassList' ; import { V1VolumeAttachment } from '../model/v1VolumeAttachment' ; import { V1VolumeAttachmentList } from '../model/v1VolumeAttachmentList' ; 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 StorageV1ApiApiKeys { BearerToken } export class StorageV1Api { 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 ) [ StorageV1ApiApiKeys [ key ] ] . apiKey = value ; } public addInterceptor ( interceptor ) { this . interceptors . push ( interceptor ) ; } param body param pretty param dryRun param fieldManager public async createCSIDriver ( body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/csidrivers' ; 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 createCSIDriver.' ) ; } 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 , "V1CSIDriver" ) } ; 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 : V1CSIDriver ; } > ( ( 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 , "V1CSIDriver" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param body param pretty param dryRun param fieldManager public async createCSINode ( body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/csinodes' ; 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 createCSINode.' ) ; } 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 , "V1CSINode" ) } ; 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 : V1CSINode ; } > ( ( 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 , "V1CSINode" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param body param pretty param dryRun param fieldManager public async createStorageClass ( body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/storageclasses' ; 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 createStorageClass.' ) ; } 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 , "V1StorageClass" ) } ; 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 : V1StorageClass ; } > ( ( 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 , "V1StorageClass" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param body param pretty param dryRun param fieldManager public async createVolumeAttachment ( body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/volumeattachments' ; 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 createVolumeAttachment.' ) ; } 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 , "V1VolumeAttachment" ) } ; 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 : V1VolumeAttachment ; } > ( ( 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 , "V1VolumeAttachment" ) ; 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 deleteCSIDriver ( name , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/csidrivers/{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 deleteCSIDriver.' ) ; } 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 : V1CSIDriver ; } > ( ( 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 , "V1CSIDriver" ) ; 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 deleteCSINode ( name , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/csinodes/{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 deleteCSINode.' ) ; } 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 : V1CSINode ; } > ( ( 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 , "V1CSINode" ) ; 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 deleteCollectionCSIDriver ( pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/csidrivers' ; 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 deleteCollectionCSINode ( pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/csinodes' ; 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 deleteCollectionStorageClass ( pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/storageclasses' ; 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 deleteCollectionVolumeAttachment ( pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/volumeattachments' ; 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 deleteStorageClass ( name , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/storageclasses/{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 deleteStorageClass.' ) ; } 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 : V1StorageClass ; } > ( ( 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 , "V1StorageClass" ) ; 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 deleteVolumeAttachment ( name , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/volumeattachments/{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 deleteVolumeAttachment.' ) ; } 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 : V1VolumeAttachment ; } > ( ( 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 , "V1VolumeAttachment" ) ; 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 + '/apis/storage.k8s.io/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 pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listCSIDriver ( pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/csidrivers' ; 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 : V1CSIDriverList ; } > ( ( 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 , "V1CSIDriverList" ) ; 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 listCSINode ( pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/csinodes' ; 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 : V1CSINodeList ; } > ( ( 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 , "V1CSINodeList" ) ; 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 listStorageClass ( pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/storageclasses' ; 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 : V1StorageClassList ; } > ( ( 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 , "V1StorageClassList" ) ; 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 listVolumeAttachment ( pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/volumeattachments' ; 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 : V1VolumeAttachmentList ; } > ( ( 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 , "V1VolumeAttachmentList" ) ; 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 patchCSIDriver ( name , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/csidrivers/{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 patchCSIDriver.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchCSIDriver.' ) ; } 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 : V1CSIDriver ; } > ( ( 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 , "V1CSIDriver" ) ; 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 patchCSINode ( name , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/csinodes/{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 patchCSINode.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchCSINode.' ) ; } 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 : V1CSINode ; } > ( ( 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 , "V1CSINode" ) ; 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 patchStorageClass ( name , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/storageclasses/{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 patchStorageClass.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchStorageClass.' ) ; } 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 : V1StorageClass ; } > ( ( 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 , "V1StorageClass" ) ; 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 patchVolumeAttachment ( name , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/volumeattachments/{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 patchVolumeAttachment.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchVolumeAttachment.' ) ; } 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 : V1VolumeAttachment ; } > ( ( 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 , "V1VolumeAttachment" ) ; 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 patchVolumeAttachmentStatus ( name , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/volumeattachments/{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 patchVolumeAttachmentStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchVolumeAttachmentStatus.' ) ; } 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 : V1VolumeAttachment ; } > ( ( 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 , "V1VolumeAttachment" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param pretty public async readCSIDriver ( name , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/csidrivers/{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 readCSIDriver.' ) ; } 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 : V1CSIDriver ; } > ( ( 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 , "V1CSIDriver" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param pretty public async readCSINode ( name , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/csinodes/{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 readCSINode.' ) ; } 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 : V1CSINode ; } > ( ( 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 , "V1CSINode" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param pretty public async readStorageClass ( name , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/storageclasses/{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 readStorageClass.' ) ; } 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 : V1StorageClass ; } > ( ( 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 , "V1StorageClass" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param pretty public async readVolumeAttachment ( name , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/volumeattachments/{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 readVolumeAttachment.' ) ; } 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 : V1VolumeAttachment ; } > ( ( 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 , "V1VolumeAttachment" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param pretty public async readVolumeAttachmentStatus ( name , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/volumeattachments/{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 readVolumeAttachmentStatus.' ) ; } 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 : V1VolumeAttachment ; } > ( ( 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 , "V1VolumeAttachment" ) ; 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 replaceCSIDriver ( name , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/csidrivers/{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 replaceCSIDriver.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceCSIDriver.' ) ; } 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 , "V1CSIDriver" ) } ; 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 : V1CSIDriver ; } > ( ( 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 , "V1CSIDriver" ) ; 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 replaceCSINode ( name , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/csinodes/{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 replaceCSINode.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceCSINode.' ) ; } 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 , "V1CSINode" ) } ; 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 : V1CSINode ; } > ( ( 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 , "V1CSINode" ) ; 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 replaceStorageClass ( name , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/storageclasses/{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 replaceStorageClass.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceStorageClass.' ) ; } 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 , "V1StorageClass" ) } ; 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 : V1StorageClass ; } > ( ( 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 , "V1StorageClass" ) ; 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 replaceVolumeAttachment ( name , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/volumeattachments/{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 replaceVolumeAttachment.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceVolumeAttachment.' ) ; } 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 , "V1VolumeAttachment" ) } ; 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 : V1VolumeAttachment ; } > ( ( 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 , "V1VolumeAttachment" ) ; 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 replaceVolumeAttachmentStatus ( name , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/storage.k8s.io/v1/volumeattachments/{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 replaceVolumeAttachmentStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceVolumeAttachmentStatus.' ) ; } 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 , "V1VolumeAttachment" ) } ; 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 : V1VolumeAttachment ; } > ( ( 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 , "V1VolumeAttachment" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } }