dist/gen/api/authorizationV1beta1Api.js
/**
     * create a LocalSubjectAccessReview
     * @param namespace object name and auth scope, such as for teams and projects
     * @param body
     * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
     * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.
     * @param pretty If \&#39;true\&#39;, then the output is pretty printed.
     */
create a LocalSubjectAccessReview
@param namespace object name and auth scope, such as for teams and projects
@param body
@param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
@param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.
@param pretty If \'true\', then the output is pretty printed.
create a LocalSubjectAccessReview @param namespace object name and auth scope such as for teams and projects @param body @param dryRun When present indicates that modifications should not be persisted . An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request . Valid values are : - All : all dry run stages will be processed @param includeUninitialized If IncludeUninitialized is specified the object may be returned without completing initialization . @param pretty If \ ' true \ ' then the output is pretty printed .
createNamespacedLocalSubjectAccessReview(namespace, body, dryRun, includeUninitialized, pretty, options = { headers: {} }) {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1beta1/namespaces/{namespace}/localsubjectaccessreviews'
                .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));
            let localVarQueryParameters = {};
            let localVarHeaderParams = Object.assign({}, this.defaultHeaders);
            let localVarFormParams = {};
            if (namespace === null || namespace === undefined) {
                throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLocalSubjectAccessReview.');
            }
            if (body === null || body === undefined) {
                throw new Error('Required parameter body was null or undefined when calling createNamespacedLocalSubjectAccessReview.');
            }
            if (dryRun !== undefined) {
                localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string");
            }
            if (includeUninitialized !== undefined) {
                localVarQueryParameters['includeUninitialized'] = models_1.ObjectSerializer.serialize(includeUninitialized, "boolean");
            }
            if (pretty !== undefined) {
                localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string");
            }
            Object.assign(localVarHeaderParams, options.headers);
            let localVarUseFormData = false;
            let localVarRequestOptions = {
                method: 'POST',
                qs: localVarQueryParameters,
                headers: localVarHeaderParams,
                uri: localVarPath,
                useQuerystring: this._useQuerystring,
                json: true,
                body: models_1.ObjectSerializer.serialize(body, "V1beta1LocalSubjectAccessReview")
            };
            this.authentications.BearerToken.applyToRequest(localVarRequestOptions);
            this.authentications.default.applyToRequest(localVarRequestOptions);
            if (Object.keys(localVarFormParams).length) {
                if (localVarUseFormData) {
                    localVarRequestOptions.formData = localVarFormParams;
                }
                else {
                    localVarRequestOptions.form = localVarFormParams;
                }
            }
            return new Promise((resolve, reject) => {
                localVarRequest(localVarRequestOptions, (error, response, body) => {
                    if (error) {
                        reject(error);
                    }
                    else {
                        body = models_1.ObjectSerializer.deserialize(body, "V1beta1LocalSubjectAccessReview");
                        if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
                            resolve({ response: response, body: body });
                        }
                        else {
                            reject({ response: response, body: body });
                        }
                    }
                });
            });
        });
    }
createNamespacedLocalSubjectAccessReview ( namespace , body , dryRun , includeUninitialized , pretty , options = { headers : { } } ) { return tslib_1 . __awaiter ( this , void 0 , void 0 , function * ( ) { const localVarPath = this . basePath + '/apis/authorization.k8s.io/v1beta1/namespaces/{namespace}/localsubjectaccessreviews' . replace ( '{' + 'namespace' + '}' , encodeURIComponent ( String ( namespace ) ) ) ; let localVarQueryParameters = { } ; let localVarHeaderParams = Object . assign ( { } , this . defaultHeaders ) ; let localVarFormParams = { } ; if ( namespace === null || namespace === undefined ) { throw new Error ( 'Required parameter namespace was null or undefined when calling createNamespacedLocalSubjectAccessReview.' ) ; } if ( body === null || body === undefined ) { throw new Error ( 'Required parameter body was null or undefined when calling createNamespacedLocalSubjectAccessReview.' ) ; } if ( dryRun !== undefined ) { localVarQueryParameters [ 'dryRun' ] = models_1 . ObjectSerializer . serialize ( dryRun , "string" ) ; } if ( includeUninitialized !== undefined ) { localVarQueryParameters [ 'includeUninitialized' ] = models_1 . ObjectSerializer . serialize ( includeUninitialized , "boolean" ) ; } if ( pretty !== undefined ) { localVarQueryParameters [ 'pretty' ] = models_1 . ObjectSerializer . serialize ( pretty , "string" ) ; } Object . assign ( localVarHeaderParams , options . headers ) ; let localVarUseFormData = false ; let localVarRequestOptions = { method : 'POST' , qs : localVarQueryParameters , headers : localVarHeaderParams , uri : localVarPath , useQuerystring : this . _useQuerystring , json : true , body : models_1 . ObjectSerializer . serialize ( body , "V1beta1LocalSubjectAccessReview" ) } ; this . authentications . BearerToken . applyToRequest ( localVarRequestOptions ) ; this . authentications . default . applyToRequest ( localVarRequestOptions ) ; if ( Object . keys ( localVarFormParams ) . length ) { if ( localVarUseFormData ) { localVarRequestOptions . formData = localVarFormParams ; } else { localVarRequestOptions . form = localVarFormParams ; } } return new Promise ( ( resolve , reject ) => { localVarRequest ( localVarRequestOptions , ( error , response , body ) => { if ( error ) { reject ( error ) ; } else { body = models_1 . ObjectSerializer . deserialize ( body , "V1beta1LocalSubjectAccessReview" ) ; if ( response . statusCode && response . statusCode >= 200 && response . statusCode <= 299 ) { resolve ( { response : response , body : body } ) ; } else { reject ( { response : response , body : body } ) ; } } } ) ; } ) ; } ) ; }
create a LocalSubjectAccessReview
 @param namespace object name and auth scope, such as for teams and projects
 @param body
 @param dryRun When present, indicates that modifications should not be persisted.
create a LocalSubjectAccessReview @param namespace object name and auth scope such as for teams and projects @param body @param dryRun When present indicates that modifications should not be persisted .
// verify required parameter 'namespace' is not null or undefined // verify required parameter 'body' is not null or undefined