/**
 * 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 { V1ControllerRevision } from '../model/v1ControllerRevision' ; import { V1ControllerRevisionList } from '../model/v1ControllerRevisionList' ; import { V1DaemonSet } from '../model/v1DaemonSet' ; import { V1DaemonSetList } from '../model/v1DaemonSetList' ; import { V1DeleteOptions } from '../model/v1DeleteOptions' ; import { V1Deployment } from '../model/v1Deployment' ; import { V1DeploymentList } from '../model/v1DeploymentList' ; import { V1ReplicaSet } from '../model/v1ReplicaSet' ; import { V1ReplicaSetList } from '../model/v1ReplicaSetList' ; import { V1Scale } from '../model/v1Scale' ; import { V1StatefulSet } from '../model/v1StatefulSet' ; import { V1StatefulSetList } from '../model/v1StatefulSetList' ; import { V1Status } from '../model/v1Status' ; import { ObjectSerializer , Authentication , VoidAuth , Interceptor } from '../model/models' ; import { HttpBasicAuth , HttpBearerAuth , ApiKeyAuth , OAuth } from '../model/models' ; import { HttpError , RequestFile } from './apis' ; let defaultBasePath = 'http://localhost' ; export enum AppsV1ApiApiKeys { BearerToken } export class AppsV1Api { 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 ) [ AppsV1ApiApiKeys [ key ] ] . apiKey = value ; } public addInterceptor ( interceptor ) { this . interceptors . push ( interceptor ) ; } param namespace param body param pretty param dryRun param fieldManager public async createNamespacedControllerRevision ( namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedControllerRevision.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedControllerRevision.' ) ; } 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 , "V1ControllerRevision" ) } ; 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 : V1ControllerRevision ; } > ( ( 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 , "V1ControllerRevision" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param body param pretty param dryRun param fieldManager public async createNamespacedDaemonSet ( namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedDaemonSet.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedDaemonSet.' ) ; } 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 , "V1DaemonSet" ) } ; 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 : V1DaemonSet ; } > ( ( 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 , "V1DaemonSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param body param pretty param dryRun param fieldManager public async createNamespacedDeployment ( namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/deployments' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedDeployment.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedDeployment.' ) ; } 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 , "V1Deployment" ) } ; 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 : V1Deployment ; } > ( ( 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 , "V1Deployment" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param body param pretty param dryRun param fieldManager public async createNamespacedReplicaSet ( namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedReplicaSet.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedReplicaSet.' ) ; } 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 , "V1ReplicaSet" ) } ; 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 : V1ReplicaSet ; } > ( ( 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 , "V1ReplicaSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param body param pretty param dryRun param fieldManager public async createNamespacedStatefulSet ( namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedStatefulSet.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedStatefulSet.' ) ; } 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 , "V1StatefulSet" ) } ; 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 : V1StatefulSet ; } > ( ( 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 , "V1StatefulSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param _continue param dryRun param fieldSelector param gracePeriodSeconds param labelSelector param limit param orphanDependents param propagationPolicy param resourceVersion param resourceVersionMatch param timeoutSeconds param body public async deleteCollectionNamespacedControllerRevision ( namespace , pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteCollectionNamespacedControllerRevision.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param _continue param dryRun param fieldSelector param gracePeriodSeconds param labelSelector param limit param orphanDependents param propagationPolicy param resourceVersion param resourceVersionMatch param timeoutSeconds param body public async deleteCollectionNamespacedDaemonSet ( namespace , pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDaemonSet.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param _continue param dryRun param fieldSelector param gracePeriodSeconds param labelSelector param limit param orphanDependents param propagationPolicy param resourceVersion param resourceVersionMatch param timeoutSeconds param body public async deleteCollectionNamespacedDeployment ( namespace , pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/deployments' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDeployment.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param _continue param dryRun param fieldSelector param gracePeriodSeconds param labelSelector param limit param orphanDependents param propagationPolicy param resourceVersion param resourceVersionMatch param timeoutSeconds param body public async deleteCollectionNamespacedReplicaSet ( namespace , pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteCollectionNamespacedReplicaSet.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param _continue param dryRun param fieldSelector param gracePeriodSeconds param labelSelector param limit param orphanDependents param propagationPolicy param resourceVersion param resourceVersionMatch param timeoutSeconds param body public async deleteCollectionNamespacedStatefulSet ( namespace , pretty ? , _continue ? , dryRun ? , fieldSelector ? , gracePeriodSeconds ? , labelSelector ? , limit ? , orphanDependents ? , propagationPolicy ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteCollectionNamespacedStatefulSet.' ) ; } 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 namespace param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNamespacedControllerRevision ( name , namespace , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNamespacedControllerRevision.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteNamespacedControllerRevision.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNamespacedDaemonSet ( name , namespace , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNamespacedDaemonSet.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteNamespacedDaemonSet.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNamespacedDeployment ( name , namespace , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNamespacedDeployment.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteNamespacedDeployment.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNamespacedReplicaSet ( name , namespace , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNamespacedReplicaSet.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteNamespacedReplicaSet.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty param dryRun param gracePeriodSeconds param orphanDependents param propagationPolicy param body public async deleteNamespacedStatefulSet ( name , namespace , pretty ? , dryRun ? , gracePeriodSeconds ? , orphanDependents ? , propagationPolicy ? , body ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling deleteNamespacedStatefulSet.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling deleteNamespacedStatefulSet.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( gracePeriodSeconds !== undefined ) { localVarQueryParameters [ 'gracePeriodSeconds' ] = ObjectSerializer . serialize ( gracePeriodSeconds , "number" ) ; } if ( orphanDependents !== undefined ) { localVarQueryParameters [ 'orphanDependents' ] = ObjectSerializer . serialize ( orphanDependents , "boolean" ) ; } if ( propagationPolicy !== undefined ) { localVarQueryParameters [ 'propagationPolicy' ] = ObjectSerializer . serialize ( propagationPolicy , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'DELETE' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1DeleteOptions" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Status ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Status" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } /**
     * get available resources
     */ public async getAPIResources ( options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1APIResourceList ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1APIResourceList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param pretty param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listControllerRevisionForAllNamespaces ( allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , pretty ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/controllerrevisions' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ControllerRevisionList ; } > ( ( 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 , "V1ControllerRevisionList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param pretty param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listDaemonSetForAllNamespaces ( allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , pretty ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/daemonsets' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1DaemonSetList ; } > ( ( 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 , "V1DaemonSetList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param pretty param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listDeploymentForAllNamespaces ( allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , pretty ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/deployments' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1DeploymentList ; } > ( ( 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 , "V1DeploymentList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNamespacedControllerRevision ( namespace , pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling listNamespacedControllerRevision.' ) ; } 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 : V1ControllerRevisionList ; } > ( ( 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 , "V1ControllerRevisionList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNamespacedDaemonSet ( namespace , pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling listNamespacedDaemonSet.' ) ; } 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 : V1DaemonSetList ; } > ( ( 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 , "V1DaemonSetList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNamespacedDeployment ( namespace , pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/deployments' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling listNamespacedDeployment.' ) ; } 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 : V1DeploymentList ; } > ( ( 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 , "V1DeploymentList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNamespacedReplicaSet ( namespace , pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling listNamespacedReplicaSet.' ) ; } 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 : V1ReplicaSetList ; } > ( ( 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 , "V1ReplicaSetList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param namespace param pretty param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listNamespacedStatefulSet ( namespace , pretty ? , allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling listNamespacedStatefulSet.' ) ; } 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 : V1StatefulSetList ; } > ( ( 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 , "V1StatefulSetList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param pretty param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listReplicaSetForAllNamespaces ( allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , pretty ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/replicasets' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1ReplicaSetList ; } > ( ( 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 , "V1ReplicaSetList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param allowWatchBookmarks param _continue param fieldSelector param labelSelector param limit param pretty param resourceVersion param resourceVersionMatch param timeoutSeconds param watch public async listStatefulSetForAllNamespaces ( allowWatchBookmarks ? , _continue ? , fieldSelector ? , labelSelector ? , limit ? , pretty ? , resourceVersion ? , resourceVersionMatch ? , timeoutSeconds ? , watch ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/statefulsets' ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' , 'application/json;stream=watch' , 'application/vnd.kubernetes.protobuf;stream=watch' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( allowWatchBookmarks !== undefined ) { localVarQueryParameters [ 'allowWatchBookmarks' ] = ObjectSerializer . serialize ( allowWatchBookmarks , "boolean" ) ; } if ( _continue !== undefined ) { localVarQueryParameters [ 'continue' ] = ObjectSerializer . serialize ( _continue , "string" ) ; } if ( fieldSelector !== undefined ) { localVarQueryParameters [ 'fieldSelector' ] = ObjectSerializer . serialize ( fieldSelector , "string" ) ; } if ( labelSelector !== undefined ) { localVarQueryParameters [ 'labelSelector' ] = ObjectSerializer . serialize ( labelSelector , "string" ) ; } if ( limit !== undefined ) { localVarQueryParameters [ 'limit' ] = ObjectSerializer . serialize ( limit , "number" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( resourceVersion !== undefined ) { localVarQueryParameters [ 'resourceVersion' ] = ObjectSerializer . serialize ( resourceVersion , "string" ) ; } if ( resourceVersionMatch !== undefined ) { localVarQueryParameters [ 'resourceVersionMatch' ] = ObjectSerializer . serialize ( resourceVersionMatch , "string" ) ; } if ( timeoutSeconds !== undefined ) { localVarQueryParameters [ 'timeoutSeconds' ] = ObjectSerializer . serialize ( timeoutSeconds , "number" ) ; } if ( watch !== undefined ) { localVarQueryParameters [ 'watch' ] = ObjectSerializer . serialize ( watch , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1StatefulSetList ; } > ( ( 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 , "V1StatefulSetList" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedControllerRevision ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedControllerRevision.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedControllerRevision.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedControllerRevision.' ) ; } 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 : V1ControllerRevision ; } > ( ( 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 , "V1ControllerRevision" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedDaemonSet ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedDaemonSet.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedDaemonSet.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedDaemonSet.' ) ; } 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 : V1DaemonSet ; } > ( ( 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 , "V1DaemonSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedDaemonSetStatus ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedDaemonSetStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedDaemonSetStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedDaemonSetStatus.' ) ; } 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 : V1DaemonSet ; } > ( ( 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 , "V1DaemonSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedDeployment ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedDeployment.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedDeployment.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedDeployment.' ) ; } 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 : V1Deployment ; } > ( ( 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 , "V1Deployment" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedDeploymentScale ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedDeploymentScale.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedDeploymentScale.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedDeploymentScale.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Scale ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Scale" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedDeploymentStatus ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedDeploymentStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedDeploymentStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedDeploymentStatus.' ) ; } 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 : V1Deployment ; } > ( ( 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 , "V1Deployment" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedReplicaSet ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedReplicaSet.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedReplicaSet.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedReplicaSet.' ) ; } 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 : V1ReplicaSet ; } > ( ( 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 , "V1ReplicaSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedReplicaSetScale ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedReplicaSetScale.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedReplicaSetScale.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedReplicaSetScale.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Scale ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Scale" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedReplicaSetStatus ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedReplicaSetStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedReplicaSetStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedReplicaSetStatus.' ) ; } 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 : V1ReplicaSet ; } > ( ( 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 , "V1ReplicaSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedStatefulSet ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedStatefulSet.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedStatefulSet.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedStatefulSet.' ) ; } 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 : V1StatefulSet ; } > ( ( 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 , "V1StatefulSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedStatefulSetScale ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedStatefulSetScale.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedStatefulSetScale.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedStatefulSetScale.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } if ( force !== undefined ) { localVarQueryParameters [ 'force' ] = ObjectSerializer . serialize ( force , "boolean" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PATCH' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "object" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Scale ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Scale" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager param force public async patchNamespacedStatefulSetStatus ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , force ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling patchNamespacedStatefulSetStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling patchNamespacedStatefulSetStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling patchNamespacedStatefulSetStatus.' ) ; } 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 : V1StatefulSet ; } > ( ( 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 , "V1StatefulSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedControllerRevision ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedControllerRevision.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedControllerRevision.' ) ; } 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 : V1ControllerRevision ; } > ( ( 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 , "V1ControllerRevision" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedDaemonSet ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedDaemonSet.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedDaemonSet.' ) ; } 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 : V1DaemonSet ; } > ( ( 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 , "V1DaemonSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedDaemonSetStatus ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedDaemonSetStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedDaemonSetStatus.' ) ; } 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 : V1DaemonSet ; } > ( ( 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 , "V1DaemonSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedDeployment ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedDeployment.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedDeployment.' ) ; } 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 : V1Deployment ; } > ( ( 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 , "V1Deployment" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedDeploymentScale ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedDeploymentScale.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedDeploymentScale.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Scale ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Scale" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedDeploymentStatus ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedDeploymentStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedDeploymentStatus.' ) ; } 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 : V1Deployment ; } > ( ( 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 , "V1Deployment" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedReplicaSet ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedReplicaSet.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedReplicaSet.' ) ; } 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 : V1ReplicaSet ; } > ( ( 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 , "V1ReplicaSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedReplicaSetScale ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedReplicaSetScale.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedReplicaSetScale.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Scale ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Scale" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedReplicaSetStatus ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedReplicaSetStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedReplicaSetStatus.' ) ; } 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 : V1ReplicaSet ; } > ( ( 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 , "V1ReplicaSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedStatefulSet ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedStatefulSet.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedStatefulSet.' ) ; } 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 : V1StatefulSet ; } > ( ( 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 , "V1StatefulSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedStatefulSetScale ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedStatefulSetScale.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedStatefulSetScale.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'GET' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Scale ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Scale" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param pretty public async readNamespacedStatefulSetStatus ( name , namespace , pretty ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling readNamespacedStatefulSetStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling readNamespacedStatefulSetStatus.' ) ; } 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 : V1StatefulSet ; } > ( ( 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 , "V1StatefulSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedControllerRevision ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedControllerRevision.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedControllerRevision.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedControllerRevision.' ) ; } 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 , "V1ControllerRevision" ) } ; 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 : V1ControllerRevision ; } > ( ( 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 , "V1ControllerRevision" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedDaemonSet ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedDaemonSet.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedDaemonSet.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedDaemonSet.' ) ; } 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 , "V1DaemonSet" ) } ; 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 : V1DaemonSet ; } > ( ( 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 , "V1DaemonSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedDaemonSetStatus ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedDaemonSetStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedDaemonSetStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedDaemonSetStatus.' ) ; } 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 , "V1DaemonSet" ) } ; 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 : V1DaemonSet ; } > ( ( 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 , "V1DaemonSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedDeployment ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedDeployment.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedDeployment.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedDeployment.' ) ; } 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 , "V1Deployment" ) } ; 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 : V1Deployment ; } > ( ( 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 , "V1Deployment" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedDeploymentScale ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedDeploymentScale.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentScale.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedDeploymentScale.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Scale" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Scale ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Scale" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedDeploymentStatus ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedDeploymentStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedDeploymentStatus.' ) ; } 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 , "V1Deployment" ) } ; 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 : V1Deployment ; } > ( ( 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 , "V1Deployment" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedReplicaSet ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedReplicaSet.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSet.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedReplicaSet.' ) ; } 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 , "V1ReplicaSet" ) } ; 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 : V1ReplicaSet ; } > ( ( 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 , "V1ReplicaSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedReplicaSetScale ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedReplicaSetScale.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSetScale.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedReplicaSetScale.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Scale" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Scale ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Scale" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedReplicaSetStatus ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedReplicaSetStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSetStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedReplicaSetStatus.' ) ; } 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 , "V1ReplicaSet" ) } ; 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 : V1ReplicaSet ; } > ( ( 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 , "V1ReplicaSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedStatefulSet ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedStatefulSet.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSet.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedStatefulSet.' ) ; } 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 , "V1StatefulSet" ) } ; 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 : V1StatefulSet ; } > ( ( 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 , "V1StatefulSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedStatefulSetScale ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedStatefulSetScale.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSetScale.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedStatefulSetScale.' ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = ObjectSerializer . serialize ( pretty , "string" ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( fieldManager !== undefined ) { localVarQueryParameters [ 'fieldManager' ] = ObjectSerializer . serialize ( fieldManager , "string" ) ; } ( < any > Object ) . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'PUT' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : ObjectSerializer . serialize ( body , "V1Scale" ) } ; let authenticationPromise = Promise . resolve ( ) ; if ( this . authentications . BearerToken . apiKey ) { authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ) ; } authenticationPromise = authenticationPromise . then ( ( ) => this . authentications . default . applyToRequest ( localVarRequestOptions ) ) ; let interceptorPromise = authenticationPromise ; for ( const interceptor of this . interceptors ) { interceptorPromise = interceptorPromise . then ( ( ) => interceptor ( localVarRequestOptions ) ) ; } return interceptorPromise . then ( ( ) => { if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { ( < any > localVarRequestOptions ) . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise < { response : http . IncomingMessage ; body : V1Scale ; } > ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { body = ObjectSerializer . deserialize ( body , "V1Scale" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } param name param namespace param body param pretty param dryRun param fieldManager public async replaceNamespacedStatefulSetStatus ( name , namespace , body , pretty ? , dryRun ? , fieldManager ? , options = { headers : { } } ) { const localVarPath = this . basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status' . replace ( '{' + 'name' + '}' , encodeURIComponent ( String ( name ) ) ) . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = ( < any > Object ) . assign ( { } , this . _defaultHeaders ) ; const produces = [ 'application/json' , 'application/yaml' , 'application/vnd.kubernetes.protobuf' ] ; if ( produces . indexOf ( 'application/json' ) >= 0 ) { localVarHeaderParams . Accept = 'application/json' ; } else { localVarHeaderParams . Accept = produces . join ( ',' ) ; } let localVarFormParams = { } ; if ( name === null || name === undefined ) { throw new Error ( 'Required parameter name was null or undefined when calling replaceNamespacedStatefulSetStatus.' ) ; } if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSetStatus.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling replaceNamespacedStatefulSetStatus.' ) ; } 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 , "V1StatefulSet" ) } ; 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 : V1StatefulSet ; } > ( ( 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 , "V1StatefulSet" ) ; resolve ( { response : response , body : body } ) ; } else { reject ( new HttpError ( response , body , response . statusCode ) ) ; } } } ) ; } ) ; } ) ; } }