diff --git a/dist/index.js b/dist/index.js index 6395816e..18b152b9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1336,7 +1336,7 @@ class SetupMac { const unityChangeset = yield unity_changeset_1.getUnityChangeset(buildParameters.version); //Need to set environment variables from here because we execute //the scripts on the host for mac - process.env.SCRIPT_DIRECTORY = `${actionFolder}/platforms/mac`; + process.env.ACTION_FOLDER = actionFolder; process.env.UNITY_VERSION = buildParameters.version; process.env.UNITY_CHANGESET = unityChangeset.changeset; process.env.UNITY_SERIAL = buildParameters.unitySerial; diff --git a/dist/index.js.map b/dist/index.js.map index 2d07426a..807dff24 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../webpack://unity-builder/./lib/index.js","../webpack://unity-builder/./lib/model/action.js","../webpack://unity-builder/./lib/model/android-versioning.js","../webpack://unity-builder/./lib/model/build-parameters.js","../webpack://unity-builder/./lib/model/cache.js","../webpack://unity-builder/./lib/model/docker.js","../webpack://unity-builder/./lib/model/error/not-implemented-exception.js","../webpack://unity-builder/./lib/model/error/validation-error.js","../webpack://unity-builder/./lib/model/image-tag.js","../webpack://unity-builder/./lib/model/index.js","../webpack://unity-builder/./lib/model/input.js","../webpack://unity-builder/./lib/model/kubernetes.js","../webpack://unity-builder/./lib/model/mac-builder.js","../webpack://unity-builder/./lib/model/output.js","../webpack://unity-builder/./lib/model/platform-setup.js","../webpack://unity-builder/./lib/model/platform-setup/index.js","../webpack://unity-builder/./lib/model/platform-setup/setup-mac.js","../webpack://unity-builder/./lib/model/platform-setup/setup-windows.js","../webpack://unity-builder/./lib/model/platform-validation/validate-windows.js","../webpack://unity-builder/./lib/model/platform.js","../webpack://unity-builder/./lib/model/project.js","../webpack://unity-builder/./lib/model/remote-builder/aws-build-platform.js","../webpack://unity-builder/./lib/model/remote-builder/aws-build-runner.js","../webpack://unity-builder/./lib/model/remote-builder/remote-builder-constants.js","../webpack://unity-builder/./lib/model/remote-builder/remote-builder.js","../webpack://unity-builder/./lib/model/system.js","../webpack://unity-builder/./lib/model/unity-versioning.js","../webpack://unity-builder/./lib/model/unity.js","../webpack://unity-builder/./lib/model/versioning.js","../webpack://unity-builder/./node_modules/@actions/core/lib/command.js","../webpack://unity-builder/./node_modules/@actions/core/lib/core.js","../webpack://unity-builder/./node_modules/@actions/core/lib/file-command.js","../webpack://unity-builder/./node_modules/@actions/core/lib/utils.js","../webpack://unity-builder/./node_modules/@actions/exec/lib/exec.js","../webpack://unity-builder/./node_modules/@actions/exec/lib/toolrunner.js","../webpack://unity-builder/./node_modules/@actions/io/lib/io-util.js","../webpack://unity-builder/./node_modules/@actions/io/lib/io.js","../webpack://unity-builder/./node_modules/@kubernetes/client-node/dist/api.js","../webpack://unity-builder/./node_modules/@kubernetes/client-node/dist/attach.js","../webpack://unity-builder/./node_modules/@kubernetes/client-node/dist/cache.js","../webpack://unity-builder/./node_modules/@kubernetes/client-node/dist/cloud_auth.js","../webpack://unity-builder/./node_modules/@kubernetes/client-node/dist/config.js","../webpack://unity-builder/./node_modules/@kubernetes/client-node/dist/config_types.js","../webpack://unity-builder/./node_modules/@kubernetes/client-node/dist/exec.js","../webpack://unity-builder/./node_modules/@kubernetes/client-node/dist/exec_auth.js","../webpack://unity-builder/./node_modules/@kubernetes/client-node/dist/index.js","../webpack://unity-builder/./node_modules/@kubernetes/client-node/dist/informer.js","../webpack://unity-builder/./node_modules/@kubernetes/client-node/dist/log.js","../webpack://unity-builder/./node_modules/@kubernetes/client-node/dist/portforward.js","../webpack://unity-builder/./node_modules/@kubernetes/client-node/dist/terminal-size-queue.js","../webpack://unity-builder/./node_modules/@kubernetes/client-node/dist/watch.js","../webpack://unity-builder/./node_modules/@kubernetes/client-node/dist/web-socket-handler.js","../webpack://unity-builder/./node_modules/@kubernetes/client-node/dist/yaml.js","../webpack://unity-builder/./node_modules/@panva/asn1.js/lib/asn1.js","../webpack://unity-builder/./node_modules/@panva/asn1.js/lib/asn1/api.js","../webpack://unity-builder/./node_modules/@panva/asn1.js/lib/asn1/base/buffer.js","../webpack://unity-builder/./node_modules/@panva/asn1.js/lib/asn1/base/index.js","../webpack://unity-builder/./node_modules/@panva/asn1.js/lib/asn1/base/node.js","../webpack://unity-builder/./node_modules/@panva/asn1.js/lib/asn1/base/reporter.js","../webpack://unity-builder/./node_modules/@panva/asn1.js/lib/asn1/constants/der.js","../webpack://unity-builder/./node_modules/@panva/asn1.js/lib/asn1/constants/index.js","../webpack://unity-builder/./node_modules/@panva/asn1.js/lib/asn1/decoders/der.js","../webpack://unity-builder/./node_modules/@panva/asn1.js/lib/asn1/decoders/index.js","../webpack://unity-builder/./node_modules/@panva/asn1.js/lib/asn1/decoders/pem.js","../webpack://unity-builder/./node_modules/@panva/asn1.js/lib/asn1/encoders/der.js","../webpack://unity-builder/./node_modules/@panva/asn1.js/lib/asn1/encoders/index.js","../webpack://unity-builder/./node_modules/@panva/asn1.js/lib/asn1/encoders/pem.js","../webpack://unity-builder/./node_modules/@sindresorhus/is/dist/index.js","../webpack://unity-builder/./node_modules/@szmarczak/http-timer/source/index.js","../webpack://unity-builder/./node_modules/abab/index.js","../webpack://unity-builder/./node_modules/abab/lib/atob.js","../webpack://unity-builder/./node_modules/abab/lib/btoa.js","../webpack://unity-builder/./node_modules/aggregate-error/index.js","../webpack://unity-builder/./node_modules/ajv/lib/ajv.js","../webpack://unity-builder/./node_modules/ajv/lib/cache.js","../webpack://unity-builder/./node_modules/ajv/lib/compile/async.js","../webpack://unity-builder/./node_modules/ajv/lib/compile/error_classes.js","../webpack://unity-builder/./node_modules/ajv/lib/compile/formats.js","../webpack://unity-builder/./node_modules/ajv/lib/compile/index.js","../webpack://unity-builder/./node_modules/ajv/lib/compile/resolve.js","../webpack://unity-builder/./node_modules/ajv/lib/compile/rules.js","../webpack://unity-builder/./node_modules/ajv/lib/compile/schema_obj.js","../webpack://unity-builder/./node_modules/ajv/lib/compile/ucs2length.js","../webpack://unity-builder/./node_modules/ajv/lib/compile/util.js","../webpack://unity-builder/./node_modules/ajv/lib/data.js","../webpack://unity-builder/./node_modules/ajv/lib/definition_schema.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/_limit.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/_limitItems.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/_limitLength.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/_limitProperties.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/allOf.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/anyOf.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/comment.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/const.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/contains.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/custom.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/dependencies.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/enum.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/format.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/if.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/index.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/items.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/multipleOf.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/not.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/oneOf.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/pattern.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/properties.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/propertyNames.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/ref.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/required.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/uniqueItems.js","../webpack://unity-builder/./node_modules/ajv/lib/dotjs/validate.js","../webpack://unity-builder/./node_modules/ajv/lib/keyword.js","../webpack://unity-builder/./node_modules/asn1/lib/ber/errors.js","../webpack://unity-builder/./node_modules/asn1/lib/ber/index.js","../webpack://unity-builder/./node_modules/asn1/lib/ber/reader.js","../webpack://unity-builder/./node_modules/asn1/lib/ber/types.js","../webpack://unity-builder/./node_modules/asn1/lib/ber/writer.js","../webpack://unity-builder/./node_modules/asn1/lib/index.js","../webpack://unity-builder/./node_modules/assert-plus/assert.js","../webpack://unity-builder/./node_modules/async-limiter/index.js","../webpack://unity-builder/./node_modules/asynckit/index.js","../webpack://unity-builder/./node_modules/asynckit/lib/abort.js","../webpack://unity-builder/./node_modules/asynckit/lib/async.js","../webpack://unity-builder/./node_modules/asynckit/lib/defer.js","../webpack://unity-builder/./node_modules/asynckit/lib/iterate.js","../webpack://unity-builder/./node_modules/asynckit/lib/state.js","../webpack://unity-builder/./node_modules/asynckit/lib/terminator.js","../webpack://unity-builder/./node_modules/asynckit/parallel.js","../webpack://unity-builder/./node_modules/asynckit/serial.js","../webpack://unity-builder/./node_modules/asynckit/serialOrdered.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/accessanalyzer.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/acm.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/acmpca.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/alexaforbusiness.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/all.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/amp.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/amplify.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/amplifybackend.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/apigateway.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/apigatewaymanagementapi.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/apigatewayv2.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/appconfig.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/appflow.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/appintegrations.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/applicationautoscaling.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/applicationinsights.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/appmesh.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/appstream.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/appsync.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/athena.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/auditmanager.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/augmentedairuntime.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/autoscaling.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/autoscalingplans.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/backup.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/batch.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/braket.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/budgets.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/chime.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/cloud9.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/clouddirectory.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/cloudformation.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/cloudfront.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/cloudhsm.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/cloudhsmv2.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/cloudsearch.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/cloudsearchdomain.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/cloudtrail.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/cloudwatch.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/cloudwatchevents.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/cloudwatchlogs.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/codeartifact.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/codebuild.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/codecommit.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/codedeploy.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/codeguruprofiler.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/codegurureviewer.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/codepipeline.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/codestar.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/codestarconnections.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/codestarnotifications.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/cognitoidentity.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/cognitoidentityserviceprovider.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/cognitosync.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/comprehend.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/comprehendmedical.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/computeoptimizer.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/configservice.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/connect.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/connectcontactlens.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/connectparticipant.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/costexplorer.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/cur.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/customerprofiles.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/databrew.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/dataexchange.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/datapipeline.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/datasync.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/dax.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/detective.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/devicefarm.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/devopsguru.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/directconnect.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/directoryservice.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/discovery.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/dlm.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/dms.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/docdb.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/dynamodb.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/dynamodbstreams.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/ebs.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/ec2.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/ec2instanceconnect.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/ecr.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/ecrpublic.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/ecs.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/efs.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/eks.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/elasticache.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/elasticbeanstalk.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/elasticinference.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/elastictranscoder.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/elb.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/elbv2.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/emr.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/emrcontainers.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/es.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/eventbridge.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/firehose.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/fis.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/fms.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/forecastqueryservice.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/forecastservice.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/frauddetector.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/fsx.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/gamelift.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/glacier.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/globalaccelerator.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/glue.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/greengrass.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/greengrassv2.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/groundstation.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/guardduty.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/health.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/healthlake.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/honeycode.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/iam.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/identitystore.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/imagebuilder.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/importexport.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/inspector.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/iot.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/iot1clickdevicesservice.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/iot1clickprojects.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/iotanalytics.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/iotdata.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/iotdeviceadvisor.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/iotevents.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/ioteventsdata.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/iotfleethub.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/iotjobsdataplane.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/iotsecuretunneling.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/iotsitewise.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/iotthingsgraph.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/iotwireless.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/ivs.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/kafka.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/kendra.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/kinesis.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/kinesisanalytics.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/kinesisanalyticsv2.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/kinesisvideo.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/kinesisvideoarchivedmedia.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/kinesisvideomedia.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/kinesisvideosignalingchannels.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/kms.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/lakeformation.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/lambda.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/lexmodelbuildingservice.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/lexmodelsv2.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/lexruntime.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/lexruntimev2.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/licensemanager.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/lightsail.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/location.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/lookoutequipment.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/lookoutmetrics.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/lookoutvision.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/machinelearning.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/macie.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/macie2.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/managedblockchain.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/marketplacecatalog.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/marketplacecommerceanalytics.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/marketplaceentitlementservice.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/marketplacemetering.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/mediaconnect.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/mediaconvert.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/medialive.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/mediapackage.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/mediapackagevod.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/mediastore.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/mediastoredata.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/mediatailor.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/mgn.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/migrationhub.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/migrationhubconfig.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/mobile.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/mobileanalytics.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/mq.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/mturk.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/mwaa.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/neptune.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/networkfirewall.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/networkmanager.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/opsworks.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/opsworkscm.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/organizations.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/outposts.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/personalize.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/personalizeevents.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/personalizeruntime.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/pi.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/pinpoint.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/pinpointemail.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/pinpointsmsvoice.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/polly.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/pricing.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/qldb.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/qldbsession.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/quicksight.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/ram.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/rds.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/rdsdataservice.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/redshift.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/redshiftdata.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/rekognition.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/resourcegroups.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/resourcegroupstaggingapi.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/robomaker.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/route53.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/route53domains.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/route53resolver.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/s3.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/s3control.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/s3outposts.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/sagemaker.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/sagemakeredge.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/sagemakerfeaturestoreruntime.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/sagemakerruntime.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/savingsplans.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/schemas.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/secretsmanager.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/securityhub.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/serverlessapplicationrepository.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/servicecatalog.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/servicecatalogappregistry.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/servicediscovery.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/servicequotas.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/ses.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/sesv2.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/shield.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/signer.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/simpledb.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/sms.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/snowball.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/sns.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/sqs.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/ssm.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/sso.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/ssoadmin.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/ssooidc.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/stepfunctions.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/storagegateway.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/sts.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/support.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/swf.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/synthetics.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/textract.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/timestreamquery.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/timestreamwrite.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/transcribeservice.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/transfer.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/translate.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/waf.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/wafregional.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/wafv2.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/wellarchitected.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/workdocs.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/worklink.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/workmail.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/workmailmessageflow.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/workspaces.js","../webpack://unity-builder/./node_modules/aws-sdk/clients/xray.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/api_loader.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/aws.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/cloudfront/signer.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/config.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/config_regional_endpoint.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/core.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/credentials.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/credentials/chainable_temporary_credentials.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/credentials/cognito_identity_credentials.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/credentials/credential_provider_chain.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/credentials/ec2_metadata_credentials.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/credentials/ecs_credentials.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/credentials/environment_credentials.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/credentials/file_system_credentials.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/credentials/process_credentials.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/credentials/remote_credentials.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/credentials/saml_credentials.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/credentials/shared_ini_file_credentials.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/credentials/temporary_credentials.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/credentials/token_file_web_identity_credentials.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/credentials/web_identity_credentials.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/discover_endpoint.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/dynamodb/converter.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/dynamodb/document_client.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/dynamodb/numberValue.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/dynamodb/set.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/dynamodb/translator.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/dynamodb/types.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/event-stream/buffered-create-event-stream.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/event-stream/event-message-chunker-stream.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/event-stream/event-message-chunker.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/event-stream/event-message-unmarshaller-stream.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/event-stream/int64.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/event-stream/parse-event.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/event-stream/parse-message.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/event-stream/split-message.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/event-stream/streaming-create-event-stream.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/event_listeners.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/http.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/http/node.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/json/builder.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/json/parser.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/metadata_service.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/model/api.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/model/collection.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/model/operation.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/model/paginator.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/model/resource_waiter.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/model/shape.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/node_loader.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/param_validator.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/polly/presigner.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/protocol/helpers.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/protocol/json.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/protocol/query.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/protocol/rest.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/protocol/rest_json.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/protocol/rest_xml.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/publisher/configuration.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/publisher/index.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/query/query_param_serializer.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/rds/signer.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/realclock/nodeClock.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/region_config.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/request.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/resource_waiter.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/response.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/s3/managed_upload.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/sequential_executor.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/service.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/apigateway.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/cloudfront.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/cloudsearchdomain.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/docdb.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/dynamodb.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/ec2.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/glacier.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/iotdata.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/lambda.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/lexmodelsv2.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/lookoutmetrics.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/machinelearning.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/neptune.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/polly.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/rds.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/rdsdataservice.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/rdsutil.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/route53.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/s3.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/s3control.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/s3util.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/sqs.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/sts.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/services/swf.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/shared-ini/index.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/shared-ini/ini-loader.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/signers/presign.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/signers/request_signer.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/signers/s3.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/signers/v2.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/signers/v3.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/signers/v3https.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/signers/v4.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/signers/v4_credentials.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/state_machine.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/util.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/xml/builder.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/xml/escape-attribute.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/xml/escape-element.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/xml/node_parser.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/xml/xml-node.js","../webpack://unity-builder/./node_modules/aws-sdk/lib/xml/xml-text.js","../webpack://unity-builder/./node_modules/aws-sdk/vendor/endpoint-cache/index.js","../webpack://unity-builder/./node_modules/aws-sdk/vendor/endpoint-cache/utils/LRU.js","../webpack://unity-builder/./node_modules/aws-sign2/index.js","../webpack://unity-builder/./node_modules/aws4/aws4.js","../webpack://unity-builder/./node_modules/aws4/lru.js","../webpack://unity-builder/./node_modules/balanced-match/index.js","../webpack://unity-builder/./node_modules/base-64/base64.js","../webpack://unity-builder/./node_modules/base64url/dist/base64url.js","../webpack://unity-builder/./node_modules/base64url/dist/pad-string.js","../webpack://unity-builder/./node_modules/base64url/index.js","../webpack://unity-builder/./node_modules/bcrypt-pbkdf/index.js","../webpack://unity-builder/./node_modules/brace-expansion/index.js","../webpack://unity-builder/./node_modules/browser-process-hrtime/index.js","../webpack://unity-builder/./node_modules/cacheable-request/node_modules/get-stream/buffer-stream.js","../webpack://unity-builder/./node_modules/cacheable-request/node_modules/get-stream/index.js","../webpack://unity-builder/./node_modules/cacheable-request/node_modules/lowercase-keys/index.js","../webpack://unity-builder/./node_modules/cacheable-request/src/index.js","../webpack://unity-builder/./node_modules/call-bind/callBound.js","../webpack://unity-builder/./node_modules/call-bind/index.js","../webpack://unity-builder/./node_modules/caseless/index.js","../webpack://unity-builder/./node_modules/clean-stack/index.js","../webpack://unity-builder/./node_modules/clone-response/src/index.js","../webpack://unity-builder/./node_modules/combined-stream/lib/combined_stream.js","../webpack://unity-builder/./node_modules/concat-map/index.js","../webpack://unity-builder/./node_modules/core-util-is/lib/util.js","../webpack://unity-builder/./node_modules/cssom/lib/CSSDocumentRule.js","../webpack://unity-builder/./node_modules/cssom/lib/CSSFontFaceRule.js","../webpack://unity-builder/./node_modules/cssom/lib/CSSHostRule.js","../webpack://unity-builder/./node_modules/cssom/lib/CSSImportRule.js","../webpack://unity-builder/./node_modules/cssom/lib/CSSKeyframeRule.js","../webpack://unity-builder/./node_modules/cssom/lib/CSSKeyframesRule.js","../webpack://unity-builder/./node_modules/cssom/lib/CSSMediaRule.js","../webpack://unity-builder/./node_modules/cssom/lib/CSSRule.js","../webpack://unity-builder/./node_modules/cssom/lib/CSSStyleDeclaration.js","../webpack://unity-builder/./node_modules/cssom/lib/CSSStyleRule.js","../webpack://unity-builder/./node_modules/cssom/lib/CSSStyleSheet.js","../webpack://unity-builder/./node_modules/cssom/lib/CSSSupportsRule.js","../webpack://unity-builder/./node_modules/cssom/lib/CSSValue.js","../webpack://unity-builder/./node_modules/cssom/lib/CSSValueExpression.js","../webpack://unity-builder/./node_modules/cssom/lib/MatcherList.js","../webpack://unity-builder/./node_modules/cssom/lib/MediaList.js","../webpack://unity-builder/./node_modules/cssom/lib/StyleSheet.js","../webpack://unity-builder/./node_modules/cssom/lib/clone.js","../webpack://unity-builder/./node_modules/cssom/lib/index.js","../webpack://unity-builder/./node_modules/cssom/lib/parse.js","../webpack://unity-builder/./node_modules/cssstyle/lib/CSSStyleDeclaration.js","../webpack://unity-builder/./node_modules/cssstyle/lib/allExtraProperties.js","../webpack://unity-builder/./node_modules/cssstyle/lib/allProperties.js","../webpack://unity-builder/./node_modules/cssstyle/lib/allWebkitProperties.js","../webpack://unity-builder/./node_modules/cssstyle/lib/constants.js","../webpack://unity-builder/./node_modules/cssstyle/lib/implementedProperties.js","../webpack://unity-builder/./node_modules/cssstyle/lib/parsers.js","../webpack://unity-builder/./node_modules/cssstyle/lib/properties.js","../webpack://unity-builder/./node_modules/cssstyle/lib/utils/colorSpace.js","../webpack://unity-builder/./node_modules/cssstyle/lib/utils/getBasicPropertyDescriptor.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/CSSDocumentRule.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/CSSFontFaceRule.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/CSSHostRule.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/CSSImportRule.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/CSSKeyframeRule.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/CSSKeyframesRule.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/CSSMediaRule.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/CSSRule.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/CSSStyleDeclaration.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/CSSStyleRule.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/CSSStyleSheet.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/CSSSupportsRule.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/CSSValue.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/CSSValueExpression.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/MatcherList.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/MediaList.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/StyleSheet.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/clone.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/index.js","../webpack://unity-builder/./node_modules/cssstyle/node_modules/cssom/lib/parse.js","../webpack://unity-builder/./node_modules/data-urls/lib/parser.js","../webpack://unity-builder/./node_modules/data-urls/lib/utils.js","../webpack://unity-builder/./node_modules/decimal.js/decimal.js","../webpack://unity-builder/./node_modules/decompress-response/index.js","../webpack://unity-builder/./node_modules/deepmerge/dist/cjs.js","../webpack://unity-builder/./node_modules/defer-to-connect/dist/index.js","../webpack://unity-builder/./node_modules/delayed-stream/lib/delayed_stream.js","../webpack://unity-builder/./node_modules/depd/index.js","../webpack://unity-builder/./node_modules/domexception/lib/DOMException-impl.js","../webpack://unity-builder/./node_modules/domexception/lib/DOMException.js","../webpack://unity-builder/./node_modules/domexception/lib/utils.js","../webpack://unity-builder/./node_modules/domexception/node_modules/webidl-conversions/lib/index.js","../webpack://unity-builder/./node_modules/domexception/webidl2js-wrapper.js","../webpack://unity-builder/./node_modules/duplexer3/index.js","../webpack://unity-builder/./node_modules/ecc-jsbn/index.js","../webpack://unity-builder/./node_modules/ecc-jsbn/lib/ec.js","../webpack://unity-builder/./node_modules/ecc-jsbn/lib/sec.js","../webpack://unity-builder/./node_modules/end-of-stream/index.js","../webpack://unity-builder/./node_modules/extend/index.js","../webpack://unity-builder/./node_modules/extsprintf/lib/extsprintf.js","../webpack://unity-builder/./node_modules/fast-deep-equal/index.js","../webpack://unity-builder/./node_modules/fast-json-stable-stringify/index.js","../webpack://unity-builder/./node_modules/forever-agent/index.js","../webpack://unity-builder/./node_modules/fs.realpath/index.js","../webpack://unity-builder/./node_modules/fs.realpath/old.js","../webpack://unity-builder/./node_modules/function-bind/implementation.js","../webpack://unity-builder/./node_modules/function-bind/index.js","../webpack://unity-builder/./node_modules/get-intrinsic/index.js","../webpack://unity-builder/./node_modules/get-stream/buffer-stream.js","../webpack://unity-builder/./node_modules/get-stream/index.js","../webpack://unity-builder/./node_modules/glob/common.js","../webpack://unity-builder/./node_modules/glob/glob.js","../webpack://unity-builder/./node_modules/glob/sync.js","../webpack://unity-builder/./node_modules/got/node_modules/p-cancelable/index.js","../webpack://unity-builder/./node_modules/got/source/as-promise.js","../webpack://unity-builder/./node_modules/got/source/as-stream.js","../webpack://unity-builder/./node_modules/got/source/create.js","../webpack://unity-builder/./node_modules/got/source/errors.js","../webpack://unity-builder/./node_modules/got/source/get-response.js","../webpack://unity-builder/./node_modules/got/source/index.js","../webpack://unity-builder/./node_modules/got/source/known-hook-events.js","../webpack://unity-builder/./node_modules/got/source/merge.js","../webpack://unity-builder/./node_modules/got/source/normalize-arguments.js","../webpack://unity-builder/./node_modules/got/source/progress.js","../webpack://unity-builder/./node_modules/got/source/request-as-event-emitter.js","../webpack://unity-builder/./node_modules/got/source/utils/deep-freeze.js","../webpack://unity-builder/./node_modules/got/source/utils/get-body-size.js","../webpack://unity-builder/./node_modules/got/source/utils/is-form-data.js","../webpack://unity-builder/./node_modules/got/source/utils/timed-out.js","../webpack://unity-builder/./node_modules/got/source/utils/url-to-options.js","../webpack://unity-builder/./node_modules/har-schema/lib/index.js","../webpack://unity-builder/./node_modules/har-validator/lib/error.js","../webpack://unity-builder/./node_modules/har-validator/lib/promise.js","../webpack://unity-builder/./node_modules/has-symbols/index.js","../webpack://unity-builder/./node_modules/has-symbols/shams.js","../webpack://unity-builder/./node_modules/has/src/index.js","../webpack://unity-builder/./node_modules/html-encoding-sniffer/lib/html-encoding-sniffer.js","../webpack://unity-builder/./node_modules/http-cache-semantics/index.js","../webpack://unity-builder/./node_modules/http-signature/lib/index.js","../webpack://unity-builder/./node_modules/http-signature/lib/parser.js","../webpack://unity-builder/./node_modules/http-signature/lib/signer.js","../webpack://unity-builder/./node_modules/http-signature/lib/utils.js","../webpack://unity-builder/./node_modules/http-signature/lib/verify.js","../webpack://unity-builder/./node_modules/iconv-lite/encodings/dbcs-codec.js","../webpack://unity-builder/./node_modules/iconv-lite/encodings/dbcs-data.js","../webpack://unity-builder/./node_modules/iconv-lite/encodings/index.js","../webpack://unity-builder/./node_modules/iconv-lite/encodings/internal.js","../webpack://unity-builder/./node_modules/iconv-lite/encodings/sbcs-codec.js","../webpack://unity-builder/./node_modules/iconv-lite/encodings/sbcs-data-generated.js","../webpack://unity-builder/./node_modules/iconv-lite/encodings/sbcs-data.js","../webpack://unity-builder/./node_modules/iconv-lite/encodings/utf16.js","../webpack://unity-builder/./node_modules/iconv-lite/encodings/utf7.js","../webpack://unity-builder/./node_modules/iconv-lite/lib/bom-handling.js","../webpack://unity-builder/./node_modules/iconv-lite/lib/extend-node.js","../webpack://unity-builder/./node_modules/iconv-lite/lib/index.js","../webpack://unity-builder/./node_modules/iconv-lite/lib/streams.js","../webpack://unity-builder/./node_modules/indent-string/index.js","../webpack://unity-builder/./node_modules/inflight/inflight.js","../webpack://unity-builder/./node_modules/inherits/inherits.js","../webpack://unity-builder/./node_modules/inherits/inherits_browser.js","../webpack://unity-builder/./node_modules/is-potential-custom-element-name/index.js","../webpack://unity-builder/./node_modules/is-typedarray/index.js","../webpack://unity-builder/./node_modules/isomorphic-ws/node.js","../webpack://unity-builder/./node_modules/isstream/isstream.js","../webpack://unity-builder/./node_modules/jmespath/jmespath.js","../webpack://unity-builder/./node_modules/jose/lib/errors.js","../webpack://unity-builder/./node_modules/jose/lib/help/asn1/algorithm_identifier.js","../webpack://unity-builder/./node_modules/jose/lib/help/asn1/ec_private_key.js","../webpack://unity-builder/./node_modules/jose/lib/help/asn1/index.js","../webpack://unity-builder/./node_modules/jose/lib/help/asn1/oids.js","../webpack://unity-builder/./node_modules/jose/lib/help/asn1/one_asymmetric_key.js","../webpack://unity-builder/./node_modules/jose/lib/help/asn1/private_key.js","../webpack://unity-builder/./node_modules/jose/lib/help/asn1/private_key_info.js","../webpack://unity-builder/./node_modules/jose/lib/help/asn1/public_key_info.js","../webpack://unity-builder/./node_modules/jose/lib/help/asn1/rsa_private_key.js","../webpack://unity-builder/./node_modules/jose/lib/help/asn1/rsa_public_key.js","../webpack://unity-builder/./node_modules/jose/lib/help/base64url.js","../webpack://unity-builder/./node_modules/jose/lib/help/consts.js","../webpack://unity-builder/./node_modules/jose/lib/help/deep_clone.js","../webpack://unity-builder/./node_modules/jose/lib/help/ecdsa_signatures.js","../webpack://unity-builder/./node_modules/jose/lib/help/epoch.js","../webpack://unity-builder/./node_modules/jose/lib/help/generate_iv.js","../webpack://unity-builder/./node_modules/jose/lib/help/get_key.js","../webpack://unity-builder/./node_modules/jose/lib/help/is_disjoint.js","../webpack://unity-builder/./node_modules/jose/lib/help/is_object.js","../webpack://unity-builder/./node_modules/jose/lib/help/key_object.js","../webpack://unity-builder/./node_modules/jose/lib/help/key_utils.js","../webpack://unity-builder/./node_modules/jose/lib/help/node_alg.js","../webpack://unity-builder/./node_modules/jose/lib/help/rsa_primes.js","../webpack://unity-builder/./node_modules/jose/lib/help/runtime_support.js","../webpack://unity-builder/./node_modules/jose/lib/help/secs.js","../webpack://unity-builder/./node_modules/jose/lib/help/timing_safe_equal.js","../webpack://unity-builder/./node_modules/jose/lib/help/uint64be.js","../webpack://unity-builder/./node_modules/jose/lib/help/validate_crit.js","../webpack://unity-builder/./node_modules/jose/lib/index.js","../webpack://unity-builder/./node_modules/jose/lib/jwa/aes_cbc_hmac_sha2.js","../webpack://unity-builder/./node_modules/jose/lib/jwa/aes_gcm.js","../webpack://unity-builder/./node_modules/jose/lib/jwa/aes_gcm_kw.js","../webpack://unity-builder/./node_modules/jose/lib/jwa/aes_kw.js","../webpack://unity-builder/./node_modules/jose/lib/jwa/ecdh/compute_secret.js","../webpack://unity-builder/./node_modules/jose/lib/jwa/ecdh/derive.js","../webpack://unity-builder/./node_modules/jose/lib/jwa/ecdh/dir.js","../webpack://unity-builder/./node_modules/jose/lib/jwa/ecdh/kw.js","../webpack://unity-builder/./node_modules/jose/lib/jwa/ecdsa.js","../webpack://unity-builder/./node_modules/jose/lib/jwa/eddsa.js","../webpack://unity-builder/./node_modules/jose/lib/jwa/hmac.js","../webpack://unity-builder/./node_modules/jose/lib/jwa/index.js","../webpack://unity-builder/./node_modules/jose/lib/jwa/none.js","../webpack://unity-builder/./node_modules/jose/lib/jwa/pbes2.js","../webpack://unity-builder/./node_modules/jose/lib/jwa/rsaes.js","../webpack://unity-builder/./node_modules/jose/lib/jwa/rsassa.js","../webpack://unity-builder/./node_modules/jose/lib/jwa/rsassa_pss.js","../webpack://unity-builder/./node_modules/jose/lib/jwe/decrypt.js","../webpack://unity-builder/./node_modules/jose/lib/jwe/encrypt.js","../webpack://unity-builder/./node_modules/jose/lib/jwe/generate_cek.js","../webpack://unity-builder/./node_modules/jose/lib/jwe/index.js","../webpack://unity-builder/./node_modules/jose/lib/jwe/serializers.js","../webpack://unity-builder/./node_modules/jose/lib/jwe/validate_headers.js","../webpack://unity-builder/./node_modules/jose/lib/jwk/generate.js","../webpack://unity-builder/./node_modules/jose/lib/jwk/import.js","../webpack://unity-builder/./node_modules/jose/lib/jwk/index.js","../webpack://unity-builder/./node_modules/jose/lib/jwk/key/base.js","../webpack://unity-builder/./node_modules/jose/lib/jwk/key/ec.js","../webpack://unity-builder/./node_modules/jose/lib/jwk/key/embedded.jwk.js","../webpack://unity-builder/./node_modules/jose/lib/jwk/key/embedded.x5c.js","../webpack://unity-builder/./node_modules/jose/lib/jwk/key/none.js","../webpack://unity-builder/./node_modules/jose/lib/jwk/key/oct.js","../webpack://unity-builder/./node_modules/jose/lib/jwk/key/okp.js","../webpack://unity-builder/./node_modules/jose/lib/jwk/key/rsa.js","../webpack://unity-builder/./node_modules/jose/lib/jwk/key/secp256k1_crv.js","../webpack://unity-builder/./node_modules/jose/lib/jwk/thumbprint.js","../webpack://unity-builder/./node_modules/jose/lib/jwks/index.js","../webpack://unity-builder/./node_modules/jose/lib/jwks/keystore.js","../webpack://unity-builder/./node_modules/jose/lib/jws/index.js","../webpack://unity-builder/./node_modules/jose/lib/jws/serializers.js","../webpack://unity-builder/./node_modules/jose/lib/jws/sign.js","../webpack://unity-builder/./node_modules/jose/lib/jws/verify.js","../webpack://unity-builder/./node_modules/jose/lib/jwt/decode.js","../webpack://unity-builder/./node_modules/jose/lib/jwt/index.js","../webpack://unity-builder/./node_modules/jose/lib/jwt/profiles.js","../webpack://unity-builder/./node_modules/jose/lib/jwt/shared_validations.js","../webpack://unity-builder/./node_modules/jose/lib/jwt/sign.js","../webpack://unity-builder/./node_modules/jose/lib/jwt/verify.js","../webpack://unity-builder/./node_modules/jose/lib/registry/ec_curves.js","../webpack://unity-builder/./node_modules/jose/lib/registry/ecdh_derive_lengths.js","../webpack://unity-builder/./node_modules/jose/lib/registry/index.js","../webpack://unity-builder/./node_modules/jose/lib/registry/iv_lengths.js","../webpack://unity-builder/./node_modules/jose/lib/registry/jwa.js","../webpack://unity-builder/./node_modules/jose/lib/registry/jwk.js","../webpack://unity-builder/./node_modules/jose/lib/registry/key_lengths.js","../webpack://unity-builder/./node_modules/jose/lib/registry/okp_curves.js","../webpack://unity-builder/./node_modules/js-yaml/index.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/common.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/dumper.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/exception.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/loader.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/mark.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/schema.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/schema/core.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/schema/default_full.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/schema/default_safe.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/schema/failsafe.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/schema/json.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/type.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/type/binary.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/type/bool.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/type/float.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/type/int.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/type/js/function.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/type/js/regexp.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/type/js/undefined.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/type/map.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/type/merge.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/type/null.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/type/omap.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/type/pairs.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/type/seq.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/type/set.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/type/str.js","../webpack://unity-builder/./node_modules/js-yaml/lib/js-yaml/type/timestamp.js","../webpack://unity-builder/./node_modules/jsbn/index.js","../webpack://unity-builder/./node_modules/jsdom/lib/api.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/browser/Window.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/browser/default-stylesheet.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/browser/not-implemented.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/browser/parser/html.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/browser/parser/index.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/browser/parser/xml.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/browser/resources/async-resource-queue.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/browser/resources/no-op-resource-loader.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/browser/resources/per-document-resource-loader.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/browser/resources/request-manager.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/browser/resources/resource-loader.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/browser/resources/resource-queue.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/level2/style.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/level3/xpath.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/aborting/AbortController-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/aborting/AbortSignal-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/attributes.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/attributes/Attr-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/attributes/NamedNodeMap-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/constraint-validation/DefaultConstraintValidation-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/constraint-validation/ValidityState-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/cssom/StyleSheetList-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/custom-elements/CustomElementRegistry-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/documents.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/domparsing/DOMParser-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/domparsing/InnerHTML-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/domparsing/XMLSerializer-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/domparsing/parse5-adapter-serialization.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/domparsing/serialization.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/CloseEvent-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/CompositionEvent-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/CustomEvent-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/ErrorEvent-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/Event-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/EventModifierMixin-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/FocusEvent-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/HashChangeEvent-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/InputEvent-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/KeyboardEvent-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/MessageEvent-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/MouseEvent-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/PageTransitionEvent-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/PopStateEvent-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/ProgressEvent-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/StorageEvent-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/TouchEvent-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/UIEvent-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/events/WheelEvent-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/fetch/Headers-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/fetch/header-list.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/fetch/header-types.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/file-api/Blob-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/file-api/File-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/file-api/FileList-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/file-api/FileReader-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/AbortController.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/AbortSignal.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/AbstractRange.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/AddEventListenerOptions.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/AssignedNodesOptions.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/Attr.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/BarProp.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/BinaryType.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/Blob.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/BlobCallback.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/BlobPropertyBag.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/CDATASection.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/CharacterData.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/CloseEvent.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/CloseEventInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/Comment.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/CompositionEvent.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/CompositionEventInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/CustomElementConstructor.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/CustomElementRegistry.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/CustomEvent.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/CustomEventInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/DOMImplementation.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/DOMParser.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/DOMStringMap.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/DOMTokenList.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/Document.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/DocumentFragment.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/DocumentType.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/Element.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/ElementCreationOptions.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/ElementDefinitionOptions.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/EndingType.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/ErrorEvent.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/ErrorEventInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/Event.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/EventHandlerNonNull.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/EventInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/EventListener.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/EventListenerOptions.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/EventModifierInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/External.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/File.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/FileList.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/FilePropertyBag.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/FileReader.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/FocusEvent.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/FocusEventInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/FormData.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/Function.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/GetRootNodeOptions.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLAnchorElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLAreaElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLAudioElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLBRElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLBaseElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLBodyElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLButtonElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLCanvasElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLCollection.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLDListElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLDataElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLDataListElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLDetailsElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLDialogElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLDirectoryElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLDivElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLEmbedElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLFieldSetElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLFontElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLFormElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameSetElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLHRElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLHeadElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLHeadingElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLHtmlElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLIFrameElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLImageElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLInputElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLLIElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLLabelElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLLegendElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLLinkElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLMapElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLMarqueeElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLMediaElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLMenuElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLMetaElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLMeterElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLModElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLOListElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLObjectElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLOptGroupElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLOptionElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLOptionsCollection.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLOutputElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLParagraphElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLParamElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLPictureElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLPreElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLProgressElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLQuoteElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLScriptElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLSelectElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLSlotElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLSourceElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLSpanElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLStyleElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLTableCaptionElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLTableCellElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLTableColElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLTableElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLTableRowElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLTableSectionElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLTemplateElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLTextAreaElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLTimeElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLTitleElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLTrackElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLUListElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLUnknownElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HTMLVideoElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HashChangeEvent.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/HashChangeEventInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/Headers.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/History.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/InputEvent.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/InputEventInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/KeyboardEvent.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/KeyboardEventInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/Location.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/MessageEvent.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/MessageEventInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/MimeType.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/MimeTypeArray.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/MouseEvent.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/MouseEventInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/MutationCallback.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/MutationObserver.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/MutationObserverInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/MutationRecord.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/NamedNodeMap.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/Navigator.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/Node.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/NodeFilter.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/NodeIterator.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/NodeList.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/OnBeforeUnloadEventHandlerNonNull.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/OnErrorEventHandlerNonNull.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/PageTransitionEvent.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/PageTransitionEventInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/Performance.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/Plugin.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/PluginArray.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/PopStateEvent.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/PopStateEventInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/ProcessingInstruction.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/ProgressEvent.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/ProgressEventInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/Range.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/SVGAnimatedString.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/SVGElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/SVGGraphicsElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/SVGNumber.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/SVGSVGElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/SVGStringList.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/SVGTitleElement.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/Screen.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/Selection.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/SelectionMode.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/ShadowRoot.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/ShadowRootInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/ShadowRootMode.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/StaticRange.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/StaticRangeInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/Storage.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/StorageEvent.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/StorageEventInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/StyleSheetList.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/SupportedType.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/Text.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/TextTrackKind.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/TouchEvent.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/TouchEventInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/TreeWalker.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/UIEvent.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/UIEventInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/ValidityState.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/WebSocket.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/WheelEvent.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/WheelEventInit.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/XMLDocument.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequest.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequestEventTarget.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequestResponseType.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequestUpload.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/XMLSerializer.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/generated/utils.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/binary-data.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/create-element.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/create-event-accessor.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/custom-elements.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/dates-and-times.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/details.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/document-base-url.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/events.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/focusing.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/form-controls.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/html-constructor.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/internal-constants.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/iterable-weak-set.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/json.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/namespaces.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/node.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/number-and-date-inputs.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/ordered-set.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/selectors.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/shadow-dom.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/strings.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/style-rules.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/stylesheets.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/svg/render.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/text.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/traversal.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/validate-names.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/helpers/wrap-cookie-jar-for-request.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/hr-time/Performance-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/interfaces.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/mutation-observer/MutationObserver-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/mutation-observer/MutationRecord-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/named-properties-window.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/navigator/MimeType-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/navigator/MimeTypeArray-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/navigator/Navigator-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/navigator/NavigatorConcurrentHardware-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/navigator/NavigatorCookies-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/navigator/NavigatorID-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/navigator/NavigatorLanguage-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/navigator/NavigatorOnLine-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/navigator/NavigatorPlugins-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/navigator/Plugin-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/navigator/PluginArray-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/node-document-position.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/node-type.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/node.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/CDATASection-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/CharacterData-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/ChildNode-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/Comment-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/DOMImplementation-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/DOMStringMap-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/DOMTokenList-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/DocumentFragment-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/DocumentOrShadowRoot-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/DocumentType-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/Element-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/ElementCSSInlineStyle-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/GlobalEventHandlers-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLAnchorElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLAreaElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLAudioElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLBRElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLBaseElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLBodyElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLButtonElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLCollection-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLDListElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLDataElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLDataListElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLDetailsElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLDialogElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLDirectoryElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLDivElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLEmbedElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLFieldSetElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLFontElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLFormElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLFrameElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLFrameSetElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLHRElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLHeadElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLHeadingElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLHtmlElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLHyperlinkElementUtils-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLIFrameElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLImageElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLInputElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLLIElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLLabelElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLLegendElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLLinkElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLMapElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLMarqueeElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLMediaElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLMenuElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLMetaElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLMeterElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLModElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLOListElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLObjectElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptGroupElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptionElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptionsCollection-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLOrSVGElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLOutputElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLParagraphElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLParamElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLPictureElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLPreElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLProgressElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLQuoteElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLScriptElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLSelectElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLSlotElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLSourceElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLSpanElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLStyleElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableCaptionElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableCellElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableColElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableRowElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableSectionElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLTemplateElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLTextAreaElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLTimeElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLTitleElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLTrackElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLUListElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLUnknownElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/HTMLVideoElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/NodeList-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/NonDocumentTypeChildNode-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/NonElementParentNode-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/ParentNode-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/ProcessingInstruction-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/SVGElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/SVGGraphicsElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/SVGSVGElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/SVGTests-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/SVGTitleElement-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/ShadowRoot-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/Slotable-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/Text-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/WindowEventHandlers-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/nodes/XMLDocument-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/post-message.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/range/AbstractRange-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/range/Range-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/range/StaticRange-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/range/boundary-point.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/selection/Selection-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/svg/SVGAnimatedString-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/svg/SVGListBase.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/svg/SVGNumber-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/svg/SVGStringList-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/traversal/NodeIterator-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/traversal/TreeWalker-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/traversal/helpers.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/websockets/WebSocket-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/webstorage/Storage-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/window/BarProp-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/window/External-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/window/History-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/window/Location-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/window/Screen-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/window/SessionHistory.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/window/navigation.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/xhr/FormData-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequestEventTarget-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequestUpload-impl.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/named-properties-tracker.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/utils.js","../webpack://unity-builder/./node_modules/jsdom/lib/jsdom/virtual-console.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/tough-cookie/lib/cookie.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/tough-cookie/lib/memstore.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/tough-cookie/lib/pathMatch.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/tough-cookie/lib/permuteDomain.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/tough-cookie/lib/pubsuffix-psl.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/tough-cookie/lib/store.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/tough-cookie/lib/version.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/ws/index.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/ws/lib/buffer-util.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/ws/lib/constants.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/ws/lib/event-target.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/ws/lib/extension.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/ws/lib/limiter.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/ws/lib/permessage-deflate.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/ws/lib/receiver.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/ws/lib/sender.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/ws/lib/stream.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/ws/lib/validation.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/ws/lib/websocket-server.js","../webpack://unity-builder/./node_modules/jsdom/node_modules/ws/lib/websocket.js","../webpack://unity-builder/./node_modules/json-buffer/index.js","../webpack://unity-builder/./node_modules/json-schema-traverse/index.js","../webpack://unity-builder/./node_modules/json-schema/lib/validate.js","../webpack://unity-builder/./node_modules/json-stream/lib/json-stream.js","../webpack://unity-builder/./node_modules/json-stringify-safe/stringify.js","../webpack://unity-builder/./node_modules/jsonpath-plus/dist/index-umd.js","../webpack://unity-builder/./node_modules/jsprim/lib/jsprim.js","../webpack://unity-builder/./node_modules/keyv/src/index.js","../webpack://unity-builder/./node_modules/kubernetes-client/backends/request/auth-providers/cmd.js","../webpack://unity-builder/./node_modules/kubernetes-client/backends/request/auth-providers/openid.js","../webpack://unity-builder/./node_modules/kubernetes-client/backends/request/client.js","../webpack://unity-builder/./node_modules/kubernetes-client/backends/request/config.js","../webpack://unity-builder/./node_modules/kubernetes-client/backends/request/index.js","../webpack://unity-builder/./node_modules/kubernetes-client/lib/alias.js","../webpack://unity-builder/./node_modules/kubernetes-client/lib/config.js","../webpack://unity-builder/./node_modules/kubernetes-client/lib/index.js","../webpack://unity-builder/./node_modules/kubernetes-client/lib/swagger-client.js","../webpack://unity-builder/./node_modules/kubernetes-client/node_modules/ws/index.js","../webpack://unity-builder/./node_modules/kubernetes-client/node_modules/ws/lib/buffer-util.js","../webpack://unity-builder/./node_modules/kubernetes-client/node_modules/ws/lib/constants.js","../webpack://unity-builder/./node_modules/kubernetes-client/node_modules/ws/lib/event-target.js","../webpack://unity-builder/./node_modules/kubernetes-client/node_modules/ws/lib/extension.js","../webpack://unity-builder/./node_modules/kubernetes-client/node_modules/ws/lib/limiter.js","../webpack://unity-builder/./node_modules/kubernetes-client/node_modules/ws/lib/permessage-deflate.js","../webpack://unity-builder/./node_modules/kubernetes-client/node_modules/ws/lib/receiver.js","../webpack://unity-builder/./node_modules/kubernetes-client/node_modules/ws/lib/sender.js","../webpack://unity-builder/./node_modules/kubernetes-client/node_modules/ws/lib/stream.js","../webpack://unity-builder/./node_modules/kubernetes-client/node_modules/ws/lib/validation.js","../webpack://unity-builder/./node_modules/kubernetes-client/node_modules/ws/lib/websocket-server.js","../webpack://unity-builder/./node_modules/kubernetes-client/node_modules/ws/lib/websocket.js","../webpack://unity-builder/./node_modules/lodash/_DataView.js","../webpack://unity-builder/./node_modules/lodash/_Hash.js","../webpack://unity-builder/./node_modules/lodash/_ListCache.js","../webpack://unity-builder/./node_modules/lodash/_Map.js","../webpack://unity-builder/./node_modules/lodash/_MapCache.js","../webpack://unity-builder/./node_modules/lodash/_Promise.js","../webpack://unity-builder/./node_modules/lodash/_Set.js","../webpack://unity-builder/./node_modules/lodash/_SetCache.js","../webpack://unity-builder/./node_modules/lodash/_Stack.js","../webpack://unity-builder/./node_modules/lodash/_Symbol.js","../webpack://unity-builder/./node_modules/lodash/_Uint8Array.js","../webpack://unity-builder/./node_modules/lodash/_WeakMap.js","../webpack://unity-builder/./node_modules/lodash/_apply.js","../webpack://unity-builder/./node_modules/lodash/_arrayFilter.js","../webpack://unity-builder/./node_modules/lodash/_arrayLikeKeys.js","../webpack://unity-builder/./node_modules/lodash/_arrayMap.js","../webpack://unity-builder/./node_modules/lodash/_arrayPush.js","../webpack://unity-builder/./node_modules/lodash/_arraySome.js","../webpack://unity-builder/./node_modules/lodash/_assocIndexOf.js","../webpack://unity-builder/./node_modules/lodash/_baseEach.js","../webpack://unity-builder/./node_modules/lodash/_baseFlatten.js","../webpack://unity-builder/./node_modules/lodash/_baseFor.js","../webpack://unity-builder/./node_modules/lodash/_baseForOwn.js","../webpack://unity-builder/./node_modules/lodash/_baseGet.js","../webpack://unity-builder/./node_modules/lodash/_baseGetAllKeys.js","../webpack://unity-builder/./node_modules/lodash/_baseGetTag.js","../webpack://unity-builder/./node_modules/lodash/_baseHasIn.js","../webpack://unity-builder/./node_modules/lodash/_baseIsArguments.js","../webpack://unity-builder/./node_modules/lodash/_baseIsEqual.js","../webpack://unity-builder/./node_modules/lodash/_baseIsEqualDeep.js","../webpack://unity-builder/./node_modules/lodash/_baseIsMatch.js","../webpack://unity-builder/./node_modules/lodash/_baseIsNative.js","../webpack://unity-builder/./node_modules/lodash/_baseIsTypedArray.js","../webpack://unity-builder/./node_modules/lodash/_baseIteratee.js","../webpack://unity-builder/./node_modules/lodash/_baseKeys.js","../webpack://unity-builder/./node_modules/lodash/_baseMap.js","../webpack://unity-builder/./node_modules/lodash/_baseMatches.js","../webpack://unity-builder/./node_modules/lodash/_baseMatchesProperty.js","../webpack://unity-builder/./node_modules/lodash/_baseOrderBy.js","../webpack://unity-builder/./node_modules/lodash/_baseProperty.js","../webpack://unity-builder/./node_modules/lodash/_basePropertyDeep.js","../webpack://unity-builder/./node_modules/lodash/_baseRest.js","../webpack://unity-builder/./node_modules/lodash/_baseSetToString.js","../webpack://unity-builder/./node_modules/lodash/_baseSortBy.js","../webpack://unity-builder/./node_modules/lodash/_baseTimes.js","../webpack://unity-builder/./node_modules/lodash/_baseToString.js","../webpack://unity-builder/./node_modules/lodash/_baseUnary.js","../webpack://unity-builder/./node_modules/lodash/_cacheHas.js","../webpack://unity-builder/./node_modules/lodash/_castPath.js","../webpack://unity-builder/./node_modules/lodash/_compareAscending.js","../webpack://unity-builder/./node_modules/lodash/_compareMultiple.js","../webpack://unity-builder/./node_modules/lodash/_coreJsData.js","../webpack://unity-builder/./node_modules/lodash/_createBaseEach.js","../webpack://unity-builder/./node_modules/lodash/_createBaseFor.js","../webpack://unity-builder/./node_modules/lodash/_defineProperty.js","../webpack://unity-builder/./node_modules/lodash/_equalArrays.js","../webpack://unity-builder/./node_modules/lodash/_equalByTag.js","../webpack://unity-builder/./node_modules/lodash/_equalObjects.js","../webpack://unity-builder/./node_modules/lodash/_freeGlobal.js","../webpack://unity-builder/./node_modules/lodash/_getAllKeys.js","../webpack://unity-builder/./node_modules/lodash/_getMapData.js","../webpack://unity-builder/./node_modules/lodash/_getMatchData.js","../webpack://unity-builder/./node_modules/lodash/_getNative.js","../webpack://unity-builder/./node_modules/lodash/_getRawTag.js","../webpack://unity-builder/./node_modules/lodash/_getSymbols.js","../webpack://unity-builder/./node_modules/lodash/_getTag.js","../webpack://unity-builder/./node_modules/lodash/_getValue.js","../webpack://unity-builder/./node_modules/lodash/_hasPath.js","../webpack://unity-builder/./node_modules/lodash/_hashClear.js","../webpack://unity-builder/./node_modules/lodash/_hashDelete.js","../webpack://unity-builder/./node_modules/lodash/_hashGet.js","../webpack://unity-builder/./node_modules/lodash/_hashHas.js","../webpack://unity-builder/./node_modules/lodash/_hashSet.js","../webpack://unity-builder/./node_modules/lodash/_isFlattenable.js","../webpack://unity-builder/./node_modules/lodash/_isIndex.js","../webpack://unity-builder/./node_modules/lodash/_isIterateeCall.js","../webpack://unity-builder/./node_modules/lodash/_isKey.js","../webpack://unity-builder/./node_modules/lodash/_isKeyable.js","../webpack://unity-builder/./node_modules/lodash/_isMasked.js","../webpack://unity-builder/./node_modules/lodash/_isPrototype.js","../webpack://unity-builder/./node_modules/lodash/_isStrictComparable.js","../webpack://unity-builder/./node_modules/lodash/_listCacheClear.js","../webpack://unity-builder/./node_modules/lodash/_listCacheDelete.js","../webpack://unity-builder/./node_modules/lodash/_listCacheGet.js","../webpack://unity-builder/./node_modules/lodash/_listCacheHas.js","../webpack://unity-builder/./node_modules/lodash/_listCacheSet.js","../webpack://unity-builder/./node_modules/lodash/_mapCacheClear.js","../webpack://unity-builder/./node_modules/lodash/_mapCacheDelete.js","../webpack://unity-builder/./node_modules/lodash/_mapCacheGet.js","../webpack://unity-builder/./node_modules/lodash/_mapCacheHas.js","../webpack://unity-builder/./node_modules/lodash/_mapCacheSet.js","../webpack://unity-builder/./node_modules/lodash/_mapToArray.js","../webpack://unity-builder/./node_modules/lodash/_matchesStrictComparable.js","../webpack://unity-builder/./node_modules/lodash/_memoizeCapped.js","../webpack://unity-builder/./node_modules/lodash/_nativeCreate.js","../webpack://unity-builder/./node_modules/lodash/_nativeKeys.js","../webpack://unity-builder/./node_modules/lodash/_nodeUtil.js","../webpack://unity-builder/./node_modules/lodash/_objectToString.js","../webpack://unity-builder/./node_modules/lodash/_overArg.js","../webpack://unity-builder/./node_modules/lodash/_overRest.js","../webpack://unity-builder/./node_modules/lodash/_root.js","../webpack://unity-builder/./node_modules/lodash/_setCacheAdd.js","../webpack://unity-builder/./node_modules/lodash/_setCacheHas.js","../webpack://unity-builder/./node_modules/lodash/_setToArray.js","../webpack://unity-builder/./node_modules/lodash/_setToString.js","../webpack://unity-builder/./node_modules/lodash/_shortOut.js","../webpack://unity-builder/./node_modules/lodash/_stackClear.js","../webpack://unity-builder/./node_modules/lodash/_stackDelete.js","../webpack://unity-builder/./node_modules/lodash/_stackGet.js","../webpack://unity-builder/./node_modules/lodash/_stackHas.js","../webpack://unity-builder/./node_modules/lodash/_stackSet.js","../webpack://unity-builder/./node_modules/lodash/_stringToPath.js","../webpack://unity-builder/./node_modules/lodash/_toKey.js","../webpack://unity-builder/./node_modules/lodash/_toSource.js","../webpack://unity-builder/./node_modules/lodash/constant.js","../webpack://unity-builder/./node_modules/lodash/eq.js","../webpack://unity-builder/./node_modules/lodash/get.js","../webpack://unity-builder/./node_modules/lodash/hasIn.js","../webpack://unity-builder/./node_modules/lodash/identity.js","../webpack://unity-builder/./node_modules/lodash/isArguments.js","../webpack://unity-builder/./node_modules/lodash/isArray.js","../webpack://unity-builder/./node_modules/lodash/isArrayLike.js","../webpack://unity-builder/./node_modules/lodash/isBuffer.js","../webpack://unity-builder/./node_modules/lodash/isFunction.js","../webpack://unity-builder/./node_modules/lodash/isLength.js","../webpack://unity-builder/./node_modules/lodash/isObject.js","../webpack://unity-builder/./node_modules/lodash/isObjectLike.js","../webpack://unity-builder/./node_modules/lodash/isString.js","../webpack://unity-builder/./node_modules/lodash/isSymbol.js","../webpack://unity-builder/./node_modules/lodash/isTypedArray.js","../webpack://unity-builder/./node_modules/lodash/isUndefined.js","../webpack://unity-builder/./node_modules/lodash/keys.js","../webpack://unity-builder/./node_modules/lodash/memoize.js","../webpack://unity-builder/./node_modules/lodash/property.js","../webpack://unity-builder/./node_modules/lodash/sortBy.js","../webpack://unity-builder/./node_modules/lodash/stubArray.js","../webpack://unity-builder/./node_modules/lodash/stubFalse.js","../webpack://unity-builder/./node_modules/lodash/toString.js","../webpack://unity-builder/./node_modules/lowercase-keys/index.js","../webpack://unity-builder/./node_modules/lru-cache/index.js","../webpack://unity-builder/./node_modules/make-error/index.js","../webpack://unity-builder/./node_modules/mime-db/index.js","../webpack://unity-builder/./node_modules/mime-types/index.js","../webpack://unity-builder/./node_modules/mimic-response/index.js","../webpack://unity-builder/./node_modules/minimatch/minimatch.js","../webpack://unity-builder/./node_modules/node-fetch/lib/index.js","../webpack://unity-builder/./node_modules/node-fetch/node_modules/tr46/index.js","../webpack://unity-builder/./node_modules/node-fetch/node_modules/webidl-conversions/lib/index.js","../webpack://unity-builder/./node_modules/node-fetch/node_modules/whatwg-url/lib/URL-impl.js","../webpack://unity-builder/./node_modules/node-fetch/node_modules/whatwg-url/lib/URL.js","../webpack://unity-builder/./node_modules/node-fetch/node_modules/whatwg-url/lib/public-api.js","../webpack://unity-builder/./node_modules/node-fetch/node_modules/whatwg-url/lib/url-state-machine.js","../webpack://unity-builder/./node_modules/node-fetch/node_modules/whatwg-url/lib/utils.js","../webpack://unity-builder/./node_modules/normalize-url/index.js","../webpack://unity-builder/./node_modules/nwsapi/src/nwsapi.js","../webpack://unity-builder/./node_modules/oauth-sign/index.js","../webpack://unity-builder/./node_modules/object-hash/index.js","../webpack://unity-builder/./node_modules/object-inspect/index.js","../webpack://unity-builder/./node_modules/object-inspect/util.inspect.js","../webpack://unity-builder/./node_modules/oidc-token-hash/lib/index.js","../webpack://unity-builder/./node_modules/oidc-token-hash/lib/shake256.js","../webpack://unity-builder/./node_modules/once/once.js","../webpack://unity-builder/./node_modules/openid-client/lib/client.js","../webpack://unity-builder/./node_modules/openid-client/lib/device_flow_handle.js","../webpack://unity-builder/./node_modules/openid-client/lib/errors.js","../webpack://unity-builder/./node_modules/openid-client/lib/helpers/assert.js","../webpack://unity-builder/./node_modules/openid-client/lib/helpers/client.js","../webpack://unity-builder/./node_modules/openid-client/lib/helpers/consts.js","../webpack://unity-builder/./node_modules/openid-client/lib/helpers/deep_clone.js","../webpack://unity-builder/./node_modules/openid-client/lib/helpers/defaults.js","../webpack://unity-builder/./node_modules/openid-client/lib/helpers/generators.js","../webpack://unity-builder/./node_modules/openid-client/lib/helpers/is_absolute_url.js","../webpack://unity-builder/./node_modules/openid-client/lib/helpers/is_plain_object.js","../webpack://unity-builder/./node_modules/openid-client/lib/helpers/merge.js","../webpack://unity-builder/./node_modules/openid-client/lib/helpers/pick.js","../webpack://unity-builder/./node_modules/openid-client/lib/helpers/process_response.js","../webpack://unity-builder/./node_modules/openid-client/lib/helpers/request.js","../webpack://unity-builder/./node_modules/openid-client/lib/helpers/unix_timestamp.js","../webpack://unity-builder/./node_modules/openid-client/lib/helpers/weak_cache.js","../webpack://unity-builder/./node_modules/openid-client/lib/helpers/webfinger_normalize.js","../webpack://unity-builder/./node_modules/openid-client/lib/index.js","../webpack://unity-builder/./node_modules/openid-client/lib/issuer.js","../webpack://unity-builder/./node_modules/openid-client/lib/issuer_registry.js","../webpack://unity-builder/./node_modules/openid-client/lib/passport_strategy.js","../webpack://unity-builder/./node_modules/openid-client/lib/token_set.js","../webpack://unity-builder/./node_modules/p-any/index.js","../webpack://unity-builder/./node_modules/p-cancelable/index.js","../webpack://unity-builder/./node_modules/p-some/index.js","../webpack://unity-builder/./node_modules/parse5/lib/common/doctype.js","../webpack://unity-builder/./node_modules/parse5/lib/common/error-codes.js","../webpack://unity-builder/./node_modules/parse5/lib/common/foreign-content.js","../webpack://unity-builder/./node_modules/parse5/lib/common/html.js","../webpack://unity-builder/./node_modules/parse5/lib/common/unicode.js","../webpack://unity-builder/./node_modules/parse5/lib/extensions/error-reporting/mixin-base.js","../webpack://unity-builder/./node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js","../webpack://unity-builder/./node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js","../webpack://unity-builder/./node_modules/parse5/lib/extensions/error-reporting/tokenizer-mixin.js","../webpack://unity-builder/./node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js","../webpack://unity-builder/./node_modules/parse5/lib/extensions/location-info/parser-mixin.js","../webpack://unity-builder/./node_modules/parse5/lib/extensions/location-info/tokenizer-mixin.js","../webpack://unity-builder/./node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js","../webpack://unity-builder/./node_modules/parse5/lib/index.js","../webpack://unity-builder/./node_modules/parse5/lib/parser/formatting-element-list.js","../webpack://unity-builder/./node_modules/parse5/lib/parser/index.js","../webpack://unity-builder/./node_modules/parse5/lib/parser/open-element-stack.js","../webpack://unity-builder/./node_modules/parse5/lib/serializer/index.js","../webpack://unity-builder/./node_modules/parse5/lib/tokenizer/index.js","../webpack://unity-builder/./node_modules/parse5/lib/tokenizer/named-entity-data.js","../webpack://unity-builder/./node_modules/parse5/lib/tokenizer/preprocessor.js","../webpack://unity-builder/./node_modules/parse5/lib/tree-adapters/default.js","../webpack://unity-builder/./node_modules/parse5/lib/utils/merge-options.js","../webpack://unity-builder/./node_modules/parse5/lib/utils/mixin.js","../webpack://unity-builder/./node_modules/path-is-absolute/index.js","../webpack://unity-builder/./node_modules/performance-now/lib/performance-now.js","../webpack://unity-builder/./node_modules/prepend-http/index.js","../webpack://unity-builder/./node_modules/psl/index.js","../webpack://unity-builder/./node_modules/pump/index.js","../webpack://unity-builder/./node_modules/qs/lib/formats.js","../webpack://unity-builder/./node_modules/qs/lib/index.js","../webpack://unity-builder/./node_modules/qs/lib/parse.js","../webpack://unity-builder/./node_modules/qs/lib/stringify.js","../webpack://unity-builder/./node_modules/qs/lib/utils.js","../webpack://unity-builder/./node_modules/request-promise-core/configure/request2.js","../webpack://unity-builder/./node_modules/request-promise-core/lib/errors.js","../webpack://unity-builder/./node_modules/request-promise-core/lib/plumbing.js","../webpack://unity-builder/./node_modules/request-promise-native/lib/rp.js","../webpack://unity-builder/./node_modules/request/index.js","../webpack://unity-builder/./node_modules/request/lib/auth.js","../webpack://unity-builder/./node_modules/request/lib/cookies.js","../webpack://unity-builder/./node_modules/request/lib/getProxyFromURI.js","../webpack://unity-builder/./node_modules/request/lib/har.js","../webpack://unity-builder/./node_modules/request/lib/hawk.js","../webpack://unity-builder/./node_modules/request/lib/helpers.js","../webpack://unity-builder/./node_modules/request/lib/multipart.js","../webpack://unity-builder/./node_modules/request/lib/oauth.js","../webpack://unity-builder/./node_modules/request/lib/querystring.js","../webpack://unity-builder/./node_modules/request/lib/redirect.js","../webpack://unity-builder/./node_modules/request/lib/tunnel.js","../webpack://unity-builder/./node_modules/request/node_modules/form-data/lib/form_data.js","../webpack://unity-builder/./node_modules/request/node_modules/form-data/lib/populate.js","../webpack://unity-builder/./node_modules/request/node_modules/qs/lib/formats.js","../webpack://unity-builder/./node_modules/request/node_modules/qs/lib/index.js","../webpack://unity-builder/./node_modules/request/node_modules/qs/lib/parse.js","../webpack://unity-builder/./node_modules/request/node_modules/qs/lib/stringify.js","../webpack://unity-builder/./node_modules/request/node_modules/qs/lib/utils.js","../webpack://unity-builder/./node_modules/request/node_modules/uuid/lib/bytesToUuid.js","../webpack://unity-builder/./node_modules/request/node_modules/uuid/lib/rng.js","../webpack://unity-builder/./node_modules/request/node_modules/uuid/v4.js","../webpack://unity-builder/./node_modules/request/request.js","../webpack://unity-builder/./node_modules/responselike/src/index.js","../webpack://unity-builder/./node_modules/safe-buffer/index.js","../webpack://unity-builder/./node_modules/safer-buffer/safer.js","../webpack://unity-builder/./node_modules/saxes/saxes.js","../webpack://unity-builder/./node_modules/semver/classes/comparator.js","../webpack://unity-builder/./node_modules/semver/classes/range.js","../webpack://unity-builder/./node_modules/semver/classes/semver.js","../webpack://unity-builder/./node_modules/semver/functions/clean.js","../webpack://unity-builder/./node_modules/semver/functions/cmp.js","../webpack://unity-builder/./node_modules/semver/functions/coerce.js","../webpack://unity-builder/./node_modules/semver/functions/compare-build.js","../webpack://unity-builder/./node_modules/semver/functions/compare-loose.js","../webpack://unity-builder/./node_modules/semver/functions/compare.js","../webpack://unity-builder/./node_modules/semver/functions/diff.js","../webpack://unity-builder/./node_modules/semver/functions/eq.js","../webpack://unity-builder/./node_modules/semver/functions/gt.js","../webpack://unity-builder/./node_modules/semver/functions/gte.js","../webpack://unity-builder/./node_modules/semver/functions/inc.js","../webpack://unity-builder/./node_modules/semver/functions/lt.js","../webpack://unity-builder/./node_modules/semver/functions/lte.js","../webpack://unity-builder/./node_modules/semver/functions/major.js","../webpack://unity-builder/./node_modules/semver/functions/minor.js","../webpack://unity-builder/./node_modules/semver/functions/neq.js","../webpack://unity-builder/./node_modules/semver/functions/parse.js","../webpack://unity-builder/./node_modules/semver/functions/patch.js","../webpack://unity-builder/./node_modules/semver/functions/prerelease.js","../webpack://unity-builder/./node_modules/semver/functions/rcompare.js","../webpack://unity-builder/./node_modules/semver/functions/rsort.js","../webpack://unity-builder/./node_modules/semver/functions/satisfies.js","../webpack://unity-builder/./node_modules/semver/functions/sort.js","../webpack://unity-builder/./node_modules/semver/functions/valid.js","../webpack://unity-builder/./node_modules/semver/index.js","../webpack://unity-builder/./node_modules/semver/internal/constants.js","../webpack://unity-builder/./node_modules/semver/internal/debug.js","../webpack://unity-builder/./node_modules/semver/internal/identifiers.js","../webpack://unity-builder/./node_modules/semver/internal/parse-options.js","../webpack://unity-builder/./node_modules/semver/internal/re.js","../webpack://unity-builder/./node_modules/semver/ranges/gtr.js","../webpack://unity-builder/./node_modules/semver/ranges/intersects.js","../webpack://unity-builder/./node_modules/semver/ranges/ltr.js","../webpack://unity-builder/./node_modules/semver/ranges/max-satisfying.js","../webpack://unity-builder/./node_modules/semver/ranges/min-satisfying.js","../webpack://unity-builder/./node_modules/semver/ranges/min-version.js","../webpack://unity-builder/./node_modules/semver/ranges/outside.js","../webpack://unity-builder/./node_modules/semver/ranges/simplify.js","../webpack://unity-builder/./node_modules/semver/ranges/subset.js","../webpack://unity-builder/./node_modules/semver/ranges/to-comparators.js","../webpack://unity-builder/./node_modules/semver/ranges/valid.js","../webpack://unity-builder/./node_modules/shelljs/commands.js","../webpack://unity-builder/./node_modules/shelljs/shell.js","../webpack://unity-builder/./node_modules/shelljs/src/cat.js","../webpack://unity-builder/./node_modules/shelljs/src/cd.js","../webpack://unity-builder/./node_modules/shelljs/src/chmod.js","../webpack://unity-builder/./node_modules/shelljs/src/common.js","../webpack://unity-builder/./node_modules/shelljs/src/cp.js","../webpack://unity-builder/./node_modules/shelljs/src/dirs.js","../webpack://unity-builder/./node_modules/shelljs/src/echo.js","../webpack://unity-builder/./node_modules/shelljs/src/error.js","../webpack://unity-builder/./node_modules/shelljs/src/exec-child.js","../webpack://unity-builder/./node_modules/shelljs/src/exec.js","../webpack://unity-builder/./node_modules/shelljs/src/find.js","../webpack://unity-builder/./node_modules/shelljs/src/grep.js","../webpack://unity-builder/./node_modules/shelljs/src/head.js","../webpack://unity-builder/./node_modules/shelljs/src/ln.js","../webpack://unity-builder/./node_modules/shelljs/src/ls.js","../webpack://unity-builder/./node_modules/shelljs/src/mkdir.js","../webpack://unity-builder/./node_modules/shelljs/src/mv.js","../webpack://unity-builder/./node_modules/shelljs/src/popd.js","../webpack://unity-builder/./node_modules/shelljs/src/pushd.js","../webpack://unity-builder/./node_modules/shelljs/src/pwd.js","../webpack://unity-builder/./node_modules/shelljs/src/rm.js","../webpack://unity-builder/./node_modules/shelljs/src/sed.js","../webpack://unity-builder/./node_modules/shelljs/src/set.js","../webpack://unity-builder/./node_modules/shelljs/src/sort.js","../webpack://unity-builder/./node_modules/shelljs/src/tail.js","../webpack://unity-builder/./node_modules/shelljs/src/tempdir.js","../webpack://unity-builder/./node_modules/shelljs/src/test.js","../webpack://unity-builder/./node_modules/shelljs/src/to.js","../webpack://unity-builder/./node_modules/shelljs/src/toEnd.js","../webpack://unity-builder/./node_modules/shelljs/src/touch.js","../webpack://unity-builder/./node_modules/shelljs/src/uniq.js","../webpack://unity-builder/./node_modules/shelljs/src/which.js","../webpack://unity-builder/./node_modules/side-channel/index.js","../webpack://unity-builder/./node_modules/sshpk/lib/algs.js","../webpack://unity-builder/./node_modules/sshpk/lib/certificate.js","../webpack://unity-builder/./node_modules/sshpk/lib/dhe.js","../webpack://unity-builder/./node_modules/sshpk/lib/ed-compat.js","../webpack://unity-builder/./node_modules/sshpk/lib/errors.js","../webpack://unity-builder/./node_modules/sshpk/lib/fingerprint.js","../webpack://unity-builder/./node_modules/sshpk/lib/formats/auto.js","../webpack://unity-builder/./node_modules/sshpk/lib/formats/dnssec.js","../webpack://unity-builder/./node_modules/sshpk/lib/formats/openssh-cert.js","../webpack://unity-builder/./node_modules/sshpk/lib/formats/pem.js","../webpack://unity-builder/./node_modules/sshpk/lib/formats/pkcs1.js","../webpack://unity-builder/./node_modules/sshpk/lib/formats/pkcs8.js","../webpack://unity-builder/./node_modules/sshpk/lib/formats/putty.js","../webpack://unity-builder/./node_modules/sshpk/lib/formats/rfc4253.js","../webpack://unity-builder/./node_modules/sshpk/lib/formats/ssh-private.js","../webpack://unity-builder/./node_modules/sshpk/lib/formats/ssh.js","../webpack://unity-builder/./node_modules/sshpk/lib/formats/x509-pem.js","../webpack://unity-builder/./node_modules/sshpk/lib/formats/x509.js","../webpack://unity-builder/./node_modules/sshpk/lib/identity.js","../webpack://unity-builder/./node_modules/sshpk/lib/index.js","../webpack://unity-builder/./node_modules/sshpk/lib/key.js","../webpack://unity-builder/./node_modules/sshpk/lib/private-key.js","../webpack://unity-builder/./node_modules/sshpk/lib/signature.js","../webpack://unity-builder/./node_modules/sshpk/lib/ssh-buffer.js","../webpack://unity-builder/./node_modules/sshpk/lib/utils.js","../webpack://unity-builder/./node_modules/stealthy-require/lib/index.js","../webpack://unity-builder/./node_modules/swagger-fluent/lib/client.js","../webpack://unity-builder/./node_modules/swagger-fluent/lib/index.js","../webpack://unity-builder/./node_modules/swagger-fluent/lib/loader.js","../webpack://unity-builder/./node_modules/swagger-fluent/node_modules/is-plain-object/index.cjs.js","../webpack://unity-builder/./node_modules/symbol-tree/lib/SymbolTree.js","../webpack://unity-builder/./node_modules/symbol-tree/lib/SymbolTreeNode.js","../webpack://unity-builder/./node_modules/symbol-tree/lib/TreeIterator.js","../webpack://unity-builder/./node_modules/symbol-tree/lib/TreePosition.js","../webpack://unity-builder/./node_modules/to-readable-stream/index.js","../webpack://unity-builder/./node_modules/tough-cookie/lib/cookie.js","../webpack://unity-builder/./node_modules/tough-cookie/lib/memstore.js","../webpack://unity-builder/./node_modules/tough-cookie/lib/pathMatch.js","../webpack://unity-builder/./node_modules/tough-cookie/lib/permuteDomain.js","../webpack://unity-builder/./node_modules/tough-cookie/lib/pubsuffix-psl.js","../webpack://unity-builder/./node_modules/tough-cookie/lib/store.js","../webpack://unity-builder/./node_modules/tough-cookie/lib/version.js","../webpack://unity-builder/./node_modules/tr46/index.js","../webpack://unity-builder/./node_modules/tr46/lib/regexes.js","../webpack://unity-builder/./node_modules/tr46/lib/statusMapping.js","../webpack://unity-builder/./node_modules/tslib/tslib.es6.js","../webpack://unity-builder/./node_modules/tunnel-agent/index.js","../webpack://unity-builder/./node_modules/tweetnacl/nacl-fast.js","../webpack://unity-builder/./node_modules/unity-changeset/dist/index.js","../webpack://unity-builder/./node_modules/unity-changeset/dist/unityChangeset.js","../webpack://unity-builder/./node_modules/universalify/index.js","../webpack://unity-builder/./node_modules/uri-js/dist/es5/uri.all.js","../webpack://unity-builder/./node_modules/url-join/lib/url-join.js","../webpack://unity-builder/./node_modules/url-parse-lax/index.js","../webpack://unity-builder/./node_modules/uuid/index.js","../webpack://unity-builder/./node_modules/uuid/lib/bytesToUuid.js","../webpack://unity-builder/./node_modules/uuid/lib/rng.js","../webpack://unity-builder/./node_modules/uuid/v1.js","../webpack://unity-builder/./node_modules/uuid/v4.js","../webpack://unity-builder/./node_modules/verror/lib/verror.js","../webpack://unity-builder/./node_modules/verror/node_modules/extsprintf/lib/extsprintf.js","../webpack://unity-builder/./node_modules/w3c-hr-time/index.js","../webpack://unity-builder/./node_modules/w3c-hr-time/lib/calculate-clock-offset.js","../webpack://unity-builder/./node_modules/w3c-hr-time/lib/clock-is-accurate.js","../webpack://unity-builder/./node_modules/w3c-hr-time/lib/global-monotonic-clock.js","../webpack://unity-builder/./node_modules/w3c-hr-time/lib/performance.js","../webpack://unity-builder/./node_modules/w3c-hr-time/lib/utils.js","../webpack://unity-builder/./node_modules/w3c-xmlserializer/lib/attributes.js","../webpack://unity-builder/./node_modules/w3c-xmlserializer/lib/constants.js","../webpack://unity-builder/./node_modules/w3c-xmlserializer/lib/serialize.js","../webpack://unity-builder/./node_modules/webidl-conversions/lib/index.js","../webpack://unity-builder/./node_modules/whatwg-encoding/lib/whatwg-encoding.js","../webpack://unity-builder/./node_modules/whatwg-mimetype/lib/mime-type.js","../webpack://unity-builder/./node_modules/whatwg-mimetype/lib/parser.js","../webpack://unity-builder/./node_modules/whatwg-mimetype/lib/serializer.js","../webpack://unity-builder/./node_modules/whatwg-mimetype/lib/utils.js","../webpack://unity-builder/./node_modules/whatwg-url/dist/Function.js","../webpack://unity-builder/./node_modules/whatwg-url/dist/URL-impl.js","../webpack://unity-builder/./node_modules/whatwg-url/dist/URL.js","../webpack://unity-builder/./node_modules/whatwg-url/dist/URLSearchParams-impl.js","../webpack://unity-builder/./node_modules/whatwg-url/dist/URLSearchParams.js","../webpack://unity-builder/./node_modules/whatwg-url/dist/encoding.js","../webpack://unity-builder/./node_modules/whatwg-url/dist/infra.js","../webpack://unity-builder/./node_modules/whatwg-url/dist/percent-encoding.js","../webpack://unity-builder/./node_modules/whatwg-url/dist/url-state-machine.js","../webpack://unity-builder/./node_modules/whatwg-url/dist/urlencoded.js","../webpack://unity-builder/./node_modules/whatwg-url/dist/utils.js","../webpack://unity-builder/./node_modules/whatwg-url/index.js","../webpack://unity-builder/./node_modules/whatwg-url/webidl2js-wrapper.js","../webpack://unity-builder/./node_modules/wrappy/wrappy.js","../webpack://unity-builder/./node_modules/ws/index.js","../webpack://unity-builder/./node_modules/ws/lib/buffer-util.js","../webpack://unity-builder/./node_modules/ws/lib/constants.js","../webpack://unity-builder/./node_modules/ws/lib/event-target.js","../webpack://unity-builder/./node_modules/ws/lib/extension.js","../webpack://unity-builder/./node_modules/ws/lib/permessage-deflate.js","../webpack://unity-builder/./node_modules/ws/lib/receiver.js","../webpack://unity-builder/./node_modules/ws/lib/sender.js","../webpack://unity-builder/./node_modules/ws/lib/validation.js","../webpack://unity-builder/./node_modules/ws/lib/websocket-server.js","../webpack://unity-builder/./node_modules/ws/lib/websocket.js","../webpack://unity-builder/./node_modules/xml-name-validator/lib/generated-parser.js","../webpack://unity-builder/./node_modules/xml-name-validator/lib/xml-name-validator.js","../webpack://unity-builder/./node_modules/xml2js/lib/bom.js","../webpack://unity-builder/./node_modules/xml2js/lib/builder.js","../webpack://unity-builder/./node_modules/xml2js/lib/defaults.js","../webpack://unity-builder/./node_modules/xml2js/lib/parser.js","../webpack://unity-builder/./node_modules/xml2js/lib/processors.js","../webpack://unity-builder/./node_modules/xml2js/lib/xml2js.js","../webpack://unity-builder/./node_modules/xml2js/node_modules/sax/lib/sax.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/Utility.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLAttribute.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLCData.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLComment.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLDTDAttList.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLDTDElement.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLDTDEntity.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLDTDNotation.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLDeclaration.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLDocType.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLDocument.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLDocumentCB.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLElement.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLNode.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLProcessingInstruction.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLRaw.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLStreamWriter.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLStringWriter.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLStringifier.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLText.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/XMLWriterBase.js","../webpack://unity-builder/./node_modules/xmlbuilder/lib/index.js","../webpack://unity-builder/./node_modules/xmlchars/xml/1.0/ed5.js","../webpack://unity-builder/./node_modules/xmlchars/xml/1.1/ed2.js","../webpack://unity-builder/./node_modules/xmlchars/xmlns/1.0/ed3.js","../webpack://unity-builder/./node_modules/yallist/iterator.js","../webpack://unity-builder/./node_modules/yallist/yallist.js","../webpack://unity-builder/./node_modules/@vercel/ncc/dist/ncc/@@notfound.js","../webpack://unity-builder/./node_modules/nanoid/index.cjs","../webpack://unity-builder/./node_modules/nanoid/url-alphabet/index.cjs","../webpack://unity-builder/./node_modules/underscore/underscore-node-f.cjs","../webpack://unity-builder/./node_modules/underscore/underscore-node.cjs","../webpack://unity-builder/external \"assert\"","../webpack://unity-builder/external \"buffer\"","../webpack://unity-builder/external \"child_process\"","../webpack://unity-builder/external \"crypto\"","../webpack://unity-builder/external \"dgram\"","../webpack://unity-builder/external \"domain\"","../webpack://unity-builder/external \"events\"","../webpack://unity-builder/external \"fs\"","../webpack://unity-builder/external \"http\"","../webpack://unity-builder/external \"https\"","../webpack://unity-builder/external \"net\"","../webpack://unity-builder/external \"os\"","../webpack://unity-builder/external \"path\"","../webpack://unity-builder/external \"punycode\"","../webpack://unity-builder/external \"querystring\"","../webpack://unity-builder/external \"stream\"","../webpack://unity-builder/external \"string_decoder\"","../webpack://unity-builder/external \"timers\"","../webpack://unity-builder/external \"tls\"","../webpack://unity-builder/external \"url\"","../webpack://unity-builder/external \"util\"","../webpack://unity-builder/external \"vm\"","../webpack://unity-builder/external \"zlib\"","../webpack://unity-builder/webpack/bootstrap","../webpack://unity-builder/webpack/runtime/define property getters","../webpack://unity-builder/webpack/runtime/hasOwnProperty shorthand","../webpack://unity-builder/webpack/runtime/make namespace object","../webpack://unity-builder/webpack/runtime/node module decorator","../webpack://unity-builder/webpack/runtime/compat","../webpack://unity-builder/webpack/startup"],"sourcesContent":["\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst model_1 = require(\"./model\");\r\nconst mac_builder_1 = __importDefault(require(\"./model/mac-builder\"));\r\nconst platform_setup_1 = __importDefault(require(\"./model/platform-setup\"));\r\nfunction run() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n try {\r\n model_1.Action.checkCompatibility();\r\n model_1.Cache.verify();\r\n const { dockerfile, workspace, actionFolder } = model_1.Action;\r\n const buildParameters = yield model_1.BuildParameters.create();\r\n const baseImage = new model_1.ImageTag(buildParameters);\r\n let builtImage;\r\n switch (buildParameters.remoteBuildCluster) {\r\n case 'k8s':\r\n core.info('Building with Kubernetes');\r\n yield model_1.Kubernetes.runBuildJob(buildParameters, baseImage);\r\n break;\r\n case 'aws':\r\n core.info('Building with AWS');\r\n yield model_1.RemoteBuilder.build(buildParameters, baseImage);\r\n break;\r\n // default and local case\r\n default:\r\n core.info('Building locally');\r\n yield platform_setup_1.default.setup(buildParameters, actionFolder);\r\n if (process.platform === 'darwin') {\r\n mac_builder_1.default.run(actionFolder, workspace, buildParameters);\r\n }\r\n else {\r\n builtImage = yield model_1.Docker.build({ path: actionFolder, dockerfile, baseImage });\r\n yield model_1.Docker.run(builtImage, Object.assign({ workspace }, buildParameters));\r\n }\r\n break;\r\n }\r\n // Set output\r\n yield model_1.Output.setBuildVersion(buildParameters.buildVersion);\r\n }\r\n catch (error) {\r\n core.setFailed(error.message);\r\n }\r\n });\r\n}\r\nrun();\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst path_1 = __importDefault(require(\"path\"));\r\nclass Action {\r\n static get supportedPlatforms() {\r\n return ['linux', 'win32', 'darwin'];\r\n }\r\n static get isRunningLocally() {\r\n return process.env.RUNNER_WORKSPACE === undefined;\r\n }\r\n static get isRunningFromSource() {\r\n return path_1.default.basename(__dirname) === 'model';\r\n }\r\n static get canonicalName() {\r\n return 'unity-builder';\r\n }\r\n static get rootFolder() {\r\n if (Action.isRunningFromSource) {\r\n return path_1.default.dirname(path_1.default.dirname(path_1.default.dirname(__filename)));\r\n }\r\n return path_1.default.dirname(path_1.default.dirname(__filename));\r\n }\r\n static get actionFolder() {\r\n return `${Action.rootFolder}/dist`;\r\n }\r\n static get dockerfile() {\r\n const currentPlatform = process.platform;\r\n switch (currentPlatform) {\r\n case 'linux':\r\n return `${Action.actionFolder}/platforms/ubuntu/Dockerfile`;\r\n case 'win32':\r\n return `${Action.actionFolder}/platforms/windows/Dockerfile`;\r\n case 'darwin':\r\n return 'unused'; //Mac doesn't use a container\r\n default:\r\n throw new Error(`No Dockerfile for currently unsupported platform: ${currentPlatform}`);\r\n }\r\n }\r\n static get workspace() {\r\n return process.env.GITHUB_WORKSPACE;\r\n }\r\n static checkCompatibility() {\r\n const currentPlatform = process.platform;\r\n if (!Action.supportedPlatforms.includes(currentPlatform)) {\r\n throw new Error(`Currently ${currentPlatform}-platform is not supported`);\r\n }\r\n }\r\n}\r\nexports.default = Action;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst semver = __importStar(require(\"semver\"));\r\nclass AndroidVersioning {\r\n static determineVersionCode(version, inputVersionCode) {\r\n if (!inputVersionCode) {\r\n return AndroidVersioning.versionToVersionCode(version);\r\n }\r\n return inputVersionCode;\r\n }\r\n static versionToVersionCode(version) {\r\n if (version === 'none') {\r\n core.info(`Versioning strategy is set to ${version}, so android version code should not be applied.`);\r\n return 0;\r\n }\r\n const parsedVersion = semver.parse(version);\r\n if (!parsedVersion) {\r\n core.warning(`Could not parse \"${version}\" to semver, defaulting android version code to 1`);\r\n return 1;\r\n }\r\n // The greatest value Google Plays allows is 2100000000.\r\n // Allow for 3 patch digits, 3 minor digits and 3 major digits.\r\n const versionCode = parsedVersion.major * 1000000 + parsedVersion.minor * 1000 + parsedVersion.patch;\r\n if (versionCode >= 2050000000) {\r\n throw new Error(`Generated versionCode ${versionCode} is dangerously close to the maximum allowed number 2100000000. Consider a different versioning scheme to be able to continue updating your application.`);\r\n }\r\n core.info(`Using android versionCode ${versionCode}`);\r\n return versionCode;\r\n }\r\n static determineSdkManagerParameters(targetSdkVersion) {\r\n const parsedVersion = Number.parseInt(targetSdkVersion.slice(-2), 10);\r\n return Number.isNaN(parsedVersion) ? '' : `platforms;android-${parsedVersion}`;\r\n }\r\n}\r\nexports.default = AndroidVersioning;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst android_versioning_1 = __importDefault(require(\"./android-versioning\"));\r\nconst input_1 = __importDefault(require(\"./input\"));\r\nconst platform_1 = __importDefault(require(\"./platform\"));\r\nconst unity_versioning_1 = __importDefault(require(\"./unity-versioning\"));\r\nconst versioning_1 = __importDefault(require(\"./versioning\"));\r\nclass BuildParameters {\r\n static create() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const buildFile = this.parseBuildFile(input_1.default.buildName, input_1.default.targetPlatform, input_1.default.androidAppBundle);\r\n const unityVersion = unity_versioning_1.default.determineUnityVersion(input_1.default.projectPath, input_1.default.unityVersion);\r\n const buildVersion = yield versioning_1.default.determineVersion(input_1.default.versioningStrategy, input_1.default.specifiedVersion);\r\n const androidVersionCode = android_versioning_1.default.determineVersionCode(buildVersion, input_1.default.androidVersionCode);\r\n const androidSdkManagerParameters = android_versioning_1.default.determineSdkManagerParameters(input_1.default.androidTargetSdkVersion);\r\n let unitySerial = '';\r\n if (!process.env.UNITY_SERIAL) {\r\n //No serial was present so it is a personal license that we need to convert\r\n if (!process.env.UNITY_LICENSE) {\r\n throw new Error(`Missing Unity License File and no Serial was found. If this\n is a personal license, make sure to follow the activation\n steps and set the UNITY_LICENSE GitHub secret or enter a Unity\n serial number inside the UNITY_SERIAL GitHub secret.`);\r\n }\r\n unitySerial = this.getSerialFromLicenseFile(process.env.UNITY_LICENSE);\r\n }\r\n else {\r\n unitySerial = process.env.UNITY_SERIAL;\r\n }\r\n core.setSecret(unitySerial);\r\n return {\r\n version: unityVersion,\r\n customImage: input_1.default.customImage,\r\n unitySerial,\r\n runnerTempPath: process.env.RUNNER_TEMP,\r\n platform: input_1.default.targetPlatform,\r\n projectPath: input_1.default.projectPath,\r\n buildName: input_1.default.buildName,\r\n buildPath: `${input_1.default.buildsPath}/${input_1.default.targetPlatform}`,\r\n buildFile,\r\n buildMethod: input_1.default.buildMethod,\r\n buildVersion,\r\n androidVersionCode,\r\n androidKeystoreName: input_1.default.androidKeystoreName,\r\n androidKeystoreBase64: input_1.default.androidKeystoreBase64,\r\n androidKeystorePass: input_1.default.androidKeystorePass,\r\n androidKeyaliasName: input_1.default.androidKeyaliasName,\r\n androidKeyaliasPass: input_1.default.androidKeyaliasPass,\r\n androidTargetSdkVersion: input_1.default.androidTargetSdkVersion,\r\n androidSdkManagerParameters,\r\n customParameters: input_1.default.customParameters,\r\n sshAgent: input_1.default.sshAgent,\r\n gitPrivateToken: input_1.default.gitPrivateToken,\r\n chownFilesTo: input_1.default.chownFilesTo,\r\n remoteBuildCluster: input_1.default.remoteBuildCluster,\r\n awsStackName: input_1.default.awsStackName,\r\n kubeConfig: input_1.default.kubeConfig,\r\n githubToken: input_1.default.githubToken,\r\n remoteBuildMemory: input_1.default.remoteBuildMemory,\r\n remoteBuildCpu: input_1.default.remoteBuildCpu,\r\n kubeVolumeSize: input_1.default.kubeVolumeSize,\r\n kubeVolume: input_1.default.kubeVolume,\r\n };\r\n });\r\n }\r\n static parseBuildFile(filename, platform, androidAppBundle) {\r\n if (platform_1.default.isWindows(platform)) {\r\n return `${filename}.exe`;\r\n }\r\n if (platform_1.default.isAndroid(platform)) {\r\n return androidAppBundle ? `${filename}.aab` : `${filename}.apk`;\r\n }\r\n return filename;\r\n }\r\n static getSerialFromLicenseFile(license) {\r\n const startKey = ``;\r\n const startIndex = license.indexOf(startKey) + startKey.length;\r\n if (startIndex < 0) {\r\n throw new Error(`License File was corrupted, unable to locate serial`);\r\n }\r\n const endIndex = license.indexOf(endKey, startIndex);\r\n // Slice off the first 4 characters as they are garbage values\r\n return Buffer.from(license.slice(startIndex, endIndex), 'base64').toString('binary').slice(4);\r\n }\r\n}\r\nexports.default = BuildParameters;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst fs_1 = __importDefault(require(\"fs\"));\r\nconst action_1 = __importDefault(require(\"./action\"));\r\nconst project_1 = __importDefault(require(\"./project\"));\r\nclass Cache {\r\n static verify() {\r\n if (!fs_1.default.existsSync(project_1.default.libraryFolder)) {\r\n this.notifyAboutCachingPossibility();\r\n }\r\n }\r\n static notifyAboutCachingPossibility() {\r\n if (action_1.default.isRunningLocally) {\r\n return;\r\n }\r\n core.warning(`\n Library folder does not exist.\n Consider setting up caching to speed up your workflow,\n if this is not your first build.\n `);\r\n }\r\n}\r\nexports.default = Cache;\r\n","\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst exec_1 = require(\"@actions/exec\");\r\nconst image_tag_1 = __importDefault(require(\"./image-tag\"));\r\nclass Docker {\r\n static build(buildParameters, silent = false) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const { path, dockerfile, baseImage } = buildParameters;\r\n const { version, platform } = baseImage;\r\n const tag = new image_tag_1.default({ repository: '', name: 'unity-builder', version, platform });\r\n const command = `docker build ${path} \\\n --file ${dockerfile} \\\n --build-arg IMAGE=${baseImage} \\\n --tag ${tag}`;\r\n yield exec_1.exec(command, undefined, { silent });\r\n return tag;\r\n });\r\n }\r\n static run(image, parameters, silent = false) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const { version, workspace, unitySerial, runnerTempPath, platform, projectPath, buildName, buildPath, buildFile, buildMethod, buildVersion, androidVersionCode, androidKeystoreName, androidKeystoreBase64, androidKeystorePass, androidKeyaliasName, androidKeyaliasPass, androidTargetSdkVersion, androidSdkManagerParameters, customParameters, sshAgent, gitPrivateToken, chownFilesTo, } = parameters;\r\n const baseOsSpecificArguments = this.getBaseOsSpecificArguments(process.platform, workspace, unitySerial, runnerTempPath, sshAgent);\r\n const runCommand = `docker run \\\n --workdir /github/workspace \\\n --rm \\\n --env UNITY_LICENSE \\\n --env UNITY_LICENSE_FILE \\\n --env UNITY_EMAIL \\\n --env UNITY_PASSWORD \\\n --env UNITY_VERSION=\"${version}\" \\\n --env USYM_UPLOAD_AUTH_TOKEN \\\n --env PROJECT_PATH=\"${projectPath}\" \\\n --env BUILD_TARGET=\"${platform}\" \\\n --env BUILD_NAME=\"${buildName}\" \\\n --env BUILD_PATH=\"${buildPath}\" \\\n --env BUILD_FILE=\"${buildFile}\" \\\n --env BUILD_METHOD=\"${buildMethod}\" \\\n --env VERSION=\"${buildVersion}\" \\\n --env ANDROID_VERSION_CODE=\"${androidVersionCode}\" \\\n --env ANDROID_KEYSTORE_NAME=\"${androidKeystoreName}\" \\\n --env ANDROID_KEYSTORE_BASE64=\"${androidKeystoreBase64}\" \\\n --env ANDROID_KEYSTORE_PASS=\"${androidKeystorePass}\" \\\n --env ANDROID_KEYALIAS_NAME=\"${androidKeyaliasName}\" \\\n --env ANDROID_KEYALIAS_PASS=\"${androidKeyaliasPass}\" \\\n --env ANDROID_TARGET_SDK_VERSION=\"${androidTargetSdkVersion}\" \\\n --env ANDROID_SDK_MANAGER_PARAMETERS=\"${androidSdkManagerParameters}\" \\\n --env CUSTOM_PARAMETERS=\"${customParameters}\" \\\n --env CHOWN_FILES_TO=\"${chownFilesTo}\" \\\n --env GITHUB_REF \\\n --env GITHUB_SHA \\\n --env GITHUB_REPOSITORY \\\n --env GITHUB_ACTOR \\\n --env GITHUB_WORKFLOW \\\n --env GITHUB_HEAD_REF \\\n --env GITHUB_BASE_REF \\\n --env GITHUB_EVENT_NAME \\\n --env GITHUB_WORKSPACE=/github/workspace \\\n --env GITHUB_ACTION \\\n --env GITHUB_EVENT_PATH \\\n --env RUNNER_OS \\\n --env RUNNER_TOOL_CACHE \\\n --env RUNNER_TEMP \\\n --env RUNNER_WORKSPACE \\\n --env GIT_PRIVATE_TOKEN=\"${gitPrivateToken}\" \\\n ${baseOsSpecificArguments} \\\n ${image}`;\r\n yield exec_1.exec(runCommand, undefined, { silent });\r\n });\r\n }\r\n static getBaseOsSpecificArguments(baseOs, workspace, unitySerial, runnerTemporaryPath, sshAgent) {\r\n switch (baseOs) {\r\n case 'linux':\r\n return `--env UNITY_SERIAL \\\n ${sshAgent ? '--env SSH_AUTH_SOCK=/ssh-agent' : ''} \\\n --volume \"/var/run/docker.sock\":\"/var/run/docker.sock\" \\\n --volume \"${runnerTemporaryPath}/_github_home\":\"/root\" \\\n --volume \"${runnerTemporaryPath}/_github_workflow\":\"/github/workflow\" \\\n --volume \"${workspace}\":\"/github/workspace\" \\\n ${sshAgent ? `--volume ${sshAgent}:/ssh-agent` : ''} \\\n ${sshAgent ? '--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro' : ''}`;\r\n case 'win32':\r\n return `--env UNITY_SERIAL=\"${unitySerial}\" \\\n --volume \"${workspace}\":\"c:/github/workspace\" \\\n --volume \"c:/regkeys\":\"c:/regkeys\" \\\n --volume \"C:/Program Files (x86)/Microsoft Visual Studio\":\"C:/Program Files (x86)/Microsoft Visual Studio\" \\\n --volume \"C:/Program Files (x86)/Windows Kits\":\"C:/Program Files (x86)/Windows Kits\" \\\n --volume \"C:/ProgramData/Microsoft/VisualStudio\":\"C:/ProgramData/Microsoft/VisualStudio\"`;\r\n //Note: When upgrading to Server 2022, we will need to move to just \"program files\" since VS will be 64-bit\r\n }\r\n return '';\r\n }\r\n}\r\nexports.default = Docker;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass NotImplementedException extends Error {\r\n constructor(message = '') {\r\n super(message);\r\n this.name = 'NotImplementedException';\r\n }\r\n}\r\nexports.default = NotImplementedException;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass ValidationError extends Error {\r\n constructor(message = '') {\r\n super(message);\r\n this.name = 'ValidationError';\r\n }\r\n}\r\nexports.default = ValidationError;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst platform_1 = __importDefault(require(\"./platform\"));\r\nclass ImageTag {\r\n constructor(imageProperties) {\r\n const { repository = 'unityci', name = 'editor', version = '2019.2.11f1', platform, customImage } = imageProperties;\r\n if (!ImageTag.versionPattern.test(version)) {\r\n throw new Error(`Invalid version \"${version}\".`);\r\n }\r\n const builderPlatform = ImageTag.getTargetPlatformToImageSuffixMap(platform, version);\r\n this.repository = repository;\r\n this.name = name;\r\n this.version = version;\r\n this.platform = platform;\r\n this.builderPlatform = builderPlatform;\r\n this.customImage = customImage;\r\n }\r\n static get versionPattern() {\r\n return /^20\\d{2}\\.\\d\\.\\w{3,4}|3$/;\r\n }\r\n static get imageSuffixes() {\r\n return {\r\n generic: '',\r\n webgl: 'webgl',\r\n mac: 'mac-mono',\r\n windows: 'windows-mono',\r\n windowsIl2cpp: 'windows-il2cpp',\r\n wsaPlayer: 'universal-windows-platform',\r\n linux: 'base',\r\n linuxIl2cpp: 'linux-il2cpp',\r\n android: 'android',\r\n ios: 'ios',\r\n tvos: 'appletv',\r\n facebook: 'facebook',\r\n };\r\n }\r\n static getTargetPlatformToImageSuffixMap(platform, version) {\r\n const { generic, webgl, mac, windows, windowsIl2cpp, wsaPlayer, linux, linuxIl2cpp, android, ios, tvos, facebook, } = ImageTag.imageSuffixes;\r\n const [major, minor] = version.split('.').map((digit) => Number(digit));\r\n // @see: https://docs.unity3d.com/ScriptReference/BuildTarget.html\r\n switch (platform) {\r\n case platform_1.default.types.StandaloneOSX:\r\n return mac;\r\n case platform_1.default.types.StandaloneWindows:\r\n case platform_1.default.types.StandaloneWindows64:\r\n // Can only build windows-il2cpp on a windows based system\r\n if (process.platform === 'win32') {\r\n // Unity versions before 2019.3 do not support il2cpp\r\n if (major >= 2020 || (major === 2019 && minor >= 3)) {\r\n return windowsIl2cpp;\r\n }\r\n else {\r\n throw new Error(`Windows-based builds are only supported on 2019.3.X+ versions of Unity.\n If you are trying to build for windows-mono, please use a Linux based OS.`);\r\n }\r\n }\r\n return windows;\r\n case platform_1.default.types.StandaloneLinux64: {\r\n // Unity versions before 2019.3 do not support il2cpp\r\n if (major >= 2020 || (major === 2019 && minor >= 3)) {\r\n return linuxIl2cpp;\r\n }\r\n return linux;\r\n }\r\n case platform_1.default.types.iOS:\r\n return ios;\r\n case platform_1.default.types.Android:\r\n return android;\r\n case platform_1.default.types.WebGL:\r\n return webgl;\r\n case platform_1.default.types.WSAPlayer:\r\n if (process.platform !== 'win32') {\r\n throw new Error(`WSAPlayer can only be built on a windows base OS`);\r\n }\r\n return wsaPlayer;\r\n case platform_1.default.types.PS4:\r\n return windows;\r\n case platform_1.default.types.XboxOne:\r\n return windows;\r\n case platform_1.default.types.tvOS:\r\n if (process.platform !== 'win32') {\r\n throw new Error(`tvOS can only be built on a windows base OS`);\r\n }\r\n return tvos;\r\n case platform_1.default.types.Switch:\r\n return windows;\r\n // Unsupported\r\n case platform_1.default.types.Lumin:\r\n return windows;\r\n case platform_1.default.types.BJM:\r\n return windows;\r\n case platform_1.default.types.Stadia:\r\n return windows;\r\n case platform_1.default.types.Facebook:\r\n return facebook;\r\n case platform_1.default.types.NoTarget:\r\n return generic;\r\n // Test specific\r\n case platform_1.default.types.Test:\r\n return generic;\r\n default:\r\n throw new Error(`\n Platform must be one of the ones described in the documentation.\n \"${platform}\" is currently not supported.`);\r\n }\r\n }\r\n get tag() {\r\n //We check the host os so we know what type of the images we need to pull\r\n switch (process.platform) {\r\n case 'win32':\r\n return `windows-${this.version}-${this.builderPlatform}`.replace(/-+$/, '');\r\n case 'linux':\r\n return `${this.version}-${this.builderPlatform}`.replace(/-+$/, '');\r\n default:\r\n break;\r\n }\r\n }\r\n get image() {\r\n return `${this.repository}/${this.name}`.replace(/^\\/+/, '');\r\n }\r\n toString() {\r\n const { image, tag, customImage } = this;\r\n if (customImage && customImage !== '') {\r\n return customImage;\r\n }\r\n return `${image}:${tag}-0`; // '0' here represents the docker repo version\r\n }\r\n}\r\nexports.default = ImageTag;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.RemoteBuilder = exports.Kubernetes = exports.Versioning = exports.Unity = exports.Project = exports.Platform = exports.Output = exports.ImageTag = exports.Input = exports.Docker = exports.Cache = exports.BuildParameters = exports.Action = void 0;\r\nconst action_1 = __importDefault(require(\"./action\"));\r\nexports.Action = action_1.default;\r\nconst build_parameters_1 = __importDefault(require(\"./build-parameters\"));\r\nexports.BuildParameters = build_parameters_1.default;\r\nconst cache_1 = __importDefault(require(\"./cache\"));\r\nexports.Cache = cache_1.default;\r\nconst docker_1 = __importDefault(require(\"./docker\"));\r\nexports.Docker = docker_1.default;\r\nconst input_1 = __importDefault(require(\"./input\"));\r\nexports.Input = input_1.default;\r\nconst image_tag_1 = __importDefault(require(\"./image-tag\"));\r\nexports.ImageTag = image_tag_1.default;\r\nconst output_1 = __importDefault(require(\"./output\"));\r\nexports.Output = output_1.default;\r\nconst platform_1 = __importDefault(require(\"./platform\"));\r\nexports.Platform = platform_1.default;\r\nconst project_1 = __importDefault(require(\"./project\"));\r\nexports.Project = project_1.default;\r\nconst unity_1 = __importDefault(require(\"./unity\"));\r\nexports.Unity = unity_1.default;\r\nconst versioning_1 = __importDefault(require(\"./versioning\"));\r\nexports.Versioning = versioning_1.default;\r\nconst kubernetes_1 = __importDefault(require(\"./kubernetes\"));\r\nexports.Kubernetes = kubernetes_1.default;\r\nconst remote_builder_1 = __importDefault(require(\"./remote-builder/remote-builder\"));\r\nexports.RemoteBuilder = remote_builder_1.default;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst platform_1 = __importDefault(require(\"./platform\"));\r\nconst core = require('@actions/core');\r\n/**\r\n * Input variables specified in workflows using \"with\" prop.\r\n *\r\n * Note that input is always passed as a string, even booleans.\r\n */\r\nclass Input {\r\n static get unityVersion() {\r\n return core.getInput('unityVersion') || 'auto';\r\n }\r\n static get customImage() {\r\n return core.getInput('customImage');\r\n }\r\n static get targetPlatform() {\r\n return core.getInput('targetPlatform') || platform_1.default.default;\r\n }\r\n static get projectPath() {\r\n const rawProjectPath = core.getInput('projectPath') || '.';\r\n return rawProjectPath.replace(/\\/$/, '');\r\n }\r\n static get buildName() {\r\n return core.getInput('buildName') || this.targetPlatform;\r\n }\r\n static get buildsPath() {\r\n return core.getInput('buildsPath') || 'build';\r\n }\r\n static get buildMethod() {\r\n return core.getInput('buildMethod'); // processed in docker file\r\n }\r\n static get versioningStrategy() {\r\n return core.getInput('versioning') || 'Semantic';\r\n }\r\n static get specifiedVersion() {\r\n return core.getInput('version') || '';\r\n }\r\n static get androidVersionCode() {\r\n return core.getInput('androidVersionCode');\r\n }\r\n static get androidAppBundle() {\r\n const input = core.getInput('androidAppBundle') || false;\r\n return input === 'true';\r\n }\r\n static get androidKeystoreName() {\r\n return core.getInput('androidKeystoreName') || '';\r\n }\r\n static get androidKeystoreBase64() {\r\n return core.getInput('androidKeystoreBase64') || '';\r\n }\r\n static get androidKeystorePass() {\r\n return core.getInput('androidKeystorePass') || '';\r\n }\r\n static get androidKeyaliasName() {\r\n return core.getInput('androidKeyaliasName') || '';\r\n }\r\n static get androidKeyaliasPass() {\r\n return core.getInput('androidKeyaliasPass') || '';\r\n }\r\n static get androidTargetSdkVersion() {\r\n return core.getInput('androidTargetSdkVersion') || '';\r\n }\r\n static get allowDirtyBuild() {\r\n const input = core.getInput('allowDirtyBuild') || false;\r\n return input === 'true';\r\n }\r\n static get customParameters() {\r\n return core.getInput('customParameters') || '';\r\n }\r\n static get sshAgent() {\r\n return core.getInput('sshAgent') || '';\r\n }\r\n static get gitPrivateToken() {\r\n return core.getInput('gitPrivateToken') || '';\r\n }\r\n static get chownFilesTo() {\r\n return core.getInput('chownFilesTo') || '';\r\n }\r\n static get remoteBuildCluster() {\r\n return core.getInput('remoteBuildCluster') || '';\r\n }\r\n static get awsStackName() {\r\n return core.getInput('awsStackName') || '';\r\n }\r\n static get kubeConfig() {\r\n return core.getInput('kubeConfig') || '';\r\n }\r\n static get githubToken() {\r\n return core.getInput('githubToken') || '';\r\n }\r\n static get remoteBuildMemory() {\r\n return core.getInput('remoteBuildMemory') || '800M';\r\n }\r\n static get remoteBuildCpu() {\r\n return core.getInput('remoteBuildCpu') || '0.25';\r\n }\r\n static get kubeVolumeSize() {\r\n return core.getInput('kubeVolumeSize') || '5Gi';\r\n }\r\n static get kubeVolume() {\r\n return core.getInput('kubeVolume') || '';\r\n }\r\n}\r\nexports.default = Input;\r\n","\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n// @ts-ignore\r\nconst kubernetes_client_1 = require(\"kubernetes-client\");\r\nconst request_1 = __importDefault(require(\"kubernetes-client/backends/request\"));\r\nconst core = require('@actions/core');\r\nconst base64 = require('base-64');\r\nconst pollInterval = 10000;\r\nclass Kubernetes {\r\n static runBuildJob(buildParameters, baseImage) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const kubeconfig = new kubernetes_client_1.KubeConfig();\r\n kubeconfig.loadFromString(base64.decode(buildParameters.kubeConfig));\r\n const backend = new request_1.default({ kubeconfig });\r\n const kubeClient = new kubernetes_client_1.Client(backend);\r\n yield kubeClient.loadSpec();\r\n const buildId = Kubernetes.uuidv4();\r\n const pvcName = `unity-builder-pvc-${buildId}`;\r\n const secretName = `build-credentials-${buildId}`;\r\n const jobName = `unity-builder-job-${buildId}`;\r\n const namespace = 'default';\r\n this.kubeClient = kubeClient;\r\n this.buildId = buildId;\r\n this.buildParameters = buildParameters;\r\n this.baseImage = baseImage;\r\n this.pvcName = pvcName;\r\n this.secretName = secretName;\r\n this.jobName = jobName;\r\n this.namespace = namespace;\r\n yield Kubernetes.createSecret();\r\n yield Kubernetes.createPersistentVolumeClaim();\r\n yield Kubernetes.scheduleBuildJob();\r\n yield Kubernetes.watchBuildJobUntilFinished();\r\n yield Kubernetes.cleanup();\r\n core.setOutput('volume', pvcName);\r\n });\r\n }\r\n static createSecret() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const secretManifest = {\r\n apiVersion: 'v1',\r\n kind: 'Secret',\r\n metadata: {\r\n name: this.secretName,\r\n },\r\n type: 'Opaque',\r\n data: {\r\n GITHUB_TOKEN: base64.encode(this.buildParameters.githubToken),\r\n UNITY_LICENSE: base64.encode(process.env.UNITY_LICENSE),\r\n ANDROID_KEYSTORE_BASE64: base64.encode(this.buildParameters.androidKeystoreBase64),\r\n ANDROID_KEYSTORE_PASS: base64.encode(this.buildParameters.androidKeystorePass),\r\n ANDROID_KEYALIAS_PASS: base64.encode(this.buildParameters.androidKeyaliasPass),\r\n },\r\n };\r\n yield this.kubeClient.api.v1.namespaces(this.namespace).secrets.post({ body: secretManifest });\r\n });\r\n }\r\n static createPersistentVolumeClaim() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this.buildParameters.kubeVolume) {\r\n core.info(this.buildParameters.kubeVolume);\r\n this.pvcName = this.buildParameters.kubeVolume;\r\n return;\r\n }\r\n const pvcManifest = {\r\n apiVersion: 'v1',\r\n kind: 'PersistentVolumeClaim',\r\n metadata: {\r\n name: this.pvcName,\r\n },\r\n spec: {\r\n accessModes: ['ReadWriteOnce'],\r\n volumeMode: 'Filesystem',\r\n resources: {\r\n requests: {\r\n storage: this.buildParameters.kubeVolumeSize,\r\n },\r\n },\r\n },\r\n };\r\n yield this.kubeClient.api.v1.namespaces(this.namespace).persistentvolumeclaims.post({ body: pvcManifest });\r\n core.info('Persistent Volume created, waiting for ready state...');\r\n yield Kubernetes.watchPersistentVolumeClaimUntilReady();\r\n core.info('Persistent Volume ready for claims');\r\n });\r\n }\r\n static watchPersistentVolumeClaimUntilReady() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield new Promise((resolve) => setTimeout(resolve, pollInterval));\r\n const queryResult = yield this.kubeClient.api.v1\r\n .namespaces(this.namespace)\r\n .persistentvolumeclaims(this.pvcName)\r\n .get();\r\n if (queryResult.body.status.phase === 'Pending') {\r\n yield Kubernetes.watchPersistentVolumeClaimUntilReady();\r\n }\r\n });\r\n }\r\n static scheduleBuildJob() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n core.info('Creating build job');\r\n const jobManifest = {\r\n apiVersion: 'batch/v1',\r\n kind: 'Job',\r\n metadata: {\r\n name: this.jobName,\r\n labels: {\r\n app: 'unity-builder',\r\n },\r\n },\r\n spec: {\r\n template: {\r\n backoffLimit: 1,\r\n spec: {\r\n volumes: [\r\n {\r\n name: 'data',\r\n persistentVolumeClaim: {\r\n claimName: this.pvcName,\r\n },\r\n },\r\n {\r\n name: 'credentials',\r\n secret: {\r\n secretName: this.secretName,\r\n },\r\n },\r\n ],\r\n initContainers: [\r\n {\r\n name: 'clone',\r\n image: 'alpine/git',\r\n command: [\r\n '/bin/sh',\r\n '-c',\r\n `apk update;\n apk add git-lfs;\n export GITHUB_TOKEN=$(cat /credentials/GITHUB_TOKEN);\n cd /data;\n git clone https://github.com/${process.env.GITHUB_REPOSITORY}.git repo;\n git clone https://github.com/webbertakken/unity-builder.git builder;\n cd repo;\n git checkout $GITHUB_SHA;\n ls`,\r\n ],\r\n volumeMounts: [\r\n {\r\n name: 'data',\r\n mountPath: '/data',\r\n },\r\n {\r\n name: 'credentials',\r\n mountPath: '/credentials',\r\n readOnly: true,\r\n },\r\n ],\r\n env: [\r\n {\r\n name: 'GITHUB_SHA',\r\n value: this.buildId,\r\n },\r\n ],\r\n },\r\n ],\r\n containers: [\r\n {\r\n name: 'main',\r\n image: `${this.baseImage.toString()}`,\r\n command: [\r\n 'bin/bash',\r\n '-c',\r\n `for f in ./credentials/*; do export $(basename $f)=\"$(cat $f)\"; done\n cp -r /data/builder/action/default-build-script /UnityBuilderAction\n cp -r /data/builder/action/entrypoint.sh /entrypoint.sh\n cp -r /data/builder/action/steps /steps\n chmod -R +x /entrypoint.sh;\n chmod -R +x /steps;\n /entrypoint.sh;\n `,\r\n ],\r\n resources: {\r\n requests: {\r\n memory: this.buildParameters.kubeContainerMemory,\r\n cpu: this.buildParameters.kubeContainerCPU,\r\n },\r\n },\r\n env: [\r\n {\r\n name: 'GITHUB_WORKSPACE',\r\n value: '/data/repo',\r\n },\r\n {\r\n name: 'PROJECT_PATH',\r\n value: this.buildParameters.projectPath,\r\n },\r\n {\r\n name: 'BUILD_PATH',\r\n value: this.buildParameters.buildPath,\r\n },\r\n {\r\n name: 'BUILD_FILE',\r\n value: this.buildParameters.buildFile,\r\n },\r\n {\r\n name: 'BUILD_NAME',\r\n value: this.buildParameters.buildName,\r\n },\r\n {\r\n name: 'BUILD_METHOD',\r\n value: this.buildParameters.buildMethod,\r\n },\r\n {\r\n name: 'CUSTOM_PARAMETERS',\r\n value: this.buildParameters.customParameters,\r\n },\r\n {\r\n name: 'CHOWN_FILES_TO',\r\n value: this.buildParameters.chownFilesTo,\r\n },\r\n {\r\n name: 'BUILD_TARGET',\r\n value: this.buildParameters.platform,\r\n },\r\n {\r\n name: 'ANDROID_VERSION_CODE',\r\n value: this.buildParameters.androidVersionCode.toString(),\r\n },\r\n {\r\n name: 'ANDROID_KEYSTORE_NAME',\r\n value: this.buildParameters.androidKeystoreName,\r\n },\r\n {\r\n name: 'ANDROID_KEYALIAS_NAME',\r\n value: this.buildParameters.androidKeyaliasName,\r\n },\r\n ],\r\n volumeMounts: [\r\n {\r\n name: 'data',\r\n mountPath: '/data',\r\n },\r\n {\r\n name: 'credentials',\r\n mountPath: '/credentials',\r\n readOnly: true,\r\n },\r\n ],\r\n lifeCycle: {\r\n preStop: {\r\n exec: {\r\n command: [\r\n 'bin/bash',\r\n '-c',\r\n `cd /data/builder/action/steps;\n chmod +x /return_license.sh;\n /return_license.sh;`,\r\n ],\r\n },\r\n },\r\n },\r\n },\r\n ],\r\n restartPolicy: 'Never',\r\n },\r\n },\r\n },\r\n };\r\n yield this.kubeClient.apis.batch.v1.namespaces(this.namespace).jobs.post({ body: jobManifest });\r\n core.info('Job created');\r\n });\r\n }\r\n static watchBuildJobUntilFinished() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let podname;\r\n let ready = false;\r\n while (!ready) {\r\n yield new Promise((resolve) => setTimeout(resolve, pollInterval));\r\n const pods = yield this.kubeClient.api.v1.namespaces(this.namespace).pods.get();\r\n for (let index = 0; index < pods.body.items.length; index++) {\r\n const element = pods.body.items[index];\r\n if (element.metadata.labels['job-name'] === this.jobName && element.status.phase !== 'Pending') {\r\n core.info('Pod no longer pending');\r\n if (element.status.phase === 'Failure') {\r\n core.error('Kubernetes job failed');\r\n }\r\n else {\r\n ready = true;\r\n podname = element.metadata.name;\r\n }\r\n }\r\n }\r\n }\r\n core.info(`Watching build job ${podname}`);\r\n let logQueryTime;\r\n let complete = false;\r\n while (!complete) {\r\n yield new Promise((resolve) => setTimeout(resolve, pollInterval));\r\n const podStatus = yield this.kubeClient.api.v1.namespaces(this.namespace).pod(podname).get();\r\n if (podStatus.body.status.phase !== 'Running') {\r\n complete = true;\r\n }\r\n const logs = yield this.kubeClient.api.v1\r\n .namespaces(this.namespace)\r\n .pod(podname)\r\n .log.get({\r\n qs: {\r\n sinceTime: logQueryTime,\r\n timestamps: true,\r\n },\r\n });\r\n if (logs.body !== undefined) {\r\n const arrayOfLines = logs.body.match(/[^\\n\\r]+/g).reverse();\r\n for (const element of arrayOfLines) {\r\n const [time, ...line] = element.split(' ');\r\n if (time !== logQueryTime) {\r\n core.info(line.join(' '));\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n if (podStatus.body.status.phase === 'Failed') {\r\n throw new Error('Kubernetes job failed');\r\n }\r\n logQueryTime = arrayOfLines[0].split(' ')[0];\r\n }\r\n }\r\n });\r\n }\r\n static cleanup() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield this.kubeClient.apis.batch.v1.namespaces(this.namespace).jobs(this.jobName).delete();\r\n yield this.kubeClient.api.v1.namespaces(this.namespace).secrets(this.secretName).delete();\r\n });\r\n }\r\n static uuidv4() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\r\n const r = Math.trunc(Math.random() * 16);\r\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\r\n return v.toString(16);\r\n });\r\n }\r\n}\r\nexports.default = Kubernetes;\r\n","\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst exec_1 = require(\"@actions/exec\");\r\nclass MacBuilder {\r\n static run(actionFolder, workspace, buildParameters, silent = false) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const command = `bash`;\r\n yield exec_1.exec(command, [`-x`, `${actionFolder}/platforms/mac/entrypoint.sh`], { silent });\r\n });\r\n }\r\n}\r\nexports.default = MacBuilder;\r\n","\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst core = require('@actions/core');\r\nclass Output {\r\n static setBuildVersion(buildVersion) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield core.setOutput('buildVersion', buildVersion);\r\n });\r\n }\r\n}\r\nexports.default = Output;\r\n","\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst platform_setup_1 = require(\"./platform-setup/\");\r\nconst validate_windows_1 = __importDefault(require(\"./platform-validation/validate-windows\"));\r\nclass PlatformSetup {\r\n static setup(buildParameters, actionFolder) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n switch (process.platform) {\r\n case 'win32':\r\n validate_windows_1.default.validate(buildParameters);\r\n platform_setup_1.SetupWindows.setup(buildParameters);\r\n break;\r\n case 'darwin':\r\n yield platform_setup_1.SetupMac.setup(buildParameters, actionFolder);\r\n break;\r\n //Add other baseOS's here\r\n }\r\n });\r\n }\r\n}\r\nexports.default = PlatformSetup;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SetupMac = exports.SetupWindows = void 0;\r\nconst setup_windows_1 = __importDefault(require(\"./setup-windows\"));\r\nexports.SetupWindows = setup_windows_1.default;\r\nconst setup_mac_1 = __importDefault(require(\"./setup-mac\"));\r\nexports.SetupMac = setup_mac_1.default;\r\n","\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst unity_changeset_1 = require(\"unity-changeset\");\r\nclass SetupMac {\r\n static setup(buildParameters, actionFolder) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const unityChangeset = yield unity_changeset_1.getUnityChangeset(buildParameters.version);\r\n //Need to set environment variables from here because we execute\r\n //the scripts on the host for mac\r\n process.env.SCRIPT_DIRECTORY = `${actionFolder}/platforms/mac`;\r\n process.env.UNITY_VERSION = buildParameters.version;\r\n process.env.UNITY_CHANGESET = unityChangeset.changeset;\r\n process.env.UNITY_SERIAL = buildParameters.unitySerial;\r\n process.env.PROJECT_PATH = buildParameters.projectPath;\r\n process.env.BUILD_TARGET = buildParameters.platform;\r\n process.env.BUILD_NAME = buildParameters.buildName;\r\n process.env.BUILD_PATH = buildParameters.buildPath;\r\n process.env.BUILD_FILE = buildParameters.buildFile;\r\n process.env.BUILD_METHOD = buildParameters.buildMethod;\r\n process.env.VERSION = buildParameters.buildVersion;\r\n process.env.ANDROID_VERSION_CODE = buildParameters.androidVersionCode;\r\n process.env.ANDROID_KEYSTORE_NAME = buildParameters.androidKeystoreName;\r\n process.env.ANDROID_KEYSTORE_BASE64 = buildParameters.androidKeystoreBase64;\r\n process.env.ANDROID_KEYSTORE_PASS = buildParameters.androidKeystorePass;\r\n process.env.ANDROID_KEYALIAS_NAME = buildParameters.androidKeyaliasName;\r\n process.env.ANDROID_KEYALIAS_PASS = buildParameters.androidKeyaliasPass;\r\n process.env.ANDROID_TARGET_SDK_VERSION = buildParameters.androidTargetSdkVersion;\r\n process.env.ANDROID_SDK_MANAGER_PARAMETERS = buildParameters.androidSdkManagerParameters;\r\n process.env.CUSTOM_PARAMETERS = buildParameters.customParameters;\r\n process.env.CHOWN_FILES_TO = buildParameters.chownFilesTo;\r\n });\r\n }\r\n}\r\nexports.default = SetupMac;\r\n","\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst exec_1 = require(\"@actions/exec\");\r\nconst fs_1 = __importDefault(require(\"fs\"));\r\nclass SetupWindows {\r\n static setup(buildParameters) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield SetupWindows.setupWindowsRun(buildParameters.platform);\r\n });\r\n }\r\n //Setup prerequisite files/folders for a windows-based docker run\r\n static setupWindowsRun(platform, silent = false) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!fs_1.default.existsSync('c:/regkeys')) {\r\n fs_1.default.mkdirSync('c:/regkeys');\r\n }\r\n switch (platform) {\r\n //These all need the Windows 10 SDK\r\n case 'StandaloneWindows':\r\n case 'StandaloneWindows64':\r\n case 'WSAPlayer':\r\n this.generateWinSDKRegKeys(silent);\r\n break;\r\n }\r\n });\r\n }\r\n static generateWinSDKRegKeys(silent = false) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n // Export registry keys that point to the location of the windows 10 sdk\r\n const exportWinSDKRegKeysCommand = 'reg export \"HKLM\\\\SOFTWARE\\\\WOW6432Node\\\\Microsoft\\\\Microsoft SDKs\\\\Windows\\\\v10.0\" c:/regkeys/winsdk.reg /y';\r\n yield exec_1.exec(exportWinSDKRegKeysCommand, undefined, { silent });\r\n });\r\n }\r\n}\r\nexports.default = SetupWindows;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst fs_1 = __importDefault(require(\"fs\"));\r\nclass ValidateWindows {\r\n static validate(buildParameters) {\r\n ValidateWindows.validateWindowsPlatformRequirements(buildParameters.platform);\r\n if (!(process.env.UNITY_EMAIL && process.env.UNITY_PASSWORD)) {\r\n throw new Error(`Unity email and password must be set for Windows based builds to\n authenticate the license. Make sure to set them inside UNITY_EMAIL\n and UNITY_PASSWORD in Github Secrets and pass them into the environment.`);\r\n }\r\n }\r\n static validateWindowsPlatformRequirements(platform) {\r\n switch (platform) {\r\n case 'StandaloneWindows':\r\n this.checkForVisualStudio();\r\n this.checkForWin10SDK();\r\n break;\r\n case 'StandaloneWindows64':\r\n this.checkForVisualStudio();\r\n this.checkForWin10SDK();\r\n break;\r\n case 'WSAPlayer':\r\n this.checkForVisualStudio();\r\n this.checkForWin10SDK();\r\n break;\r\n case 'tvOS':\r\n this.checkForVisualStudio();\r\n break;\r\n }\r\n }\r\n static checkForWin10SDK() {\r\n //Check for Windows 10 SDK on runner\r\n const windows10SDKPathExists = fs_1.default.existsSync('C:/Program Files (x86)/Windows Kits');\r\n if (!windows10SDKPathExists) {\r\n throw new Error(`Windows 10 SDK not found in default location. Make sure\n the runner has a Windows 10 SDK installed in the default\n location.`);\r\n }\r\n }\r\n static checkForVisualStudio() {\r\n //Note: When upgrading to Server 2022, we will need to move to just \"program files\" since VS will be 64-bit\r\n const visualStudioInstallPathExists = fs_1.default.existsSync('C:/Program Files (x86)/Microsoft Visual Studio');\r\n const visualStudioDataPathExists = fs_1.default.existsSync('C:/ProgramData/Microsoft/VisualStudio');\r\n if (!visualStudioInstallPathExists || !visualStudioDataPathExists) {\r\n throw new Error(`Visual Studio not found at the default location.\n Make sure the runner has Visual Studio installed in the\n default location`);\r\n }\r\n }\r\n}\r\nexports.default = ValidateWindows;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass Platform {\r\n static get default() {\r\n return Platform.types.StandaloneWindows64;\r\n }\r\n static get types() {\r\n return {\r\n StandaloneOSX: 'StandaloneOSX',\r\n StandaloneWindows: 'StandaloneWindows',\r\n StandaloneWindows64: 'StandaloneWindows64',\r\n StandaloneLinux64: 'StandaloneLinux64',\r\n iOS: 'iOS',\r\n Android: 'Android',\r\n WebGL: 'WebGL',\r\n WSAPlayer: 'WSAPlayer',\r\n PS4: 'PS4',\r\n XboxOne: 'XboxOne',\r\n tvOS: 'tvOS',\r\n Switch: 'Switch',\r\n // Unsupported\r\n Lumin: 'Lumin',\r\n BJM: 'BJM',\r\n Stadia: 'Stadia',\r\n Facebook: 'Facebook',\r\n NoTarget: 'NoTarget',\r\n // Test specific\r\n Test: 'Test',\r\n };\r\n }\r\n static isWindows(platform) {\r\n switch (platform) {\r\n case Platform.types.StandaloneWindows:\r\n case Platform.types.StandaloneWindows64:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }\r\n static isAndroid(platform) {\r\n switch (platform) {\r\n case Platform.types.Android:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }\r\n}\r\nexports.default = Platform;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst input_1 = __importDefault(require(\"./input\"));\r\nconst unity_1 = __importDefault(require(\"./unity\"));\r\nconst action_1 = __importDefault(require(\"./action\"));\r\nclass Project {\r\n static get relativePath() {\r\n const { projectPath } = input_1.default;\r\n return `${projectPath}`;\r\n }\r\n static get absolutePath() {\r\n const { workspace } = action_1.default;\r\n return `${workspace}/${this.relativePath}`;\r\n }\r\n static get libraryFolder() {\r\n return `${this.relativePath}/${unity_1.default.libraryFolder}`;\r\n }\r\n}\r\nexports.default = Project;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst SDK = __importStar(require(\"aws-sdk\"));\r\nconst nanoid_1 = require(\"nanoid\");\r\nconst fs = __importStar(require(\"fs\"));\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst remote_builder_constants_1 = __importDefault(require(\"./remote-builder-constants\"));\r\nconst aws_build_runner_1 = __importDefault(require(\"./aws-build-runner\"));\r\nclass AWSBuildEnvironment {\r\n static runBuild(buildId, stackName, image, commands, mountdir, workingdir, environment, secrets) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const ECS = new SDK.ECS();\r\n const CF = new SDK.CloudFormation();\r\n const entrypoint = ['/bin/sh'];\r\n const taskDef = yield this.setupCloudFormations(CF, buildId, stackName, image, entrypoint, commands, mountdir, workingdir, secrets);\r\n try {\r\n yield aws_build_runner_1.default.runTask(taskDef, ECS, CF, environment, buildId);\r\n }\r\n finally {\r\n yield this.cleanupResources(CF, taskDef);\r\n }\r\n });\r\n }\r\n // static async setupPlatformResources() {\r\n // throw new Error('Method not implemented.');\r\n // }\r\n static getParameterTemplate(p1) {\r\n return `\n ${p1}:\n Type: String\n Default: ''\n`;\r\n }\r\n static getSecretTemplate(p1) {\r\n return `\n ${p1}Secret:\n Type: AWS::SecretsManager::Secret\n Properties:\n Name: !Join [ \"\", [ '${p1}', !Ref BUILDID ] ]\n SecretString: !Ref ${p1}\n`;\r\n }\r\n static getSecretDefinitionTemplate(p1, p2) {\r\n return `\n - Name: '${p1}'\n ValueFrom: !Ref ${p2}Secret\n`;\r\n }\r\n static insertAtTemplate(template, insertionKey, insertion) {\r\n const index = template.search(insertionKey) + insertionKey.length + '\\n'.length;\r\n template = [template.slice(0, index), insertion, template.slice(index)].join('');\r\n return template;\r\n }\r\n static setupCloudFormations(CF, buildUid, stackName, image, entrypoint, commands, mountdir, workingdir, secrets) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const logid = nanoid_1.customAlphabet(remote_builder_constants_1.default.alphabet, 9)();\r\n commands[1] += `\n echo \"${logid}\"\n `;\r\n const taskDefStackName = `${stackName}-${buildUid}`;\r\n let taskDefCloudFormation = this.readTaskCloudFormationTemplate();\r\n const cleanupTaskDefStackName = `${taskDefStackName}-cleanup`;\r\n const cleanupCloudFormation = fs.readFileSync(`${__dirname}/cloud-formations/cloudformation-stack-ttl.yml`, 'utf8');\r\n try {\r\n for (const secret of secrets) {\r\n taskDefCloudFormation = this.insertAtTemplate(taskDefCloudFormation, 'p1 - input', this.getParameterTemplate(secret.ParameterKey.replace(/[^\\dA-Za-z]/g, '')));\r\n taskDefCloudFormation = this.insertAtTemplate(taskDefCloudFormation, 'p2 - secret', this.getSecretTemplate(secret.ParameterKey.replace(/[^\\dA-Za-z]/g, '')));\r\n taskDefCloudFormation = this.insertAtTemplate(taskDefCloudFormation, 'p3 - container def', this.getSecretDefinitionTemplate(secret.EnvironmentVariable, secret.ParameterKey.replace(/[^\\dA-Za-z]/g, '')));\r\n }\r\n const mappedSecrets = secrets.map((x) => {\r\n return { ParameterKey: x.ParameterKey.replace(/[^\\dA-Za-z]/g, ''), ParameterValue: x.ParameterValue };\r\n });\r\n yield CF.createStack({\r\n StackName: taskDefStackName,\r\n TemplateBody: taskDefCloudFormation,\r\n Parameters: [\r\n {\r\n ParameterKey: 'ImageUrl',\r\n ParameterValue: image,\r\n },\r\n {\r\n ParameterKey: 'ServiceName',\r\n ParameterValue: taskDefStackName,\r\n },\r\n {\r\n ParameterKey: 'Command',\r\n ParameterValue: commands.join(','),\r\n },\r\n {\r\n ParameterKey: 'EntryPoint',\r\n ParameterValue: entrypoint.join(','),\r\n },\r\n {\r\n ParameterKey: 'WorkingDirectory',\r\n ParameterValue: workingdir,\r\n },\r\n {\r\n ParameterKey: 'EFSMountDirectory',\r\n ParameterValue: mountdir,\r\n },\r\n {\r\n ParameterKey: 'BUILDID',\r\n ParameterValue: buildUid,\r\n },\r\n ...mappedSecrets,\r\n ],\r\n }).promise();\r\n core.info('Creating worker cluster...');\r\n yield CF.createStack({\r\n StackName: cleanupTaskDefStackName,\r\n TemplateBody: cleanupCloudFormation,\r\n Capabilities: ['CAPABILITY_IAM'],\r\n Parameters: [\r\n {\r\n ParameterKey: 'StackName',\r\n ParameterValue: taskDefStackName,\r\n },\r\n {\r\n ParameterKey: 'DeleteStackName',\r\n ParameterValue: cleanupTaskDefStackName,\r\n },\r\n {\r\n ParameterKey: 'TTL',\r\n ParameterValue: '100',\r\n },\r\n {\r\n ParameterKey: 'BUILDID',\r\n ParameterValue: buildUid,\r\n },\r\n ],\r\n }).promise();\r\n core.info('Creating cleanup cluster...');\r\n yield CF.waitFor('stackCreateComplete', { StackName: taskDefStackName }).promise();\r\n }\r\n catch (error) {\r\n yield AWSBuildEnvironment.handleStackCreationFailure(error, CF, taskDefStackName, taskDefCloudFormation, secrets);\r\n throw error;\r\n }\r\n const taskDefResources = (yield CF.describeStackResources({\r\n StackName: taskDefStackName,\r\n }).promise()).StackResources;\r\n const baseResources = (yield CF.describeStackResources({ StackName: stackName }).promise()).StackResources;\r\n // in the future we should offer a parameter to choose if you want the guarnteed shutdown.\r\n core.info('Worker cluster created successfully (skipping wait for cleanup cluster to be ready)');\r\n return {\r\n taskDefStackName,\r\n taskDefCloudFormation,\r\n taskDefStackNameTTL: cleanupTaskDefStackName,\r\n ttlCloudFormation: cleanupCloudFormation,\r\n taskDefResources,\r\n baseResources,\r\n logid,\r\n };\r\n });\r\n }\r\n static handleStackCreationFailure(error, CF, taskDefStackName, taskDefCloudFormation, secrets) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n core.info(JSON.stringify(secrets, undefined, 4));\r\n core.info(taskDefCloudFormation);\r\n const events = (yield CF.describeStackEvents({ StackName: taskDefStackName }).promise()).StackEvents;\r\n const resources = (yield CF.describeStackResources({ StackName: taskDefStackName }).promise()).StackResources;\r\n core.info(JSON.stringify(events, undefined, 4));\r\n core.info(JSON.stringify(resources, undefined, 4));\r\n core.error(error);\r\n });\r\n }\r\n static readTaskCloudFormationTemplate() {\r\n return fs.readFileSync(`${__dirname}/cloud-formations/task-def-formation.yml`, 'utf8');\r\n }\r\n static cleanupResources(CF, taskDef) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n core.info('Cleanup starting');\r\n yield CF.deleteStack({\r\n StackName: taskDef.taskDefStackName,\r\n }).promise();\r\n yield CF.deleteStack({\r\n StackName: taskDef.taskDefStackNameTTL,\r\n }).promise();\r\n yield CF.waitFor('stackDeleteComplete', {\r\n StackName: taskDef.taskDefStackName,\r\n }).promise();\r\n // Currently too slow and causes too much waiting\r\n yield CF.waitFor('stackDeleteComplete', {\r\n StackName: taskDef.taskDefStackNameTTL,\r\n }).promise();\r\n core.info('Cleanup complete');\r\n });\r\n }\r\n}\r\nexports.default = AWSBuildEnvironment;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst AWS = __importStar(require(\"aws-sdk\"));\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst zlib = __importStar(require(\"zlib\"));\r\nclass AWSBuildRunner {\r\n static runTask(taskDef, ECS, CF, environment, buildUid) {\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const cluster = ((_b = (_a = taskDef.baseResources) === null || _a === void 0 ? void 0 : _a.find((x) => x.LogicalResourceId === 'ECSCluster')) === null || _b === void 0 ? void 0 : _b.PhysicalResourceId) || '';\r\n const taskDefinition = ((_d = (_c = taskDef.taskDefResources) === null || _c === void 0 ? void 0 : _c.find((x) => x.LogicalResourceId === 'TaskDefinition')) === null || _d === void 0 ? void 0 : _d.PhysicalResourceId) || '';\r\n const SubnetOne = ((_f = (_e = taskDef.baseResources) === null || _e === void 0 ? void 0 : _e.find((x) => x.LogicalResourceId === 'PublicSubnetOne')) === null || _f === void 0 ? void 0 : _f.PhysicalResourceId) || '';\r\n const SubnetTwo = ((_h = (_g = taskDef.baseResources) === null || _g === void 0 ? void 0 : _g.find((x) => x.LogicalResourceId === 'PublicSubnetTwo')) === null || _h === void 0 ? void 0 : _h.PhysicalResourceId) || '';\r\n const ContainerSecurityGroup = ((_k = (_j = taskDef.baseResources) === null || _j === void 0 ? void 0 : _j.find((x) => x.LogicalResourceId === 'ContainerSecurityGroup')) === null || _k === void 0 ? void 0 : _k.PhysicalResourceId) || '';\r\n const streamName = ((_m = (_l = taskDef.taskDefResources) === null || _l === void 0 ? void 0 : _l.find((x) => x.LogicalResourceId === 'KinesisStream')) === null || _m === void 0 ? void 0 : _m.PhysicalResourceId) || '';\r\n const task = yield ECS.runTask({\r\n cluster,\r\n taskDefinition,\r\n platformVersion: '1.4.0',\r\n overrides: {\r\n containerOverrides: [\r\n {\r\n name: taskDef.taskDefStackName,\r\n environment: [...environment, { name: 'BUILDID', value: buildUid }],\r\n },\r\n ],\r\n },\r\n launchType: 'FARGATE',\r\n networkConfiguration: {\r\n awsvpcConfiguration: {\r\n subnets: [SubnetOne, SubnetTwo],\r\n assignPublicIp: 'ENABLED',\r\n securityGroups: [ContainerSecurityGroup],\r\n },\r\n },\r\n }).promise();\r\n core.info('Task is starting on worker cluster');\r\n const taskArn = ((_o = task.tasks) === null || _o === void 0 ? void 0 : _o[0].taskArn) || '';\r\n try {\r\n yield ECS.waitFor('tasksRunning', { tasks: [taskArn], cluster }).promise();\r\n }\r\n catch (error) {\r\n yield new Promise((resolve) => setTimeout(resolve, 3000));\r\n const describeTasks = yield ECS.describeTasks({\r\n tasks: [taskArn],\r\n cluster,\r\n }).promise();\r\n core.info(`Task has ended ${(_q = (_p = describeTasks.tasks) === null || _p === void 0 ? void 0 : _p[0].containers) === null || _q === void 0 ? void 0 : _q[0].lastStatus}`);\r\n core.setFailed(error);\r\n core.error(error);\r\n }\r\n core.info(`Task is running on worker cluster`);\r\n yield this.streamLogsUntilTaskStops(ECS, CF, taskDef, cluster, taskArn, streamName);\r\n yield ECS.waitFor('tasksStopped', { cluster, tasks: [taskArn] }).promise();\r\n const exitCode = (_s = (_r = (yield ECS.describeTasks({\r\n tasks: [taskArn],\r\n cluster,\r\n }).promise()).tasks) === null || _r === void 0 ? void 0 : _r[0].containers) === null || _s === void 0 ? void 0 : _s[0].exitCode;\r\n if (exitCode !== 0) {\r\n core.error(`job failed with exit code ${exitCode}`);\r\n throw new Error(`job failed with exit code ${exitCode}`);\r\n }\r\n else {\r\n core.info(`Task has finished successfully`);\r\n }\r\n });\r\n }\r\n static streamLogsUntilTaskStops(ECS, CF, taskDef, clusterName, taskArn, kinesisStreamName) {\r\n var _a;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n // watching logs\r\n const kinesis = new AWS.Kinesis();\r\n const getTaskData = () => __awaiter(this, void 0, void 0, function* () {\r\n var _b;\r\n const tasks = yield ECS.describeTasks({\r\n cluster: clusterName,\r\n tasks: [taskArn],\r\n }).promise();\r\n return (_b = tasks.tasks) === null || _b === void 0 ? void 0 : _b[0];\r\n });\r\n const stream = yield kinesis\r\n .describeStream({\r\n StreamName: kinesisStreamName,\r\n })\r\n .promise();\r\n let iterator = (yield kinesis\r\n .getShardIterator({\r\n ShardIteratorType: 'TRIM_HORIZON',\r\n StreamName: stream.StreamDescription.StreamName,\r\n ShardId: stream.StreamDescription.Shards[0].ShardId,\r\n })\r\n .promise()).ShardIterator || '';\r\n yield CF.waitFor('stackCreateComplete', { StackName: taskDef.taskDefStackNameTTL }).promise();\r\n core.info(`Task status is ${(_a = (yield getTaskData())) === null || _a === void 0 ? void 0 : _a.lastStatus}`);\r\n const logBaseUrl = `https://${AWS.config.region}.console.aws.amazon.com/cloudwatch/home?region=${AWS.config.region}#logsV2:log-groups/log-group/${taskDef.taskDefStackName}`;\r\n core.info(`You can also see the logs at AWS Cloud Watch: ${logBaseUrl}`);\r\n let readingLogs = true;\r\n let timestamp = 0;\r\n while (readingLogs) {\r\n yield new Promise((resolve) => setTimeout(resolve, 1500));\r\n const taskData = yield getTaskData();\r\n if ((taskData === null || taskData === void 0 ? void 0 : taskData.lastStatus) !== 'RUNNING') {\r\n if (timestamp === 0) {\r\n core.info('Task stopped, streaming end of logs');\r\n timestamp = Date.now();\r\n }\r\n if (timestamp !== 0 && Date.now() - timestamp < 30000) {\r\n core.info('Task status is not RUNNING for 30 seconds, last query for logs');\r\n readingLogs = false;\r\n }\r\n }\r\n const records = yield kinesis\r\n .getRecords({\r\n ShardIterator: iterator,\r\n })\r\n .promise();\r\n iterator = records.NextShardIterator || '';\r\n if (records.Records.length > 0 && iterator) {\r\n for (let index = 0; index < records.Records.length; index++) {\r\n const json = JSON.parse(zlib.gunzipSync(Buffer.from(records.Records[index].Data, 'base64')).toString('utf8'));\r\n if (json.messageType === 'DATA_MESSAGE') {\r\n for (let logEventsIndex = 0; logEventsIndex < json.logEvents.length; logEventsIndex++) {\r\n if (json.logEvents[logEventsIndex].message.includes(taskDef.logid)) {\r\n core.info('End of task logs');\r\n readingLogs = false;\r\n }\r\n else {\r\n core.info(json.logEvents[logEventsIndex].message);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n }\r\n}\r\nexports.default = AWSBuildRunner;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass RemoteBuilderConstants {\r\n}\r\nRemoteBuilderConstants.alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\r\nexports.default = RemoteBuilderConstants;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst nanoid_1 = require(\"nanoid\");\r\nconst aws_build_platform_1 = __importDefault(require(\"./aws-build-platform\"));\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst remote_builder_constants_1 = __importDefault(require(\"./remote-builder-constants\"));\r\nconst repositoryDirectoryName = 'repo';\r\nconst efsDirectoryName = 'data';\r\nconst cacheDirectoryName = 'cache';\r\nclass RemoteBuilder {\r\n static build(buildParameters, baseImage) {\r\n var _a;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n try {\r\n this.SteamDeploy = process.env.STEAM_DEPLOY !== undefined || false;\r\n const nanoid = nanoid_1.customAlphabet(remote_builder_constants_1.default.alphabet, 4);\r\n const buildUid = `${process.env.GITHUB_RUN_NUMBER}-${buildParameters.platform\r\n .replace('Standalone', '')\r\n .replace('standalone', '')}-${nanoid()}`;\r\n const defaultBranchName = ((_a = process.env.GITHUB_REF) === null || _a === void 0 ? void 0 : _a.split('/').filter((x) => {\r\n x = x[0].toUpperCase() + x.slice(1);\r\n return x;\r\n }).join('')) || '';\r\n const branchName = process.env.REMOTE_BUILDER_CACHE !== undefined ? process.env.REMOTE_BUILDER_CACHE : defaultBranchName;\r\n const token = buildParameters.githubToken;\r\n const defaultSecretsArray = [\r\n {\r\n ParameterKey: 'GithubToken',\r\n EnvironmentVariable: 'GITHUB_TOKEN',\r\n ParameterValue: token,\r\n },\r\n ];\r\n yield RemoteBuilder.SetupStep(buildUid, buildParameters, branchName, defaultSecretsArray);\r\n yield RemoteBuilder.BuildStep(buildUid, buildParameters, baseImage, defaultSecretsArray);\r\n yield RemoteBuilder.CompressionStep(buildUid, buildParameters, branchName, defaultSecretsArray);\r\n yield RemoteBuilder.UploadArtifacts(buildUid, buildParameters, branchName, defaultSecretsArray);\r\n if (this.SteamDeploy) {\r\n yield RemoteBuilder.DeployToSteam(buildUid, buildParameters, defaultSecretsArray);\r\n }\r\n }\r\n catch (error) {\r\n core.setFailed(error);\r\n core.error(error);\r\n }\r\n });\r\n }\r\n static SetupStep(buildUid, buildParameters, branchName, defaultSecretsArray) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n core.info('Starting step 1/4 clone and restore cache)');\r\n yield aws_build_platform_1.default.runBuild(buildUid, buildParameters.awsStackName, 'alpine/git', [\r\n '-c',\r\n `apk update;\n apk add unzip;\n apk add git-lfs;\n apk add jq;\n # Get source repo for project to be built and game-ci repo for utilties\n git clone https://${buildParameters.githubToken}@github.com/${process.env.GITHUB_REPOSITORY}.git ${buildUid}/${repositoryDirectoryName} -q\n git clone https://${buildParameters.githubToken}@github.com/game-ci/unity-builder.git ${buildUid}/builder -q\n git clone https://${buildParameters.githubToken}@github.com/game-ci/steam-deploy.git ${buildUid}/steam -q\n cd /${efsDirectoryName}/${buildUid}/${repositoryDirectoryName}/\n git checkout $GITHUB_SHA\n cd /${efsDirectoryName}/\n # Look for usable cache\n if [ ! -d ${cacheDirectoryName} ]; then\n mkdir ${cacheDirectoryName}\n fi\n cd ${cacheDirectoryName}\n if [ ! -d \"${branchName}\" ]; then\n mkdir \"${branchName}\"\n fi\n cd \"${branchName}\"\n echo ''\n echo \"Cached Libraries for ${branchName} from previous builds:\"\n ls\n echo ''\n ls \"/${efsDirectoryName}/${buildUid}/${repositoryDirectoryName}/${buildParameters.projectPath}\"\n libDir=\"/${efsDirectoryName}/${buildUid}/${repositoryDirectoryName}/${buildParameters.projectPath}/Library\"\n if [ -d \"$libDir\" ]; then\n rm -r \"$libDir\"\n echo \"Setup .gitignore to ignore Library folder and remove it from builds\"\n fi\n echo 'Checking cache'\n # Restore cache\n latest=$(ls -t | head -1)\n if [ ! -z \"$latest\" ]; then\n echo \"Library cache exists from build $latest from ${branchName}\"\n echo 'Creating empty Library folder for cache'\n mkdir $libDir\n unzip -q $latest -d $libDir\n # purge cache\n ${process.env.PURGE_REMOTE_BUILDER_CACHE === undefined ? '#' : ''} rm -r $libDir\n else\n echo 'Cache does not exist'\n fi\n # Print out important directories\n echo ''\n echo 'Repo:'\n ls /${efsDirectoryName}/${buildUid}/${repositoryDirectoryName}/\n echo ''\n echo 'Project:'\n ls /${efsDirectoryName}/${buildUid}/${repositoryDirectoryName}/${buildParameters.projectPath}\n echo ''\n echo 'Library:'\n ls /${efsDirectoryName}/${buildUid}/${repositoryDirectoryName}/${buildParameters.projectPath}/Library/\n echo ''\n `,\r\n ], `/${efsDirectoryName}`, `/${efsDirectoryName}/`, [\r\n {\r\n name: 'GITHUB_SHA',\r\n value: process.env.GITHUB_SHA || '',\r\n },\r\n ], defaultSecretsArray);\r\n });\r\n }\r\n static BuildStep(buildUid, buildParameters, baseImage, defaultSecretsArray) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const buildSecrets = new Array();\r\n buildSecrets.push(...defaultSecretsArray);\r\n if (process.env.UNITY_LICENSE)\r\n buildSecrets.push({\r\n ParameterKey: 'UnityLicense',\r\n EnvironmentVariable: 'UNITY_LICENSE',\r\n ParameterValue: process.env.UNITY_LICENSE,\r\n });\r\n if (process.env.UNITY_EMAIL)\r\n buildSecrets.push({\r\n ParameterKey: 'UnityEmail',\r\n EnvironmentVariable: 'UNITY_EMAIL',\r\n ParameterValue: process.env.UNITY_EMAIL,\r\n });\r\n if (process.env.UNITY_PASSWORD)\r\n buildSecrets.push({\r\n ParameterKey: 'UnityPassword',\r\n EnvironmentVariable: 'UNITY_PASSWORD',\r\n ParameterValue: process.env.UNITY_PASSWORD,\r\n });\r\n if (process.env.UNITY_SERIAL)\r\n buildSecrets.push({\r\n ParameterKey: 'UnitySerial',\r\n EnvironmentVariable: 'UNITY_SERIAL',\r\n ParameterValue: process.env.UNITY_SERIAL,\r\n });\r\n if (buildParameters.androidKeystoreBase64)\r\n buildSecrets.push({\r\n ParameterKey: 'AndroidKeystoreBase64',\r\n EnvironmentVariable: 'ANDROID_KEYSTORE_BASE64',\r\n ParameterValue: buildParameters.androidKeystoreBase64,\r\n });\r\n if (buildParameters.androidKeystorePass)\r\n buildSecrets.push({\r\n ParameterKey: 'AndroidKeystorePass',\r\n EnvironmentVariable: 'ANDROID_KEYSTORE_PASS',\r\n ParameterValue: buildParameters.androidKeystorePass,\r\n });\r\n if (buildParameters.androidKeyaliasPass)\r\n buildSecrets.push({\r\n ParameterKey: 'AndroidKeyAliasPass',\r\n EnvironmentVariable: 'AWS_ACCESS_KEY_ALIAS_PASS',\r\n ParameterValue: buildParameters.androidKeyaliasPass,\r\n });\r\n core.info('Starting part 2/4 (build unity project)');\r\n yield aws_build_platform_1.default.runBuild(buildUid, buildParameters.awsStackName, baseImage.toString(), [\r\n '-c',\r\n `\n cp -r /${efsDirectoryName}/${buildUid}/builder/dist/default-build-script/ /UnityBuilderAction;\n cp -r /${efsDirectoryName}/${buildUid}/builder/dist/entrypoint.sh /entrypoint.sh;\n cp -r /${efsDirectoryName}/${buildUid}/builder/dist/steps/ /steps;\n chmod -R +x /entrypoint.sh;\n chmod -R +x /steps;\n /entrypoint.sh;\n `,\r\n ], `/${efsDirectoryName}`, `/${efsDirectoryName}/${buildUid}/${repositoryDirectoryName}/`, [\r\n {\r\n name: 'ContainerMemory',\r\n value: buildParameters.remoteBuildMemory,\r\n },\r\n {\r\n name: 'ContainerCpu',\r\n value: buildParameters.remoteBuildCpu,\r\n },\r\n {\r\n name: 'GITHUB_WORKSPACE',\r\n value: `/${efsDirectoryName}/${buildUid}/${repositoryDirectoryName}/`,\r\n },\r\n {\r\n name: 'PROJECT_PATH',\r\n value: buildParameters.projectPath,\r\n },\r\n {\r\n name: 'BUILD_PATH',\r\n value: buildParameters.buildPath,\r\n },\r\n {\r\n name: 'BUILD_FILE',\r\n value: buildParameters.buildFile,\r\n },\r\n {\r\n name: 'BUILD_NAME',\r\n value: buildParameters.buildName,\r\n },\r\n {\r\n name: 'BUILD_METHOD',\r\n value: buildParameters.buildMethod,\r\n },\r\n {\r\n name: 'CUSTOM_PARAMETERS',\r\n value: buildParameters.customParameters,\r\n },\r\n {\r\n name: 'BUILD_TARGET',\r\n value: buildParameters.platform,\r\n },\r\n {\r\n name: 'ANDROID_VERSION_CODE',\r\n value: buildParameters.androidVersionCode.toString(),\r\n },\r\n {\r\n name: 'ANDROID_KEYSTORE_NAME',\r\n value: buildParameters.androidKeystoreName,\r\n },\r\n {\r\n name: 'ANDROID_KEYALIAS_NAME',\r\n value: buildParameters.androidKeyaliasName,\r\n },\r\n ], buildSecrets);\r\n });\r\n }\r\n static CompressionStep(buildUid, buildParameters, branchName, defaultSecretsArray) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n core.info('Starting step 3/4 build compression');\r\n // Cleanup\r\n yield aws_build_platform_1.default.runBuild(buildUid, buildParameters.awsStackName, 'alpine', [\r\n '-c',\r\n `\n apk update\n apk add zip\n cd Library\n zip -r lib-${buildUid}.zip .*\n mv lib-${buildUid}.zip /${efsDirectoryName}/${cacheDirectoryName}/${branchName}/lib-${buildUid}.zip\n cd ../../\n zip -r build-${buildUid}.zip ${buildParameters.buildPath}/*\n mv build-${buildUid}.zip /${efsDirectoryName}/${buildUid}/build-${buildUid}.zip\n `,\r\n ], `/${efsDirectoryName}`, `/${efsDirectoryName}/${buildUid}/${repositoryDirectoryName}/${buildParameters.projectPath}`, [\r\n {\r\n name: 'GITHUB_SHA',\r\n value: process.env.GITHUB_SHA || '',\r\n },\r\n ], defaultSecretsArray);\r\n core.info('compression step complete');\r\n });\r\n }\r\n static UploadArtifacts(buildUid, buildParameters, branchName, defaultSecretsArray) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n core.info('Starting step 4/4 upload build to s3');\r\n yield aws_build_platform_1.default.runBuild(buildUid, buildParameters.awsStackName, 'amazon/aws-cli', [\r\n '-c',\r\n `\n aws s3 cp ${buildUid}/build-${buildUid}.zip s3://game-ci-storage/\n # no need to upload Library cache for now\n # aws s3 cp /${efsDirectoryName}/${cacheDirectoryName}/${branchName}/lib-${buildUid}.zip s3://game-ci-storage/\n ${this.SteamDeploy ? '#' : ''} rm -r ${buildUid}\n `,\r\n ], `/${efsDirectoryName}`, `/${efsDirectoryName}/`, [\r\n {\r\n name: 'GITHUB_SHA',\r\n value: process.env.GITHUB_SHA || '',\r\n },\r\n {\r\n name: 'AWS_DEFAULT_REGION',\r\n value: process.env.AWS_DEFAULT_REGION || '',\r\n },\r\n ], [\r\n {\r\n ParameterKey: 'AWSAccessKeyID',\r\n EnvironmentVariable: 'AWS_ACCESS_KEY_ID',\r\n ParameterValue: process.env.AWS_ACCESS_KEY_ID || '',\r\n },\r\n {\r\n ParameterKey: 'AWSSecretAccessKey',\r\n EnvironmentVariable: 'AWS_SECRET_ACCESS_KEY',\r\n ParameterValue: process.env.AWS_SECRET_ACCESS_KEY || '',\r\n },\r\n ...defaultSecretsArray,\r\n ]);\r\n });\r\n }\r\n static DeployToSteam(buildUid, buildParameters, defaultSecretsArray) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n core.info('Starting steam deployment');\r\n yield aws_build_platform_1.default.runBuild(buildUid, buildParameters.awsStackName, 'cm2network/steamcmd:root', [\r\n '-c',\r\n `\n ls\n ls /\n cp -r /${efsDirectoryName}/${buildUid}/steam/action/entrypoint.sh /entrypoint.sh;\n cp -r /${efsDirectoryName}/${buildUid}/steam/action/steps/ /steps;\n chmod -R +x /entrypoint.sh;\n chmod -R +x /steps;\n /entrypoint.sh;\n rm -r /${efsDirectoryName}/${buildUid}\n `,\r\n ], `/${efsDirectoryName}`, `/${efsDirectoryName}/${buildUid}/steam/action/`, [\r\n {\r\n name: 'GITHUB_SHA',\r\n value: process.env.GITHUB_SHA || '',\r\n },\r\n ], [\r\n {\r\n EnvironmentVariable: 'INPUT_APPID',\r\n ParameterKey: 'appId',\r\n ParameterValue: process.env.APP_ID || '',\r\n },\r\n {\r\n EnvironmentVariable: 'INPUT_BUILDDESCRIPTION',\r\n ParameterKey: 'buildDescription',\r\n ParameterValue: process.env.BUILD_DESCRIPTION || '',\r\n },\r\n {\r\n EnvironmentVariable: 'INPUT_ROOTPATH',\r\n ParameterKey: 'rootPath',\r\n ParameterValue: process.env.ROOT_PATH || '',\r\n },\r\n {\r\n EnvironmentVariable: 'INPUT_RELEASEBRANCH',\r\n ParameterKey: 'releaseBranch',\r\n ParameterValue: process.env.RELEASE_BRANCH || '',\r\n },\r\n {\r\n EnvironmentVariable: 'INPUT_LOCALCONTENTSERVER',\r\n ParameterKey: 'localContentServer',\r\n ParameterValue: process.env.LOCAL_CONTENT_SERVER || '',\r\n },\r\n {\r\n EnvironmentVariable: 'INPUT_PREVIEWENABLED',\r\n ParameterKey: 'previewEnabled',\r\n ParameterValue: process.env.PREVIEW_ENABLED || '',\r\n },\r\n ...defaultSecretsArray,\r\n ]);\r\n });\r\n }\r\n}\r\nRemoteBuilder.SteamDeploy = false;\r\nexports.default = RemoteBuilder;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst exec_1 = require(\"@actions/exec\");\r\nclass System {\r\n static run(command, arguments_ = [], options = {}) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let result = '';\r\n let error = '';\r\n let debug = '';\r\n const listeners = {\r\n stdout: (dataBuffer) => {\r\n result += dataBuffer.toString();\r\n },\r\n stderr: (dataBuffer) => {\r\n error += dataBuffer.toString();\r\n },\r\n debug: (dataString) => {\r\n debug += dataString.toString();\r\n },\r\n };\r\n const showOutput = () => {\r\n if (debug !== '') {\r\n core.debug(debug);\r\n }\r\n if (result !== '') {\r\n core.info(result);\r\n }\r\n if (error !== '') {\r\n core.warning(error);\r\n }\r\n };\r\n const throwContextualError = (message) => {\r\n let commandAsString = command;\r\n if (Array.isArray(arguments_)) {\r\n commandAsString += ` ${arguments_.join(' ')}`;\r\n }\r\n else if (typeof arguments_ === 'string') {\r\n commandAsString += ` ${arguments_}`;\r\n }\r\n throw new Error(`Failed to run \"${commandAsString}\".\\n ${message}`);\r\n };\r\n try {\r\n const exitCode = yield exec_1.exec(command, arguments_, Object.assign({ silent: true, listeners }, options));\r\n showOutput();\r\n if (exitCode !== 0) {\r\n throwContextualError(`Command returned non-zero exit code.\\nError: ${error}`);\r\n }\r\n }\r\n catch (inCommandError) {\r\n showOutput();\r\n throwContextualError(`In-command error caught: ${inCommandError}`);\r\n }\r\n return result;\r\n });\r\n }\r\n}\r\nexports.default = System;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst fs = __importStar(require(\"fs\"));\r\nconst path_1 = __importDefault(require(\"path\"));\r\nclass UnityVersioning {\r\n static get versionPattern() {\r\n return /20\\d{2}\\.\\d\\.\\w{3,4}|3/;\r\n }\r\n static determineUnityVersion(projectPath, unityVersion) {\r\n if (unityVersion === 'auto') {\r\n return UnityVersioning.read(projectPath);\r\n }\r\n return unityVersion;\r\n }\r\n static read(projectPath) {\r\n const filePath = path_1.default.join(projectPath, 'ProjectSettings', 'ProjectVersion.txt');\r\n if (!fs.existsSync(filePath)) {\r\n throw new Error(`Project settings file not found at \"${filePath}\". Have you correctly set the projectPath?`);\r\n }\r\n return UnityVersioning.parse(fs.readFileSync(filePath, 'utf8'));\r\n }\r\n static parse(projectVersionTxt) {\r\n const matches = projectVersionTxt.match(UnityVersioning.versionPattern);\r\n if (!matches || matches.length === 0) {\r\n throw new Error(`Failed to parse version from \"${projectVersionTxt}\".`);\r\n }\r\n return matches[0];\r\n }\r\n}\r\nexports.default = UnityVersioning;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass Unity {\r\n static get libraryFolder() {\r\n return 'Library';\r\n }\r\n}\r\nexports.default = Unity;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst not_implemented_exception_1 = __importDefault(require(\"./error/not-implemented-exception\"));\r\nconst validation_error_1 = __importDefault(require(\"./error/validation-error\"));\r\nconst input_1 = __importDefault(require(\"./input\"));\r\nconst system_1 = __importDefault(require(\"./system\"));\r\nclass Versioning {\r\n static get projectPath() {\r\n return input_1.default.projectPath;\r\n }\r\n static get isDirtyAllowed() {\r\n return input_1.default.allowDirtyBuild;\r\n }\r\n static get strategies() {\r\n return { None: 'None', Semantic: 'Semantic', Tag: 'Tag', Custom: 'Custom' };\r\n }\r\n /**\r\n * Get the branch name of the (related) branch\r\n */\r\n static get branch() {\r\n // Todo - use optional chaining (https://github.com/zeit/ncc/issues/534)\r\n return this.headRef || (this.ref && this.ref.slice(11));\r\n }\r\n /**\r\n * For pull requests we can reliably use GITHUB_HEAD_REF\r\n */\r\n static get headRef() {\r\n return process.env.GITHUB_HEAD_REF;\r\n }\r\n /**\r\n * For branches GITHUB_REF will have format `refs/heads/feature-branch-1`\r\n */\r\n static get ref() {\r\n return process.env.GITHUB_REF;\r\n }\r\n /**\r\n * The commit SHA that triggered the workflow run.\r\n */\r\n static get sha() {\r\n return process.env.GITHUB_SHA;\r\n }\r\n /**\r\n * Maximum number of lines to print when logging the git diff\r\n */\r\n static get maxDiffLines() {\r\n return 60;\r\n }\r\n /**\r\n * Log up to maxDiffLines of the git diff.\r\n */\r\n static logDiff() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const diffCommand = `git --no-pager diff | head -n ${this.maxDiffLines.toString()}`;\r\n yield system_1.default.run('sh', undefined, {\r\n input: Buffer.from(diffCommand),\r\n silent: true,\r\n });\r\n });\r\n }\r\n /**\r\n * Regex to parse version description into separate fields\r\n */\r\n static get descriptionRegex1() {\r\n return /^v?([\\d.]+)-(\\d+)-g(\\w+)-?(\\w+)*/g;\r\n }\r\n static get descriptionRegex2() {\r\n return /^v?([\\d.]+-\\w+)-(\\d+)-g(\\w+)-?(\\w+)*/g;\r\n }\r\n static get descriptionRegex3() {\r\n return /^v?([\\d.]+-\\w+\\.\\d+)-(\\d+)-g(\\w+)-?(\\w+)*/g;\r\n }\r\n static determineVersion(strategy, inputVersion) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n // Validate input\r\n if (!Object.hasOwnProperty.call(this.strategies, strategy)) {\r\n throw new validation_error_1.default(`Versioning strategy should be one of ${Object.values(this.strategies).join(', ')}.`);\r\n }\r\n let version;\r\n switch (strategy) {\r\n case this.strategies.None:\r\n version = 'none';\r\n break;\r\n case this.strategies.Custom:\r\n version = inputVersion;\r\n break;\r\n case this.strategies.Semantic:\r\n version = yield this.generateSemanticVersion();\r\n break;\r\n case this.strategies.Tag:\r\n version = yield this.generateTagVersion();\r\n break;\r\n default:\r\n throw new not_implemented_exception_1.default(`Strategy ${strategy} is not implemented.`);\r\n }\r\n return version;\r\n });\r\n }\r\n /**\r\n * Automatically generates a version based on SemVer out of the box.\r\n *\r\n * The version works as follows: `..` for example `0.1.2`.\r\n *\r\n * The latest tag dictates `.`\r\n * The number of commits since that tag dictates``.\r\n *\r\n * @See: https://semver.org/\r\n */\r\n static generateSemanticVersion() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (yield this.isShallow()) {\r\n yield this.fetch();\r\n }\r\n yield this.logDiff();\r\n if ((yield this.isDirty()) && !this.isDirtyAllowed) {\r\n throw new Error('Branch is dirty. Refusing to base semantic version on uncommitted changes');\r\n }\r\n if (!(yield this.hasAnyVersionTags())) {\r\n const version = `0.0.${yield this.getTotalNumberOfCommits()}`;\r\n core.info(`Generated version ${version} (no version tags found).`);\r\n return version;\r\n }\r\n const versionDescriptor = yield this.parseSemanticVersion();\r\n if (versionDescriptor) {\r\n const { tag, commits, hash } = versionDescriptor;\r\n // Ensure 3 digits (commits should always be patch level)\r\n const [major, minor, patch] = `${tag}.${commits}`.split('.');\r\n const threeDigitVersion = /^\\d+$/.test(patch) ? `${major}.${minor}.${patch}` : `${major}.0.${minor}`;\r\n core.info(`Found semantic version ${threeDigitVersion} for ${this.branch}@${hash}`);\r\n return `${threeDigitVersion}`;\r\n }\r\n const version = `0.0.${yield this.getTotalNumberOfCommits()}`;\r\n core.info(`Generated version ${version} (semantic version couldn't be determined).`);\r\n return version;\r\n });\r\n }\r\n /**\r\n * Generate the proper version for unity based on an existing tag.\r\n */\r\n static generateTagVersion() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let tag = yield this.getTag();\r\n if (tag.charAt(0) === 'v') {\r\n tag = tag.slice(1);\r\n }\r\n return tag;\r\n });\r\n }\r\n /**\r\n * Parses the versionDescription into their named parts.\r\n */\r\n static parseSemanticVersion() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const description = yield this.getVersionDescription();\r\n try {\r\n const [match, tag, commits, hash] = this.descriptionRegex1.exec(description);\r\n return {\r\n match,\r\n tag,\r\n commits,\r\n hash,\r\n };\r\n }\r\n catch (_a) {\r\n try {\r\n const [match, tag, commits, hash] = this.descriptionRegex2.exec(description);\r\n return {\r\n match,\r\n tag,\r\n commits,\r\n hash,\r\n };\r\n }\r\n catch (_b) {\r\n try {\r\n const [match, tag, commits, hash] = this.descriptionRegex3.exec(description);\r\n return {\r\n match,\r\n tag,\r\n commits,\r\n hash,\r\n };\r\n }\r\n catch (_c) {\r\n core.warning(`Failed to parse git describe output or version can not be determined through: \"${description}\".`);\r\n return false;\r\n }\r\n }\r\n }\r\n });\r\n }\r\n /**\r\n * Returns whether the repository is shallow.\r\n */\r\n static isShallow() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const output = yield this.git(['rev-parse', '--is-shallow-repository']);\r\n return output !== 'false\\n';\r\n });\r\n }\r\n /**\r\n * Retrieves refs from the configured remote.\r\n *\r\n * Fetch unshallow for incomplete repository, but fall back to normal fetch.\r\n *\r\n * Note: `--all` should not be used, and would break fetching for push event.\r\n */\r\n static fetch() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n try {\r\n yield this.git(['fetch', '--unshallow']);\r\n }\r\n catch (error) {\r\n core.warning(`Fetch --unshallow caught: ${error}`);\r\n yield this.git(['fetch']);\r\n }\r\n });\r\n }\r\n /**\r\n * Retrieves information about the branch.\r\n *\r\n * Format: `v0.12-24-gd2198ab`\r\n *\r\n * In this format v0.12 is the latest tag, 24 are the number of commits since, and gd2198ab\r\n * identifies the current commit.\r\n */\r\n static getVersionDescription() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return this.git(['describe', '--long', '--tags', '--always', this.sha]);\r\n });\r\n }\r\n /**\r\n * Returns whether there are uncommitted changes that are not ignored.\r\n */\r\n static isDirty() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const output = yield this.git(['status', '--porcelain']);\r\n const isDirty = output !== '';\r\n if (isDirty) {\r\n core.warning('Changes were made to the following files and folders:\\n');\r\n core.warning(output);\r\n }\r\n return isDirty;\r\n });\r\n }\r\n /**\r\n * Get the tag if there is one pointing at HEAD\r\n */\r\n static getTag() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return (yield this.git(['tag', '--points-at', 'HEAD'])).trim();\r\n });\r\n }\r\n /**\r\n * Whether or not the repository has any version tags yet.\r\n */\r\n static hasAnyVersionTags() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const numberOfCommitsAsString = yield system_1.default.run('sh', undefined, {\r\n input: Buffer.from('git tag --list --merged HEAD | grep v[0-9]* | wc -l'),\r\n cwd: this.projectPath,\r\n silent: false,\r\n });\r\n const numberOfCommits = Number.parseInt(numberOfCommitsAsString, 10);\r\n return numberOfCommits !== 0;\r\n });\r\n }\r\n /**\r\n * Get the total number of commits on head.\r\n *\r\n * Note: HEAD should not be used, as it may be detached, resulting in an additional count.\r\n */\r\n static getTotalNumberOfCommits() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const numberOfCommitsAsString = yield this.git(['rev-list', '--count', this.sha]);\r\n return Number.parseInt(numberOfCommitsAsString, 10);\r\n });\r\n }\r\n /**\r\n * Run git in the specified project path\r\n */\r\n static git(arguments_, options = {}) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return system_1.default.run('git', arguments_, Object.assign({ cwd: this.projectPath }, options));\r\n });\r\n }\r\n}\r\nexports.default = Versioning;\r\n","\"use strict\";\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n const delimiter = '_GitHubActionsFileCommandDelimeter_';\n const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;\n file_command_1.issueCommand('ENV', commandValue);\n }\n else {\n command_1.issueCommand('set-env', { name }, convertedVal);\n }\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input. The value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, value);\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n */\nfunction error(message) {\n command_1.issue('error', message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds an warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n */\nfunction warning(message) {\n command_1.issue('warning', message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\nfunction issueCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueCommand = issueCommand;\n//# sourceMappingURL=file-command.js.map","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tr = __importStar(require(\"./toolrunner\"));\n/**\n * Exec a command.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code\n */\nfunction exec(commandLine, args, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const commandArgs = tr.argStringToArray(commandLine);\n if (commandArgs.length === 0) {\n throw new Error(`Parameter 'commandLine' cannot be null or empty.`);\n }\n // Path to tool to execute should be first arg\n const toolPath = commandArgs[0];\n args = commandArgs.slice(1).concat(args || []);\n const runner = new tr.ToolRunner(toolPath, args, options);\n return runner.exec();\n });\n}\nexports.exec = exec;\n//# sourceMappingURL=exec.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os = __importStar(require(\"os\"));\nconst events = __importStar(require(\"events\"));\nconst child = __importStar(require(\"child_process\"));\nconst path = __importStar(require(\"path\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst ioUtil = __importStar(require(\"@actions/io/lib/io-util\"));\n/* eslint-disable @typescript-eslint/unbound-method */\nconst IS_WINDOWS = process.platform === 'win32';\n/*\n * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.\n */\nclass ToolRunner extends events.EventEmitter {\n constructor(toolPath, args, options) {\n super();\n if (!toolPath) {\n throw new Error(\"Parameter 'toolPath' cannot be null or empty.\");\n }\n this.toolPath = toolPath;\n this.args = args || [];\n this.options = options || {};\n }\n _debug(message) {\n if (this.options.listeners && this.options.listeners.debug) {\n this.options.listeners.debug(message);\n }\n }\n _getCommandString(options, noPrefix) {\n const toolPath = this._getSpawnFileName();\n const args = this._getSpawnArgs(options);\n let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool\n if (IS_WINDOWS) {\n // Windows + cmd file\n if (this._isCmdFile()) {\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows + verbatim\n else if (options.windowsVerbatimArguments) {\n cmd += `\"${toolPath}\"`;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows (regular)\n else {\n cmd += this._windowsQuoteCmdArg(toolPath);\n for (const a of args) {\n cmd += ` ${this._windowsQuoteCmdArg(a)}`;\n }\n }\n }\n else {\n // OSX/Linux - this can likely be improved with some form of quoting.\n // creating processes on Unix is fundamentally different than Windows.\n // on Unix, execvp() takes an arg array.\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n return cmd;\n }\n _processLineBuffer(data, strBuffer, onLine) {\n try {\n let s = strBuffer + data.toString();\n let n = s.indexOf(os.EOL);\n while (n > -1) {\n const line = s.substring(0, n);\n onLine(line);\n // the rest of the string ...\n s = s.substring(n + os.EOL.length);\n n = s.indexOf(os.EOL);\n }\n strBuffer = s;\n }\n catch (err) {\n // streaming lines to console is best effort. Don't fail a build.\n this._debug(`error processing line. Failed with error ${err}`);\n }\n }\n _getSpawnFileName() {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n return process.env['COMSPEC'] || 'cmd.exe';\n }\n }\n return this.toolPath;\n }\n _getSpawnArgs(options) {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n let argline = `/D /S /C \"${this._windowsQuoteCmdArg(this.toolPath)}`;\n for (const a of this.args) {\n argline += ' ';\n argline += options.windowsVerbatimArguments\n ? a\n : this._windowsQuoteCmdArg(a);\n }\n argline += '\"';\n return [argline];\n }\n }\n return this.args;\n }\n _endsWith(str, end) {\n return str.endsWith(end);\n }\n _isCmdFile() {\n const upperToolPath = this.toolPath.toUpperCase();\n return (this._endsWith(upperToolPath, '.CMD') ||\n this._endsWith(upperToolPath, '.BAT'));\n }\n _windowsQuoteCmdArg(arg) {\n // for .exe, apply the normal quoting rules that libuv applies\n if (!this._isCmdFile()) {\n return this._uvQuoteCmdArg(arg);\n }\n // otherwise apply quoting rules specific to the cmd.exe command line parser.\n // the libuv rules are generic and are not designed specifically for cmd.exe\n // command line parser.\n //\n // for a detailed description of the cmd.exe command line parser, refer to\n // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912\n // need quotes for empty arg\n if (!arg) {\n return '\"\"';\n }\n // determine whether the arg needs to be quoted\n const cmdSpecialChars = [\n ' ',\n '\\t',\n '&',\n '(',\n ')',\n '[',\n ']',\n '{',\n '}',\n '^',\n '=',\n ';',\n '!',\n \"'\",\n '+',\n ',',\n '`',\n '~',\n '|',\n '<',\n '>',\n '\"'\n ];\n let needsQuotes = false;\n for (const char of arg) {\n if (cmdSpecialChars.some(x => x === char)) {\n needsQuotes = true;\n break;\n }\n }\n // short-circuit if quotes not needed\n if (!needsQuotes) {\n return arg;\n }\n // the following quoting rules are very similar to the rules that by libuv applies.\n //\n // 1) wrap the string in quotes\n //\n // 2) double-up quotes - i.e. \" => \"\"\n //\n // this is different from the libuv quoting rules. libuv replaces \" with \\\", which unfortunately\n // doesn't work well with a cmd.exe command line.\n //\n // note, replacing \" with \"\" also works well if the arg is passed to a downstream .NET console app.\n // for example, the command line:\n // foo.exe \"myarg:\"\"my val\"\"\"\n // is parsed by a .NET console app into an arg array:\n // [ \"myarg:\\\"my val\\\"\" ]\n // which is the same end result when applying libuv quoting rules. although the actual\n // command line from libuv quoting rules would look like:\n // foo.exe \"myarg:\\\"my val\\\"\"\n //\n // 3) double-up slashes that precede a quote,\n // e.g. hello \\world => \"hello \\world\"\n // hello\\\"world => \"hello\\\\\"\"world\"\n // hello\\\\\"world => \"hello\\\\\\\\\"\"world\"\n // hello world\\ => \"hello world\\\\\"\n //\n // technically this is not required for a cmd.exe command line, or the batch argument parser.\n // the reasons for including this as a .cmd quoting rule are:\n //\n // a) this is optimized for the scenario where the argument is passed from the .cmd file to an\n // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.\n //\n // b) it's what we've been doing previously (by deferring to node default behavior) and we\n // haven't heard any complaints about that aspect.\n //\n // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be\n // escaped when used on the command line directly - even though within a .cmd file % can be escaped\n // by using %%.\n //\n // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts\n // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.\n //\n // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would\n // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the\n // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args\n // to an external program.\n //\n // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.\n // % can be escaped within a .cmd file.\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\'; // double the slash\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\"'; // double the quote\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _uvQuoteCmdArg(arg) {\n // Tool runner wraps child_process.spawn() and needs to apply the same quoting as\n // Node in certain cases where the undocumented spawn option windowsVerbatimArguments\n // is used.\n //\n // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,\n // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),\n // pasting copyright notice from Node within this function:\n //\n // Copyright Joyent, Inc. and other Node contributors. All rights reserved.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a copy\n // of this software and associated documentation files (the \"Software\"), to\n // deal in the Software without restriction, including without limitation the\n // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n // sell copies of the Software, and to permit persons to whom the Software is\n // furnished to do so, subject to the following conditions:\n //\n // The above copyright notice and this permission notice shall be included in\n // all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n // IN THE SOFTWARE.\n if (!arg) {\n // Need double quotation for empty argument\n return '\"\"';\n }\n if (!arg.includes(' ') && !arg.includes('\\t') && !arg.includes('\"')) {\n // No quotation needed\n return arg;\n }\n if (!arg.includes('\"') && !arg.includes('\\\\')) {\n // No embedded double quotes or backslashes, so I can just wrap\n // quote marks around the whole thing.\n return `\"${arg}\"`;\n }\n // Expected input/output:\n // input : hello\"world\n // output: \"hello\\\"world\"\n // input : hello\"\"world\n // output: \"hello\\\"\\\"world\"\n // input : hello\\world\n // output: hello\\world\n // input : hello\\\\world\n // output: hello\\\\world\n // input : hello\\\"world\n // output: \"hello\\\\\\\"world\"\n // input : hello\\\\\"world\n // output: \"hello\\\\\\\\\\\"world\"\n // input : hello world\\\n // output: \"hello world\\\\\" - note the comment in libuv actually reads \"hello world\\\"\n // but it appears the comment is wrong, it should be \"hello world\\\\\"\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\';\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\\\\';\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _cloneExecOptions(options) {\n options = options || {};\n const result = {\n cwd: options.cwd || process.cwd(),\n env: options.env || process.env,\n silent: options.silent || false,\n windowsVerbatimArguments: options.windowsVerbatimArguments || false,\n failOnStdErr: options.failOnStdErr || false,\n ignoreReturnCode: options.ignoreReturnCode || false,\n delay: options.delay || 10000\n };\n result.outStream = options.outStream || process.stdout;\n result.errStream = options.errStream || process.stderr;\n return result;\n }\n _getSpawnOptions(options, toolPath) {\n options = options || {};\n const result = {};\n result.cwd = options.cwd;\n result.env = options.env;\n result['windowsVerbatimArguments'] =\n options.windowsVerbatimArguments || this._isCmdFile();\n if (options.windowsVerbatimArguments) {\n result.argv0 = `\"${toolPath}\"`;\n }\n return result;\n }\n /**\n * Exec a tool.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param tool path to tool to exec\n * @param options optional exec options. See ExecOptions\n * @returns number\n */\n exec() {\n return __awaiter(this, void 0, void 0, function* () {\n // root the tool path if it is unrooted and contains relative pathing\n if (!ioUtil.isRooted(this.toolPath) &&\n (this.toolPath.includes('/') ||\n (IS_WINDOWS && this.toolPath.includes('\\\\')))) {\n // prefer options.cwd if it is specified, however options.cwd may also need to be rooted\n this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);\n }\n // if the tool is only a file name, then resolve it from the PATH\n // otherwise verify it exists (add extension on Windows if necessary)\n this.toolPath = yield io.which(this.toolPath, true);\n return new Promise((resolve, reject) => {\n this._debug(`exec tool: ${this.toolPath}`);\n this._debug('arguments:');\n for (const arg of this.args) {\n this._debug(` ${arg}`);\n }\n const optionsNonNull = this._cloneExecOptions(this.options);\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);\n }\n const state = new ExecState(optionsNonNull, this.toolPath);\n state.on('debug', (message) => {\n this._debug(message);\n });\n const fileName = this._getSpawnFileName();\n const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));\n const stdbuffer = '';\n if (cp.stdout) {\n cp.stdout.on('data', (data) => {\n if (this.options.listeners && this.options.listeners.stdout) {\n this.options.listeners.stdout(data);\n }\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(data);\n }\n this._processLineBuffer(data, stdbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.stdline) {\n this.options.listeners.stdline(line);\n }\n });\n });\n }\n const errbuffer = '';\n if (cp.stderr) {\n cp.stderr.on('data', (data) => {\n state.processStderr = true;\n if (this.options.listeners && this.options.listeners.stderr) {\n this.options.listeners.stderr(data);\n }\n if (!optionsNonNull.silent &&\n optionsNonNull.errStream &&\n optionsNonNull.outStream) {\n const s = optionsNonNull.failOnStdErr\n ? optionsNonNull.errStream\n : optionsNonNull.outStream;\n s.write(data);\n }\n this._processLineBuffer(data, errbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.errline) {\n this.options.listeners.errline(line);\n }\n });\n });\n }\n cp.on('error', (err) => {\n state.processError = err.message;\n state.processExited = true;\n state.processClosed = true;\n state.CheckComplete();\n });\n cp.on('exit', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n this._debug(`Exit code ${code} received from tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n cp.on('close', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n state.processClosed = true;\n this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n state.on('done', (error, exitCode) => {\n if (stdbuffer.length > 0) {\n this.emit('stdline', stdbuffer);\n }\n if (errbuffer.length > 0) {\n this.emit('errline', errbuffer);\n }\n cp.removeAllListeners();\n if (error) {\n reject(error);\n }\n else {\n resolve(exitCode);\n }\n });\n if (this.options.input) {\n if (!cp.stdin) {\n throw new Error('child process missing stdin');\n }\n cp.stdin.end(this.options.input);\n }\n });\n });\n }\n}\nexports.ToolRunner = ToolRunner;\n/**\n * Convert an arg string to an array of args. Handles escaping\n *\n * @param argString string of arguments\n * @returns string[] array of arguments\n */\nfunction argStringToArray(argString) {\n const args = [];\n let inQuotes = false;\n let escaped = false;\n let arg = '';\n function append(c) {\n // we only escape double quotes.\n if (escaped && c !== '\"') {\n arg += '\\\\';\n }\n arg += c;\n escaped = false;\n }\n for (let i = 0; i < argString.length; i++) {\n const c = argString.charAt(i);\n if (c === '\"') {\n if (!escaped) {\n inQuotes = !inQuotes;\n }\n else {\n append(c);\n }\n continue;\n }\n if (c === '\\\\' && escaped) {\n append(c);\n continue;\n }\n if (c === '\\\\' && inQuotes) {\n escaped = true;\n continue;\n }\n if (c === ' ' && !inQuotes) {\n if (arg.length > 0) {\n args.push(arg);\n arg = '';\n }\n continue;\n }\n append(c);\n }\n if (arg.length > 0) {\n args.push(arg.trim());\n }\n return args;\n}\nexports.argStringToArray = argStringToArray;\nclass ExecState extends events.EventEmitter {\n constructor(options, toolPath) {\n super();\n this.processClosed = false; // tracks whether the process has exited and stdio is closed\n this.processError = '';\n this.processExitCode = 0;\n this.processExited = false; // tracks whether the process has exited\n this.processStderr = false; // tracks whether stderr was written to\n this.delay = 10000; // 10 seconds\n this.done = false;\n this.timeout = null;\n if (!toolPath) {\n throw new Error('toolPath must not be empty');\n }\n this.options = options;\n this.toolPath = toolPath;\n if (options.delay) {\n this.delay = options.delay;\n }\n }\n CheckComplete() {\n if (this.done) {\n return;\n }\n if (this.processClosed) {\n this._setResult();\n }\n else if (this.processExited) {\n this.timeout = setTimeout(ExecState.HandleTimeout, this.delay, this);\n }\n }\n _debug(message) {\n this.emit('debug', message);\n }\n _setResult() {\n // determine whether there is an error\n let error;\n if (this.processExited) {\n if (this.processError) {\n error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`);\n }\n else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {\n error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);\n }\n else if (this.processStderr && this.options.failOnStdErr) {\n error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`);\n }\n }\n // clear the timeout\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n this.done = true;\n this.emit('done', error, this.processExitCode);\n }\n static HandleTimeout(state) {\n if (state.done) {\n return;\n }\n if (!state.processClosed && state.processExited) {\n const message = `The STDIO streams did not close within ${state.delay /\n 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;\n state._debug(message);\n }\n state._setResult();\n }\n}\n//# sourceMappingURL=toolrunner.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst assert_1 = require(\"assert\");\nconst fs = __importStar(require(\"fs\"));\nconst path = __importStar(require(\"path\"));\n_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;\nexports.IS_WINDOWS = process.platform === 'win32';\nfunction exists(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n yield exports.stat(fsPath);\n }\n catch (err) {\n if (err.code === 'ENOENT') {\n return false;\n }\n throw err;\n }\n return true;\n });\n}\nexports.exists = exists;\nfunction isDirectory(fsPath, useStat = false) {\n return __awaiter(this, void 0, void 0, function* () {\n const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath);\n return stats.isDirectory();\n });\n}\nexports.isDirectory = isDirectory;\n/**\n * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like:\n * \\, \\hello, \\\\hello\\share, C:, and C:\\hello (and corresponding alternate separator cases).\n */\nfunction isRooted(p) {\n p = normalizeSeparators(p);\n if (!p) {\n throw new Error('isRooted() parameter \"p\" cannot be empty');\n }\n if (exports.IS_WINDOWS) {\n return (p.startsWith('\\\\') || /^[A-Z]:/i.test(p) // e.g. \\ or \\hello or \\\\hello\n ); // e.g. C: or C:\\hello\n }\n return p.startsWith('/');\n}\nexports.isRooted = isRooted;\n/**\n * Recursively create a directory at `fsPath`.\n *\n * This implementation is optimistic, meaning it attempts to create the full\n * path first, and backs up the path stack from there.\n *\n * @param fsPath The path to create\n * @param maxDepth The maximum recursion depth\n * @param depth The current recursion depth\n */\nfunction mkdirP(fsPath, maxDepth = 1000, depth = 1) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(fsPath, 'a path argument must be provided');\n fsPath = path.resolve(fsPath);\n if (depth >= maxDepth)\n return exports.mkdir(fsPath);\n try {\n yield exports.mkdir(fsPath);\n return;\n }\n catch (err) {\n switch (err.code) {\n case 'ENOENT': {\n yield mkdirP(path.dirname(fsPath), maxDepth, depth + 1);\n yield exports.mkdir(fsPath);\n return;\n }\n default: {\n let stats;\n try {\n stats = yield exports.stat(fsPath);\n }\n catch (err2) {\n throw err;\n }\n if (!stats.isDirectory())\n throw err;\n }\n }\n }\n });\n}\nexports.mkdirP = mkdirP;\n/**\n * Best effort attempt to determine whether a file exists and is executable.\n * @param filePath file path to check\n * @param extensions additional file extensions to try\n * @return if file exists and is executable, returns the file path. otherwise empty string.\n */\nfunction tryGetExecutablePath(filePath, extensions) {\n return __awaiter(this, void 0, void 0, function* () {\n let stats = undefined;\n try {\n // test file exists\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // on Windows, test for valid extension\n const upperExt = path.extname(filePath).toUpperCase();\n if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) {\n return filePath;\n }\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n // try each extension\n const originalFilePath = filePath;\n for (const extension of extensions) {\n filePath = originalFilePath + extension;\n stats = undefined;\n try {\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // preserve the case of the actual file (since an extension was appended)\n try {\n const directory = path.dirname(filePath);\n const upperName = path.basename(filePath).toUpperCase();\n for (const actualName of yield exports.readdir(directory)) {\n if (upperName === actualName.toUpperCase()) {\n filePath = path.join(directory, actualName);\n break;\n }\n }\n }\n catch (err) {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`);\n }\n return filePath;\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n }\n return '';\n });\n}\nexports.tryGetExecutablePath = tryGetExecutablePath;\nfunction normalizeSeparators(p) {\n p = p || '';\n if (exports.IS_WINDOWS) {\n // convert slashes on Windows\n p = p.replace(/\\//g, '\\\\');\n // remove redundant slashes\n return p.replace(/\\\\\\\\+/g, '\\\\');\n }\n // remove redundant slashes\n return p.replace(/\\/\\/+/g, '/');\n}\n// on Mac/Linux, test the execute bit\n// R W X R W X R W X\n// 256 128 64 32 16 8 4 2 1\nfunction isUnixExecutable(stats) {\n return ((stats.mode & 1) > 0 ||\n ((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||\n ((stats.mode & 64) > 0 && stats.uid === process.getuid()));\n}\n//# sourceMappingURL=io-util.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst childProcess = __importStar(require(\"child_process\"));\nconst path = __importStar(require(\"path\"));\nconst util_1 = require(\"util\");\nconst ioUtil = __importStar(require(\"./io-util\"));\nconst exec = util_1.promisify(childProcess.exec);\n/**\n * Copies a file or folder.\n * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See CopyOptions.\n */\nfunction cp(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const { force, recursive } = readCopyOptions(options);\n const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;\n // Dest is an existing file, but not forcing\n if (destStat && destStat.isFile() && !force) {\n return;\n }\n // If dest is an existing directory, should copy inside.\n const newDest = destStat && destStat.isDirectory()\n ? path.join(dest, path.basename(source))\n : dest;\n if (!(yield ioUtil.exists(source))) {\n throw new Error(`no such file or directory: ${source}`);\n }\n const sourceStat = yield ioUtil.stat(source);\n if (sourceStat.isDirectory()) {\n if (!recursive) {\n throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`);\n }\n else {\n yield cpDirRecursive(source, newDest, 0, force);\n }\n }\n else {\n if (path.relative(source, newDest) === '') {\n // a file cannot be copied to itself\n throw new Error(`'${newDest}' and '${source}' are the same file`);\n }\n yield copyFile(source, newDest, force);\n }\n });\n}\nexports.cp = cp;\n/**\n * Moves a path.\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See MoveOptions.\n */\nfunction mv(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n if (yield ioUtil.exists(dest)) {\n let destExists = true;\n if (yield ioUtil.isDirectory(dest)) {\n // If dest is directory copy src into dest\n dest = path.join(dest, path.basename(source));\n destExists = yield ioUtil.exists(dest);\n }\n if (destExists) {\n if (options.force == null || options.force) {\n yield rmRF(dest);\n }\n else {\n throw new Error('Destination already exists');\n }\n }\n }\n yield mkdirP(path.dirname(dest));\n yield ioUtil.rename(source, dest);\n });\n}\nexports.mv = mv;\n/**\n * Remove a path recursively with force\n *\n * @param inputPath path to remove\n */\nfunction rmRF(inputPath) {\n return __awaiter(this, void 0, void 0, function* () {\n if (ioUtil.IS_WINDOWS) {\n // Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another\n // program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del.\n try {\n if (yield ioUtil.isDirectory(inputPath, true)) {\n yield exec(`rd /s /q \"${inputPath}\"`);\n }\n else {\n yield exec(`del /f /a \"${inputPath}\"`);\n }\n }\n catch (err) {\n // if you try to delete a file that doesn't exist, desired result is achieved\n // other errors are valid\n if (err.code !== 'ENOENT')\n throw err;\n }\n // Shelling out fails to remove a symlink folder with missing source, this unlink catches that\n try {\n yield ioUtil.unlink(inputPath);\n }\n catch (err) {\n // if you try to delete a file that doesn't exist, desired result is achieved\n // other errors are valid\n if (err.code !== 'ENOENT')\n throw err;\n }\n }\n else {\n let isDir = false;\n try {\n isDir = yield ioUtil.isDirectory(inputPath);\n }\n catch (err) {\n // if you try to delete a file that doesn't exist, desired result is achieved\n // other errors are valid\n if (err.code !== 'ENOENT')\n throw err;\n return;\n }\n if (isDir) {\n yield exec(`rm -rf \"${inputPath}\"`);\n }\n else {\n yield ioUtil.unlink(inputPath);\n }\n }\n });\n}\nexports.rmRF = rmRF;\n/**\n * Make a directory. Creates the full path with folders in between\n * Will throw if it fails\n *\n * @param fsPath path to create\n * @returns Promise\n */\nfunction mkdirP(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n yield ioUtil.mkdirP(fsPath);\n });\n}\nexports.mkdirP = mkdirP;\n/**\n * Returns path of a tool had the tool actually been invoked. Resolves via paths.\n * If you check and the tool does not exist, it will throw.\n *\n * @param tool name of the tool\n * @param check whether to check if tool exists\n * @returns Promise path to tool\n */\nfunction which(tool, check) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // recursive when check=true\n if (check) {\n const result = yield which(tool, false);\n if (!result) {\n if (ioUtil.IS_WINDOWS) {\n throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`);\n }\n else {\n throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);\n }\n }\n return result;\n }\n const matches = yield findInPath(tool);\n if (matches && matches.length > 0) {\n return matches[0];\n }\n return '';\n });\n}\nexports.which = which;\n/**\n * Returns a list of all occurrences of the given tool on the system path.\n *\n * @returns Promise the paths of the tool\n */\nfunction findInPath(tool) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // build the list of extensions to try\n const extensions = [];\n if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) {\n for (const extension of process.env['PATHEXT'].split(path.delimiter)) {\n if (extension) {\n extensions.push(extension);\n }\n }\n }\n // if it's rooted, return it if exists. otherwise return empty.\n if (ioUtil.isRooted(tool)) {\n const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);\n if (filePath) {\n return [filePath];\n }\n return [];\n }\n // if any path separators, return empty\n if (tool.includes(path.sep)) {\n return [];\n }\n // build the list of directories\n //\n // Note, technically \"where\" checks the current directory on Windows. From a toolkit perspective,\n // it feels like we should not do this. Checking the current directory seems like more of a use\n // case of a shell, and the which() function exposed by the toolkit should strive for consistency\n // across platforms.\n const directories = [];\n if (process.env.PATH) {\n for (const p of process.env.PATH.split(path.delimiter)) {\n if (p) {\n directories.push(p);\n }\n }\n }\n // find all matches\n const matches = [];\n for (const directory of directories) {\n const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions);\n if (filePath) {\n matches.push(filePath);\n }\n }\n return matches;\n });\n}\nexports.findInPath = findInPath;\nfunction readCopyOptions(options) {\n const force = options.force == null ? true : options.force;\n const recursive = Boolean(options.recursive);\n return { force, recursive };\n}\nfunction cpDirRecursive(sourceDir, destDir, currentDepth, force) {\n return __awaiter(this, void 0, void 0, function* () {\n // Ensure there is not a run away recursive copy\n if (currentDepth >= 255)\n return;\n currentDepth++;\n yield mkdirP(destDir);\n const files = yield ioUtil.readdir(sourceDir);\n for (const fileName of files) {\n const srcFile = `${sourceDir}/${fileName}`;\n const destFile = `${destDir}/${fileName}`;\n const srcFileStat = yield ioUtil.lstat(srcFile);\n if (srcFileStat.isDirectory()) {\n // Recurse\n yield cpDirRecursive(srcFile, destFile, currentDepth, force);\n }\n else {\n yield copyFile(srcFile, destFile, force);\n }\n }\n // Change the mode for the newly created directory\n yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);\n });\n}\n// Buffered file copy\nfunction copyFile(srcFile, destFile, force) {\n return __awaiter(this, void 0, void 0, function* () {\n if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {\n // unlink/re-link it\n try {\n yield ioUtil.lstat(destFile);\n yield ioUtil.unlink(destFile);\n }\n catch (e) {\n // Try to override file permission\n if (e.code === 'EPERM') {\n yield ioUtil.chmod(destFile, '0666');\n yield ioUtil.unlink(destFile);\n }\n // other errors = it doesn't exist, no work to do\n }\n // Copy over symlink\n const symlinkFull = yield ioUtil.readlink(srcFile);\n yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null);\n }\n else if (!(yield ioUtil.exists(destFile)) || force) {\n yield ioUtil.copyFile(srcFile, destFile);\n }\n });\n}\n//# sourceMappingURL=io.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: v1.13.7\n *\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst localVarRequest = require(\"request\");\nlet defaultBasePath = 'https://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\n/* tslint:disable:no-unused-variable */\nlet primitives = [\n \"string\",\n \"boolean\",\n \"double\",\n \"integer\",\n \"long\",\n \"float\",\n \"number\",\n \"any\"\n];\nclass ObjectSerializer {\n static findCorrectType(data, expectedType) {\n if (data == undefined) {\n return expectedType;\n }\n else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) {\n return expectedType;\n }\n else if (expectedType === \"Date\") {\n return expectedType;\n }\n else {\n if (enumsMap[expectedType]) {\n return expectedType;\n }\n if (!typeMap[expectedType]) {\n return expectedType; // w/e we don't know the type\n }\n // Check the discriminator\n let discriminatorProperty = typeMap[expectedType].discriminator;\n if (discriminatorProperty == null) {\n return expectedType; // the type does not have a discriminator. use it.\n }\n else {\n if (data[discriminatorProperty]) {\n return data[discriminatorProperty]; // use the type given in the discriminator\n }\n else {\n return expectedType; // discriminator was not present (or an empty string)\n }\n }\n }\n }\n static serialize(data, type) {\n if (data == undefined) {\n return data;\n }\n else if (primitives.indexOf(type.toLowerCase()) !== -1) {\n return data;\n }\n else if (type.lastIndexOf(\"Array<\", 0) === 0) { // string.startsWith pre es6\n let subType = type.replace(\"Array<\", \"\"); // Array => Type>\n subType = subType.substring(0, subType.length - 1); // Type> => Type\n let transformedData = [];\n for (let index in data) {\n let date = data[index];\n transformedData.push(ObjectSerializer.serialize(date, subType));\n }\n return transformedData;\n }\n else if (type === \"Date\") {\n return data.toString();\n }\n else {\n if (enumsMap[type]) {\n return data;\n }\n if (!typeMap[type]) { // in case we dont know the type\n return data;\n }\n // get the map for the correct type.\n let attributeTypes = typeMap[type].getAttributeTypeMap();\n let instance = {};\n for (let index in attributeTypes) {\n let attributeType = attributeTypes[index];\n instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type);\n }\n return instance;\n }\n }\n static deserialize(data, type) {\n // polymorphism may change the actual type.\n type = ObjectSerializer.findCorrectType(data, type);\n if (data == undefined) {\n return data;\n }\n else if (primitives.indexOf(type.toLowerCase()) !== -1) {\n return data;\n }\n else if (type.lastIndexOf(\"Array<\", 0) === 0) { // string.startsWith pre es6\n let subType = type.replace(\"Array<\", \"\"); // Array => Type>\n subType = subType.substring(0, subType.length - 1); // Type> => Type\n let transformedData = [];\n for (let index in data) {\n let date = data[index];\n transformedData.push(ObjectSerializer.deserialize(date, subType));\n }\n return transformedData;\n }\n else if (type === \"Date\") {\n return new Date(data);\n }\n else {\n if (enumsMap[type]) { // is Enum\n return data;\n }\n if (!typeMap[type]) { // dont know the type\n return data;\n }\n let instance = new typeMap[type]();\n let attributeTypes = typeMap[type].getAttributeTypeMap();\n for (let index in attributeTypes) {\n let attributeType = attributeTypes[index];\n instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type);\n }\n return instance;\n }\n }\n}\n/**\n* ServiceReference holds a reference to Service.legacy.k8s.io\n*/\nclass AdmissionregistrationV1beta1ServiceReference {\n static getAttributeTypeMap() {\n return AdmissionregistrationV1beta1ServiceReference.attributeTypeMap;\n }\n}\nAdmissionregistrationV1beta1ServiceReference.discriminator = undefined;\nAdmissionregistrationV1beta1ServiceReference.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n }\n];\nexports.AdmissionregistrationV1beta1ServiceReference = AdmissionregistrationV1beta1ServiceReference;\n/**\n* WebhookClientConfig contains the information to make a TLS connection with the webhook\n*/\nclass AdmissionregistrationV1beta1WebhookClientConfig {\n static getAttributeTypeMap() {\n return AdmissionregistrationV1beta1WebhookClientConfig.attributeTypeMap;\n }\n}\nAdmissionregistrationV1beta1WebhookClientConfig.discriminator = undefined;\nAdmissionregistrationV1beta1WebhookClientConfig.attributeTypeMap = [\n {\n \"name\": \"caBundle\",\n \"baseName\": \"caBundle\",\n \"type\": \"string\"\n },\n {\n \"name\": \"service\",\n \"baseName\": \"service\",\n \"type\": \"AdmissionregistrationV1beta1ServiceReference\"\n },\n {\n \"name\": \"url\",\n \"baseName\": \"url\",\n \"type\": \"string\"\n }\n];\nexports.AdmissionregistrationV1beta1WebhookClientConfig = AdmissionregistrationV1beta1WebhookClientConfig;\n/**\n* ServiceReference holds a reference to Service.legacy.k8s.io\n*/\nclass ApiextensionsV1beta1ServiceReference {\n static getAttributeTypeMap() {\n return ApiextensionsV1beta1ServiceReference.attributeTypeMap;\n }\n}\nApiextensionsV1beta1ServiceReference.discriminator = undefined;\nApiextensionsV1beta1ServiceReference.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n }\n];\nexports.ApiextensionsV1beta1ServiceReference = ApiextensionsV1beta1ServiceReference;\n/**\n* WebhookClientConfig contains the information to make a TLS connection with the webhook. It has the same field as admissionregistration.v1beta1.WebhookClientConfig.\n*/\nclass ApiextensionsV1beta1WebhookClientConfig {\n static getAttributeTypeMap() {\n return ApiextensionsV1beta1WebhookClientConfig.attributeTypeMap;\n }\n}\nApiextensionsV1beta1WebhookClientConfig.discriminator = undefined;\nApiextensionsV1beta1WebhookClientConfig.attributeTypeMap = [\n {\n \"name\": \"caBundle\",\n \"baseName\": \"caBundle\",\n \"type\": \"string\"\n },\n {\n \"name\": \"service\",\n \"baseName\": \"service\",\n \"type\": \"ApiextensionsV1beta1ServiceReference\"\n },\n {\n \"name\": \"url\",\n \"baseName\": \"url\",\n \"type\": \"string\"\n }\n];\nexports.ApiextensionsV1beta1WebhookClientConfig = ApiextensionsV1beta1WebhookClientConfig;\n/**\n* ServiceReference holds a reference to Service.legacy.k8s.io\n*/\nclass ApiregistrationV1beta1ServiceReference {\n static getAttributeTypeMap() {\n return ApiregistrationV1beta1ServiceReference.attributeTypeMap;\n }\n}\nApiregistrationV1beta1ServiceReference.discriminator = undefined;\nApiregistrationV1beta1ServiceReference.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n }\n];\nexports.ApiregistrationV1beta1ServiceReference = ApiregistrationV1beta1ServiceReference;\n/**\n* DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.\n*/\nclass AppsV1beta1Deployment {\n static getAttributeTypeMap() {\n return AppsV1beta1Deployment.attributeTypeMap;\n }\n}\nAppsV1beta1Deployment.discriminator = undefined;\nAppsV1beta1Deployment.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"AppsV1beta1DeploymentSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"AppsV1beta1DeploymentStatus\"\n }\n];\nexports.AppsV1beta1Deployment = AppsV1beta1Deployment;\n/**\n* DeploymentCondition describes the state of a deployment at a certain point.\n*/\nclass AppsV1beta1DeploymentCondition {\n static getAttributeTypeMap() {\n return AppsV1beta1DeploymentCondition.attributeTypeMap;\n }\n}\nAppsV1beta1DeploymentCondition.discriminator = undefined;\nAppsV1beta1DeploymentCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"lastUpdateTime\",\n \"baseName\": \"lastUpdateTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.AppsV1beta1DeploymentCondition = AppsV1beta1DeploymentCondition;\n/**\n* DeploymentList is a list of Deployments.\n*/\nclass AppsV1beta1DeploymentList {\n static getAttributeTypeMap() {\n return AppsV1beta1DeploymentList.attributeTypeMap;\n }\n}\nAppsV1beta1DeploymentList.discriminator = undefined;\nAppsV1beta1DeploymentList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.AppsV1beta1DeploymentList = AppsV1beta1DeploymentList;\n/**\n* DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.\n*/\nclass AppsV1beta1DeploymentRollback {\n static getAttributeTypeMap() {\n return AppsV1beta1DeploymentRollback.attributeTypeMap;\n }\n}\nAppsV1beta1DeploymentRollback.discriminator = undefined;\nAppsV1beta1DeploymentRollback.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"rollbackTo\",\n \"baseName\": \"rollbackTo\",\n \"type\": \"AppsV1beta1RollbackConfig\"\n },\n {\n \"name\": \"updatedAnnotations\",\n \"baseName\": \"updatedAnnotations\",\n \"type\": \"{ [key: string]: string; }\"\n }\n];\nexports.AppsV1beta1DeploymentRollback = AppsV1beta1DeploymentRollback;\n/**\n* DeploymentSpec is the specification of the desired behavior of the Deployment.\n*/\nclass AppsV1beta1DeploymentSpec {\n static getAttributeTypeMap() {\n return AppsV1beta1DeploymentSpec.attributeTypeMap;\n }\n}\nAppsV1beta1DeploymentSpec.discriminator = undefined;\nAppsV1beta1DeploymentSpec.attributeTypeMap = [\n {\n \"name\": \"minReadySeconds\",\n \"baseName\": \"minReadySeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"paused\",\n \"baseName\": \"paused\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"progressDeadlineSeconds\",\n \"baseName\": \"progressDeadlineSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"revisionHistoryLimit\",\n \"baseName\": \"revisionHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"rollbackTo\",\n \"baseName\": \"rollbackTo\",\n \"type\": \"AppsV1beta1RollbackConfig\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"strategy\",\n \"baseName\": \"strategy\",\n \"type\": \"AppsV1beta1DeploymentStrategy\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n }\n];\nexports.AppsV1beta1DeploymentSpec = AppsV1beta1DeploymentSpec;\n/**\n* DeploymentStatus is the most recently observed status of the Deployment.\n*/\nclass AppsV1beta1DeploymentStatus {\n static getAttributeTypeMap() {\n return AppsV1beta1DeploymentStatus.attributeTypeMap;\n }\n}\nAppsV1beta1DeploymentStatus.discriminator = undefined;\nAppsV1beta1DeploymentStatus.attributeTypeMap = [\n {\n \"name\": \"availableReplicas\",\n \"baseName\": \"availableReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"collisionCount\",\n \"baseName\": \"collisionCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readyReplicas\",\n \"baseName\": \"readyReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"unavailableReplicas\",\n \"baseName\": \"unavailableReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"updatedReplicas\",\n \"baseName\": \"updatedReplicas\",\n \"type\": \"number\"\n }\n];\nexports.AppsV1beta1DeploymentStatus = AppsV1beta1DeploymentStatus;\n/**\n* DeploymentStrategy describes how to replace existing pods with new ones.\n*/\nclass AppsV1beta1DeploymentStrategy {\n static getAttributeTypeMap() {\n return AppsV1beta1DeploymentStrategy.attributeTypeMap;\n }\n}\nAppsV1beta1DeploymentStrategy.discriminator = undefined;\nAppsV1beta1DeploymentStrategy.attributeTypeMap = [\n {\n \"name\": \"rollingUpdate\",\n \"baseName\": \"rollingUpdate\",\n \"type\": \"AppsV1beta1RollingUpdateDeployment\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.AppsV1beta1DeploymentStrategy = AppsV1beta1DeploymentStrategy;\n/**\n* DEPRECATED.\n*/\nclass AppsV1beta1RollbackConfig {\n static getAttributeTypeMap() {\n return AppsV1beta1RollbackConfig.attributeTypeMap;\n }\n}\nAppsV1beta1RollbackConfig.discriminator = undefined;\nAppsV1beta1RollbackConfig.attributeTypeMap = [\n {\n \"name\": \"revision\",\n \"baseName\": \"revision\",\n \"type\": \"number\"\n }\n];\nexports.AppsV1beta1RollbackConfig = AppsV1beta1RollbackConfig;\n/**\n* Spec to control the desired behavior of rolling update.\n*/\nclass AppsV1beta1RollingUpdateDeployment {\n static getAttributeTypeMap() {\n return AppsV1beta1RollingUpdateDeployment.attributeTypeMap;\n }\n}\nAppsV1beta1RollingUpdateDeployment.discriminator = undefined;\nAppsV1beta1RollingUpdateDeployment.attributeTypeMap = [\n {\n \"name\": \"maxSurge\",\n \"baseName\": \"maxSurge\",\n \"type\": \"any\"\n },\n {\n \"name\": \"maxUnavailable\",\n \"baseName\": \"maxUnavailable\",\n \"type\": \"any\"\n }\n];\nexports.AppsV1beta1RollingUpdateDeployment = AppsV1beta1RollingUpdateDeployment;\n/**\n* Scale represents a scaling request for a resource.\n*/\nclass AppsV1beta1Scale {\n static getAttributeTypeMap() {\n return AppsV1beta1Scale.attributeTypeMap;\n }\n}\nAppsV1beta1Scale.discriminator = undefined;\nAppsV1beta1Scale.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"AppsV1beta1ScaleSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"AppsV1beta1ScaleStatus\"\n }\n];\nexports.AppsV1beta1Scale = AppsV1beta1Scale;\n/**\n* ScaleSpec describes the attributes of a scale subresource\n*/\nclass AppsV1beta1ScaleSpec {\n static getAttributeTypeMap() {\n return AppsV1beta1ScaleSpec.attributeTypeMap;\n }\n}\nAppsV1beta1ScaleSpec.discriminator = undefined;\nAppsV1beta1ScaleSpec.attributeTypeMap = [\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n }\n];\nexports.AppsV1beta1ScaleSpec = AppsV1beta1ScaleSpec;\n/**\n* ScaleStatus represents the current status of a scale subresource.\n*/\nclass AppsV1beta1ScaleStatus {\n static getAttributeTypeMap() {\n return AppsV1beta1ScaleStatus.attributeTypeMap;\n }\n}\nAppsV1beta1ScaleStatus.discriminator = undefined;\nAppsV1beta1ScaleStatus.attributeTypeMap = [\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"targetSelector\",\n \"baseName\": \"targetSelector\",\n \"type\": \"string\"\n }\n];\nexports.AppsV1beta1ScaleStatus = AppsV1beta1ScaleStatus;\n/**\n* AllowedFlexVolume represents a single Flexvolume that is allowed to be used. Deprecated: use AllowedFlexVolume from policy API Group instead.\n*/\nclass ExtensionsV1beta1AllowedFlexVolume {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1AllowedFlexVolume.attributeTypeMap;\n }\n}\nExtensionsV1beta1AllowedFlexVolume.discriminator = undefined;\nExtensionsV1beta1AllowedFlexVolume.attributeTypeMap = [\n {\n \"name\": \"driver\",\n \"baseName\": \"driver\",\n \"type\": \"string\"\n }\n];\nexports.ExtensionsV1beta1AllowedFlexVolume = ExtensionsV1beta1AllowedFlexVolume;\n/**\n* AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined. Deprecated: use AllowedHostPath from policy API Group instead.\n*/\nclass ExtensionsV1beta1AllowedHostPath {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1AllowedHostPath.attributeTypeMap;\n }\n}\nExtensionsV1beta1AllowedHostPath.discriminator = undefined;\nExtensionsV1beta1AllowedHostPath.attributeTypeMap = [\n {\n \"name\": \"pathPrefix\",\n \"baseName\": \"pathPrefix\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n }\n];\nexports.ExtensionsV1beta1AllowedHostPath = ExtensionsV1beta1AllowedHostPath;\n/**\n* DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.\n*/\nclass ExtensionsV1beta1Deployment {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1Deployment.attributeTypeMap;\n }\n}\nExtensionsV1beta1Deployment.discriminator = undefined;\nExtensionsV1beta1Deployment.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"ExtensionsV1beta1DeploymentSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"ExtensionsV1beta1DeploymentStatus\"\n }\n];\nexports.ExtensionsV1beta1Deployment = ExtensionsV1beta1Deployment;\n/**\n* DeploymentCondition describes the state of a deployment at a certain point.\n*/\nclass ExtensionsV1beta1DeploymentCondition {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1DeploymentCondition.attributeTypeMap;\n }\n}\nExtensionsV1beta1DeploymentCondition.discriminator = undefined;\nExtensionsV1beta1DeploymentCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"lastUpdateTime\",\n \"baseName\": \"lastUpdateTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.ExtensionsV1beta1DeploymentCondition = ExtensionsV1beta1DeploymentCondition;\n/**\n* DeploymentList is a list of Deployments.\n*/\nclass ExtensionsV1beta1DeploymentList {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1DeploymentList.attributeTypeMap;\n }\n}\nExtensionsV1beta1DeploymentList.discriminator = undefined;\nExtensionsV1beta1DeploymentList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.ExtensionsV1beta1DeploymentList = ExtensionsV1beta1DeploymentList;\n/**\n* DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.\n*/\nclass ExtensionsV1beta1DeploymentRollback {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1DeploymentRollback.attributeTypeMap;\n }\n}\nExtensionsV1beta1DeploymentRollback.discriminator = undefined;\nExtensionsV1beta1DeploymentRollback.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"rollbackTo\",\n \"baseName\": \"rollbackTo\",\n \"type\": \"ExtensionsV1beta1RollbackConfig\"\n },\n {\n \"name\": \"updatedAnnotations\",\n \"baseName\": \"updatedAnnotations\",\n \"type\": \"{ [key: string]: string; }\"\n }\n];\nexports.ExtensionsV1beta1DeploymentRollback = ExtensionsV1beta1DeploymentRollback;\n/**\n* DeploymentSpec is the specification of the desired behavior of the Deployment.\n*/\nclass ExtensionsV1beta1DeploymentSpec {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1DeploymentSpec.attributeTypeMap;\n }\n}\nExtensionsV1beta1DeploymentSpec.discriminator = undefined;\nExtensionsV1beta1DeploymentSpec.attributeTypeMap = [\n {\n \"name\": \"minReadySeconds\",\n \"baseName\": \"minReadySeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"paused\",\n \"baseName\": \"paused\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"progressDeadlineSeconds\",\n \"baseName\": \"progressDeadlineSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"revisionHistoryLimit\",\n \"baseName\": \"revisionHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"rollbackTo\",\n \"baseName\": \"rollbackTo\",\n \"type\": \"ExtensionsV1beta1RollbackConfig\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"strategy\",\n \"baseName\": \"strategy\",\n \"type\": \"ExtensionsV1beta1DeploymentStrategy\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n }\n];\nexports.ExtensionsV1beta1DeploymentSpec = ExtensionsV1beta1DeploymentSpec;\n/**\n* DeploymentStatus is the most recently observed status of the Deployment.\n*/\nclass ExtensionsV1beta1DeploymentStatus {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1DeploymentStatus.attributeTypeMap;\n }\n}\nExtensionsV1beta1DeploymentStatus.discriminator = undefined;\nExtensionsV1beta1DeploymentStatus.attributeTypeMap = [\n {\n \"name\": \"availableReplicas\",\n \"baseName\": \"availableReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"collisionCount\",\n \"baseName\": \"collisionCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readyReplicas\",\n \"baseName\": \"readyReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"unavailableReplicas\",\n \"baseName\": \"unavailableReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"updatedReplicas\",\n \"baseName\": \"updatedReplicas\",\n \"type\": \"number\"\n }\n];\nexports.ExtensionsV1beta1DeploymentStatus = ExtensionsV1beta1DeploymentStatus;\n/**\n* DeploymentStrategy describes how to replace existing pods with new ones.\n*/\nclass ExtensionsV1beta1DeploymentStrategy {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1DeploymentStrategy.attributeTypeMap;\n }\n}\nExtensionsV1beta1DeploymentStrategy.discriminator = undefined;\nExtensionsV1beta1DeploymentStrategy.attributeTypeMap = [\n {\n \"name\": \"rollingUpdate\",\n \"baseName\": \"rollingUpdate\",\n \"type\": \"ExtensionsV1beta1RollingUpdateDeployment\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.ExtensionsV1beta1DeploymentStrategy = ExtensionsV1beta1DeploymentStrategy;\n/**\n* FSGroupStrategyOptions defines the strategy type and options used to create the strategy. Deprecated: use FSGroupStrategyOptions from policy API Group instead.\n*/\nclass ExtensionsV1beta1FSGroupStrategyOptions {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1FSGroupStrategyOptions.attributeTypeMap;\n }\n}\nExtensionsV1beta1FSGroupStrategyOptions.discriminator = undefined;\nExtensionsV1beta1FSGroupStrategyOptions.attributeTypeMap = [\n {\n \"name\": \"ranges\",\n \"baseName\": \"ranges\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"rule\",\n \"baseName\": \"rule\",\n \"type\": \"string\"\n }\n];\nexports.ExtensionsV1beta1FSGroupStrategyOptions = ExtensionsV1beta1FSGroupStrategyOptions;\n/**\n* HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined. Deprecated: use HostPortRange from policy API Group instead.\n*/\nclass ExtensionsV1beta1HostPortRange {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1HostPortRange.attributeTypeMap;\n }\n}\nExtensionsV1beta1HostPortRange.discriminator = undefined;\nExtensionsV1beta1HostPortRange.attributeTypeMap = [\n {\n \"name\": \"max\",\n \"baseName\": \"max\",\n \"type\": \"number\"\n },\n {\n \"name\": \"min\",\n \"baseName\": \"min\",\n \"type\": \"number\"\n }\n];\nexports.ExtensionsV1beta1HostPortRange = ExtensionsV1beta1HostPortRange;\n/**\n* IDRange provides a min/max of an allowed range of IDs. Deprecated: use IDRange from policy API Group instead.\n*/\nclass ExtensionsV1beta1IDRange {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1IDRange.attributeTypeMap;\n }\n}\nExtensionsV1beta1IDRange.discriminator = undefined;\nExtensionsV1beta1IDRange.attributeTypeMap = [\n {\n \"name\": \"max\",\n \"baseName\": \"max\",\n \"type\": \"number\"\n },\n {\n \"name\": \"min\",\n \"baseName\": \"min\",\n \"type\": \"number\"\n }\n];\nexports.ExtensionsV1beta1IDRange = ExtensionsV1beta1IDRange;\n/**\n* PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated: use PodSecurityPolicy from policy API Group instead.\n*/\nclass ExtensionsV1beta1PodSecurityPolicy {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1PodSecurityPolicy.attributeTypeMap;\n }\n}\nExtensionsV1beta1PodSecurityPolicy.discriminator = undefined;\nExtensionsV1beta1PodSecurityPolicy.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"ExtensionsV1beta1PodSecurityPolicySpec\"\n }\n];\nexports.ExtensionsV1beta1PodSecurityPolicy = ExtensionsV1beta1PodSecurityPolicy;\n/**\n* PodSecurityPolicyList is a list of PodSecurityPolicy objects. Deprecated: use PodSecurityPolicyList from policy API Group instead.\n*/\nclass ExtensionsV1beta1PodSecurityPolicyList {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1PodSecurityPolicyList.attributeTypeMap;\n }\n}\nExtensionsV1beta1PodSecurityPolicyList.discriminator = undefined;\nExtensionsV1beta1PodSecurityPolicyList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.ExtensionsV1beta1PodSecurityPolicyList = ExtensionsV1beta1PodSecurityPolicyList;\n/**\n* PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.\n*/\nclass ExtensionsV1beta1PodSecurityPolicySpec {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1PodSecurityPolicySpec.attributeTypeMap;\n }\n}\nExtensionsV1beta1PodSecurityPolicySpec.discriminator = undefined;\nExtensionsV1beta1PodSecurityPolicySpec.attributeTypeMap = [\n {\n \"name\": \"allowPrivilegeEscalation\",\n \"baseName\": \"allowPrivilegeEscalation\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"allowedCapabilities\",\n \"baseName\": \"allowedCapabilities\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"allowedFlexVolumes\",\n \"baseName\": \"allowedFlexVolumes\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"allowedHostPaths\",\n \"baseName\": \"allowedHostPaths\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"allowedProcMountTypes\",\n \"baseName\": \"allowedProcMountTypes\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"allowedUnsafeSysctls\",\n \"baseName\": \"allowedUnsafeSysctls\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"defaultAddCapabilities\",\n \"baseName\": \"defaultAddCapabilities\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"defaultAllowPrivilegeEscalation\",\n \"baseName\": \"defaultAllowPrivilegeEscalation\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"forbiddenSysctls\",\n \"baseName\": \"forbiddenSysctls\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"fsGroup\",\n \"baseName\": \"fsGroup\",\n \"type\": \"ExtensionsV1beta1FSGroupStrategyOptions\"\n },\n {\n \"name\": \"hostIPC\",\n \"baseName\": \"hostIPC\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"hostNetwork\",\n \"baseName\": \"hostNetwork\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"hostPID\",\n \"baseName\": \"hostPID\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"hostPorts\",\n \"baseName\": \"hostPorts\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"privileged\",\n \"baseName\": \"privileged\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"readOnlyRootFilesystem\",\n \"baseName\": \"readOnlyRootFilesystem\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"requiredDropCapabilities\",\n \"baseName\": \"requiredDropCapabilities\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"runAsGroup\",\n \"baseName\": \"runAsGroup\",\n \"type\": \"ExtensionsV1beta1RunAsGroupStrategyOptions\"\n },\n {\n \"name\": \"runAsUser\",\n \"baseName\": \"runAsUser\",\n \"type\": \"ExtensionsV1beta1RunAsUserStrategyOptions\"\n },\n {\n \"name\": \"seLinux\",\n \"baseName\": \"seLinux\",\n \"type\": \"ExtensionsV1beta1SELinuxStrategyOptions\"\n },\n {\n \"name\": \"supplementalGroups\",\n \"baseName\": \"supplementalGroups\",\n \"type\": \"ExtensionsV1beta1SupplementalGroupsStrategyOptions\"\n },\n {\n \"name\": \"volumes\",\n \"baseName\": \"volumes\",\n \"type\": \"Array\"\n }\n];\nexports.ExtensionsV1beta1PodSecurityPolicySpec = ExtensionsV1beta1PodSecurityPolicySpec;\n/**\n* DEPRECATED.\n*/\nclass ExtensionsV1beta1RollbackConfig {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1RollbackConfig.attributeTypeMap;\n }\n}\nExtensionsV1beta1RollbackConfig.discriminator = undefined;\nExtensionsV1beta1RollbackConfig.attributeTypeMap = [\n {\n \"name\": \"revision\",\n \"baseName\": \"revision\",\n \"type\": \"number\"\n }\n];\nexports.ExtensionsV1beta1RollbackConfig = ExtensionsV1beta1RollbackConfig;\n/**\n* Spec to control the desired behavior of rolling update.\n*/\nclass ExtensionsV1beta1RollingUpdateDeployment {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1RollingUpdateDeployment.attributeTypeMap;\n }\n}\nExtensionsV1beta1RollingUpdateDeployment.discriminator = undefined;\nExtensionsV1beta1RollingUpdateDeployment.attributeTypeMap = [\n {\n \"name\": \"maxSurge\",\n \"baseName\": \"maxSurge\",\n \"type\": \"any\"\n },\n {\n \"name\": \"maxUnavailable\",\n \"baseName\": \"maxUnavailable\",\n \"type\": \"any\"\n }\n];\nexports.ExtensionsV1beta1RollingUpdateDeployment = ExtensionsV1beta1RollingUpdateDeployment;\n/**\n* RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use RunAsGroupStrategyOptions from policy API Group instead.\n*/\nclass ExtensionsV1beta1RunAsGroupStrategyOptions {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1RunAsGroupStrategyOptions.attributeTypeMap;\n }\n}\nExtensionsV1beta1RunAsGroupStrategyOptions.discriminator = undefined;\nExtensionsV1beta1RunAsGroupStrategyOptions.attributeTypeMap = [\n {\n \"name\": \"ranges\",\n \"baseName\": \"ranges\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"rule\",\n \"baseName\": \"rule\",\n \"type\": \"string\"\n }\n];\nexports.ExtensionsV1beta1RunAsGroupStrategyOptions = ExtensionsV1beta1RunAsGroupStrategyOptions;\n/**\n* RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use RunAsUserStrategyOptions from policy API Group instead.\n*/\nclass ExtensionsV1beta1RunAsUserStrategyOptions {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1RunAsUserStrategyOptions.attributeTypeMap;\n }\n}\nExtensionsV1beta1RunAsUserStrategyOptions.discriminator = undefined;\nExtensionsV1beta1RunAsUserStrategyOptions.attributeTypeMap = [\n {\n \"name\": \"ranges\",\n \"baseName\": \"ranges\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"rule\",\n \"baseName\": \"rule\",\n \"type\": \"string\"\n }\n];\nexports.ExtensionsV1beta1RunAsUserStrategyOptions = ExtensionsV1beta1RunAsUserStrategyOptions;\n/**\n* SELinuxStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use SELinuxStrategyOptions from policy API Group instead.\n*/\nclass ExtensionsV1beta1SELinuxStrategyOptions {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1SELinuxStrategyOptions.attributeTypeMap;\n }\n}\nExtensionsV1beta1SELinuxStrategyOptions.discriminator = undefined;\nExtensionsV1beta1SELinuxStrategyOptions.attributeTypeMap = [\n {\n \"name\": \"rule\",\n \"baseName\": \"rule\",\n \"type\": \"string\"\n },\n {\n \"name\": \"seLinuxOptions\",\n \"baseName\": \"seLinuxOptions\",\n \"type\": \"V1SELinuxOptions\"\n }\n];\nexports.ExtensionsV1beta1SELinuxStrategyOptions = ExtensionsV1beta1SELinuxStrategyOptions;\n/**\n* represents a scaling request for a resource.\n*/\nclass ExtensionsV1beta1Scale {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1Scale.attributeTypeMap;\n }\n}\nExtensionsV1beta1Scale.discriminator = undefined;\nExtensionsV1beta1Scale.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"ExtensionsV1beta1ScaleSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"ExtensionsV1beta1ScaleStatus\"\n }\n];\nexports.ExtensionsV1beta1Scale = ExtensionsV1beta1Scale;\n/**\n* describes the attributes of a scale subresource\n*/\nclass ExtensionsV1beta1ScaleSpec {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1ScaleSpec.attributeTypeMap;\n }\n}\nExtensionsV1beta1ScaleSpec.discriminator = undefined;\nExtensionsV1beta1ScaleSpec.attributeTypeMap = [\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n }\n];\nexports.ExtensionsV1beta1ScaleSpec = ExtensionsV1beta1ScaleSpec;\n/**\n* represents the current status of a scale subresource.\n*/\nclass ExtensionsV1beta1ScaleStatus {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1ScaleStatus.attributeTypeMap;\n }\n}\nExtensionsV1beta1ScaleStatus.discriminator = undefined;\nExtensionsV1beta1ScaleStatus.attributeTypeMap = [\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"targetSelector\",\n \"baseName\": \"targetSelector\",\n \"type\": \"string\"\n }\n];\nexports.ExtensionsV1beta1ScaleStatus = ExtensionsV1beta1ScaleStatus;\n/**\n* SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. Deprecated: use SupplementalGroupsStrategyOptions from policy API Group instead.\n*/\nclass ExtensionsV1beta1SupplementalGroupsStrategyOptions {\n static getAttributeTypeMap() {\n return ExtensionsV1beta1SupplementalGroupsStrategyOptions.attributeTypeMap;\n }\n}\nExtensionsV1beta1SupplementalGroupsStrategyOptions.discriminator = undefined;\nExtensionsV1beta1SupplementalGroupsStrategyOptions.attributeTypeMap = [\n {\n \"name\": \"ranges\",\n \"baseName\": \"ranges\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"rule\",\n \"baseName\": \"rule\",\n \"type\": \"string\"\n }\n];\nexports.ExtensionsV1beta1SupplementalGroupsStrategyOptions = ExtensionsV1beta1SupplementalGroupsStrategyOptions;\n/**\n* AllowedFlexVolume represents a single Flexvolume that is allowed to be used.\n*/\nclass PolicyV1beta1AllowedFlexVolume {\n static getAttributeTypeMap() {\n return PolicyV1beta1AllowedFlexVolume.attributeTypeMap;\n }\n}\nPolicyV1beta1AllowedFlexVolume.discriminator = undefined;\nPolicyV1beta1AllowedFlexVolume.attributeTypeMap = [\n {\n \"name\": \"driver\",\n \"baseName\": \"driver\",\n \"type\": \"string\"\n }\n];\nexports.PolicyV1beta1AllowedFlexVolume = PolicyV1beta1AllowedFlexVolume;\n/**\n* AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.\n*/\nclass PolicyV1beta1AllowedHostPath {\n static getAttributeTypeMap() {\n return PolicyV1beta1AllowedHostPath.attributeTypeMap;\n }\n}\nPolicyV1beta1AllowedHostPath.discriminator = undefined;\nPolicyV1beta1AllowedHostPath.attributeTypeMap = [\n {\n \"name\": \"pathPrefix\",\n \"baseName\": \"pathPrefix\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n }\n];\nexports.PolicyV1beta1AllowedHostPath = PolicyV1beta1AllowedHostPath;\n/**\n* FSGroupStrategyOptions defines the strategy type and options used to create the strategy.\n*/\nclass PolicyV1beta1FSGroupStrategyOptions {\n static getAttributeTypeMap() {\n return PolicyV1beta1FSGroupStrategyOptions.attributeTypeMap;\n }\n}\nPolicyV1beta1FSGroupStrategyOptions.discriminator = undefined;\nPolicyV1beta1FSGroupStrategyOptions.attributeTypeMap = [\n {\n \"name\": \"ranges\",\n \"baseName\": \"ranges\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"rule\",\n \"baseName\": \"rule\",\n \"type\": \"string\"\n }\n];\nexports.PolicyV1beta1FSGroupStrategyOptions = PolicyV1beta1FSGroupStrategyOptions;\n/**\n* HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.\n*/\nclass PolicyV1beta1HostPortRange {\n static getAttributeTypeMap() {\n return PolicyV1beta1HostPortRange.attributeTypeMap;\n }\n}\nPolicyV1beta1HostPortRange.discriminator = undefined;\nPolicyV1beta1HostPortRange.attributeTypeMap = [\n {\n \"name\": \"max\",\n \"baseName\": \"max\",\n \"type\": \"number\"\n },\n {\n \"name\": \"min\",\n \"baseName\": \"min\",\n \"type\": \"number\"\n }\n];\nexports.PolicyV1beta1HostPortRange = PolicyV1beta1HostPortRange;\n/**\n* IDRange provides a min/max of an allowed range of IDs.\n*/\nclass PolicyV1beta1IDRange {\n static getAttributeTypeMap() {\n return PolicyV1beta1IDRange.attributeTypeMap;\n }\n}\nPolicyV1beta1IDRange.discriminator = undefined;\nPolicyV1beta1IDRange.attributeTypeMap = [\n {\n \"name\": \"max\",\n \"baseName\": \"max\",\n \"type\": \"number\"\n },\n {\n \"name\": \"min\",\n \"baseName\": \"min\",\n \"type\": \"number\"\n }\n];\nexports.PolicyV1beta1IDRange = PolicyV1beta1IDRange;\n/**\n* PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.\n*/\nclass PolicyV1beta1PodSecurityPolicy {\n static getAttributeTypeMap() {\n return PolicyV1beta1PodSecurityPolicy.attributeTypeMap;\n }\n}\nPolicyV1beta1PodSecurityPolicy.discriminator = undefined;\nPolicyV1beta1PodSecurityPolicy.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"PolicyV1beta1PodSecurityPolicySpec\"\n }\n];\nexports.PolicyV1beta1PodSecurityPolicy = PolicyV1beta1PodSecurityPolicy;\n/**\n* PodSecurityPolicyList is a list of PodSecurityPolicy objects.\n*/\nclass PolicyV1beta1PodSecurityPolicyList {\n static getAttributeTypeMap() {\n return PolicyV1beta1PodSecurityPolicyList.attributeTypeMap;\n }\n}\nPolicyV1beta1PodSecurityPolicyList.discriminator = undefined;\nPolicyV1beta1PodSecurityPolicyList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.PolicyV1beta1PodSecurityPolicyList = PolicyV1beta1PodSecurityPolicyList;\n/**\n* PodSecurityPolicySpec defines the policy enforced.\n*/\nclass PolicyV1beta1PodSecurityPolicySpec {\n static getAttributeTypeMap() {\n return PolicyV1beta1PodSecurityPolicySpec.attributeTypeMap;\n }\n}\nPolicyV1beta1PodSecurityPolicySpec.discriminator = undefined;\nPolicyV1beta1PodSecurityPolicySpec.attributeTypeMap = [\n {\n \"name\": \"allowPrivilegeEscalation\",\n \"baseName\": \"allowPrivilegeEscalation\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"allowedCapabilities\",\n \"baseName\": \"allowedCapabilities\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"allowedFlexVolumes\",\n \"baseName\": \"allowedFlexVolumes\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"allowedHostPaths\",\n \"baseName\": \"allowedHostPaths\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"allowedProcMountTypes\",\n \"baseName\": \"allowedProcMountTypes\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"allowedUnsafeSysctls\",\n \"baseName\": \"allowedUnsafeSysctls\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"defaultAddCapabilities\",\n \"baseName\": \"defaultAddCapabilities\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"defaultAllowPrivilegeEscalation\",\n \"baseName\": \"defaultAllowPrivilegeEscalation\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"forbiddenSysctls\",\n \"baseName\": \"forbiddenSysctls\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"fsGroup\",\n \"baseName\": \"fsGroup\",\n \"type\": \"PolicyV1beta1FSGroupStrategyOptions\"\n },\n {\n \"name\": \"hostIPC\",\n \"baseName\": \"hostIPC\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"hostNetwork\",\n \"baseName\": \"hostNetwork\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"hostPID\",\n \"baseName\": \"hostPID\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"hostPorts\",\n \"baseName\": \"hostPorts\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"privileged\",\n \"baseName\": \"privileged\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"readOnlyRootFilesystem\",\n \"baseName\": \"readOnlyRootFilesystem\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"requiredDropCapabilities\",\n \"baseName\": \"requiredDropCapabilities\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"runAsGroup\",\n \"baseName\": \"runAsGroup\",\n \"type\": \"PolicyV1beta1RunAsGroupStrategyOptions\"\n },\n {\n \"name\": \"runAsUser\",\n \"baseName\": \"runAsUser\",\n \"type\": \"PolicyV1beta1RunAsUserStrategyOptions\"\n },\n {\n \"name\": \"seLinux\",\n \"baseName\": \"seLinux\",\n \"type\": \"PolicyV1beta1SELinuxStrategyOptions\"\n },\n {\n \"name\": \"supplementalGroups\",\n \"baseName\": \"supplementalGroups\",\n \"type\": \"PolicyV1beta1SupplementalGroupsStrategyOptions\"\n },\n {\n \"name\": \"volumes\",\n \"baseName\": \"volumes\",\n \"type\": \"Array\"\n }\n];\nexports.PolicyV1beta1PodSecurityPolicySpec = PolicyV1beta1PodSecurityPolicySpec;\n/**\n* RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy.\n*/\nclass PolicyV1beta1RunAsGroupStrategyOptions {\n static getAttributeTypeMap() {\n return PolicyV1beta1RunAsGroupStrategyOptions.attributeTypeMap;\n }\n}\nPolicyV1beta1RunAsGroupStrategyOptions.discriminator = undefined;\nPolicyV1beta1RunAsGroupStrategyOptions.attributeTypeMap = [\n {\n \"name\": \"ranges\",\n \"baseName\": \"ranges\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"rule\",\n \"baseName\": \"rule\",\n \"type\": \"string\"\n }\n];\nexports.PolicyV1beta1RunAsGroupStrategyOptions = PolicyV1beta1RunAsGroupStrategyOptions;\n/**\n* RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy.\n*/\nclass PolicyV1beta1RunAsUserStrategyOptions {\n static getAttributeTypeMap() {\n return PolicyV1beta1RunAsUserStrategyOptions.attributeTypeMap;\n }\n}\nPolicyV1beta1RunAsUserStrategyOptions.discriminator = undefined;\nPolicyV1beta1RunAsUserStrategyOptions.attributeTypeMap = [\n {\n \"name\": \"ranges\",\n \"baseName\": \"ranges\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"rule\",\n \"baseName\": \"rule\",\n \"type\": \"string\"\n }\n];\nexports.PolicyV1beta1RunAsUserStrategyOptions = PolicyV1beta1RunAsUserStrategyOptions;\n/**\n* SELinuxStrategyOptions defines the strategy type and any options used to create the strategy.\n*/\nclass PolicyV1beta1SELinuxStrategyOptions {\n static getAttributeTypeMap() {\n return PolicyV1beta1SELinuxStrategyOptions.attributeTypeMap;\n }\n}\nPolicyV1beta1SELinuxStrategyOptions.discriminator = undefined;\nPolicyV1beta1SELinuxStrategyOptions.attributeTypeMap = [\n {\n \"name\": \"rule\",\n \"baseName\": \"rule\",\n \"type\": \"string\"\n },\n {\n \"name\": \"seLinuxOptions\",\n \"baseName\": \"seLinuxOptions\",\n \"type\": \"V1SELinuxOptions\"\n }\n];\nexports.PolicyV1beta1SELinuxStrategyOptions = PolicyV1beta1SELinuxStrategyOptions;\n/**\n* SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.\n*/\nclass PolicyV1beta1SupplementalGroupsStrategyOptions {\n static getAttributeTypeMap() {\n return PolicyV1beta1SupplementalGroupsStrategyOptions.attributeTypeMap;\n }\n}\nPolicyV1beta1SupplementalGroupsStrategyOptions.discriminator = undefined;\nPolicyV1beta1SupplementalGroupsStrategyOptions.attributeTypeMap = [\n {\n \"name\": \"ranges\",\n \"baseName\": \"ranges\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"rule\",\n \"baseName\": \"rule\",\n \"type\": \"string\"\n }\n];\nexports.PolicyV1beta1SupplementalGroupsStrategyOptions = PolicyV1beta1SupplementalGroupsStrategyOptions;\n/**\n* RawExtension is used to hold extensions in external versions. To use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types. // Internal package: type MyAPIObject struct { runtime.TypeMeta `json:\\\",inline\\\"` MyPlugin runtime.Object `json:\\\"myPlugin\\\"` } type PluginA struct { AOption string `json:\\\"aOption\\\"` } // External package: type MyAPIObject struct { runtime.TypeMeta `json:\\\",inline\\\"` MyPlugin runtime.RawExtension `json:\\\"myPlugin\\\"` } type PluginA struct { AOption string `json:\\\"aOption\\\"` } // On the wire, the JSON will look something like this: { \\\"kind\\\":\\\"MyAPIObject\\\", \\\"apiVersion\\\":\\\"v1\\\", \\\"myPlugin\\\": { \\\"kind\\\":\\\"PluginA\\\", \\\"aOption\\\":\\\"foo\\\", }, } So what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)\n*/\nclass RuntimeRawExtension {\n static getAttributeTypeMap() {\n return RuntimeRawExtension.attributeTypeMap;\n }\n}\nRuntimeRawExtension.discriminator = undefined;\nRuntimeRawExtension.attributeTypeMap = [\n {\n \"name\": \"raw\",\n \"baseName\": \"Raw\",\n \"type\": \"string\"\n }\n];\nexports.RuntimeRawExtension = RuntimeRawExtension;\n/**\n* APIGroup contains the name, the supported versions, and the preferred version of a group.\n*/\nclass V1APIGroup {\n static getAttributeTypeMap() {\n return V1APIGroup.attributeTypeMap;\n }\n}\nV1APIGroup.discriminator = undefined;\nV1APIGroup.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"preferredVersion\",\n \"baseName\": \"preferredVersion\",\n \"type\": \"V1GroupVersionForDiscovery\"\n },\n {\n \"name\": \"serverAddressByClientCIDRs\",\n \"baseName\": \"serverAddressByClientCIDRs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"versions\",\n \"baseName\": \"versions\",\n \"type\": \"Array\"\n }\n];\nexports.V1APIGroup = V1APIGroup;\n/**\n* APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.\n*/\nclass V1APIGroupList {\n static getAttributeTypeMap() {\n return V1APIGroupList.attributeTypeMap;\n }\n}\nV1APIGroupList.discriminator = undefined;\nV1APIGroupList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"groups\",\n \"baseName\": \"groups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n }\n];\nexports.V1APIGroupList = V1APIGroupList;\n/**\n* APIResource specifies the name of a resource and whether it is namespaced.\n*/\nclass V1APIResource {\n static getAttributeTypeMap() {\n return V1APIResource.attributeTypeMap;\n }\n}\nV1APIResource.discriminator = undefined;\nV1APIResource.attributeTypeMap = [\n {\n \"name\": \"categories\",\n \"baseName\": \"categories\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"group\",\n \"baseName\": \"group\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespaced\",\n \"baseName\": \"namespaced\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"shortNames\",\n \"baseName\": \"shortNames\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"singularName\",\n \"baseName\": \"singularName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"verbs\",\n \"baseName\": \"verbs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"version\",\n \"baseName\": \"version\",\n \"type\": \"string\"\n }\n];\nexports.V1APIResource = V1APIResource;\n/**\n* APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.\n*/\nclass V1APIResourceList {\n static getAttributeTypeMap() {\n return V1APIResourceList.attributeTypeMap;\n }\n}\nV1APIResourceList.discriminator = undefined;\nV1APIResourceList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"groupVersion\",\n \"baseName\": \"groupVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"Array\"\n }\n];\nexports.V1APIResourceList = V1APIResourceList;\n/**\n* APIService represents a server for a particular GroupVersion. Name must be \\\"version.group\\\".\n*/\nclass V1APIService {\n static getAttributeTypeMap() {\n return V1APIService.attributeTypeMap;\n }\n}\nV1APIService.discriminator = undefined;\nV1APIService.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1APIServiceSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1APIServiceStatus\"\n }\n];\nexports.V1APIService = V1APIService;\nclass V1APIServiceCondition {\n static getAttributeTypeMap() {\n return V1APIServiceCondition.attributeTypeMap;\n }\n}\nV1APIServiceCondition.discriminator = undefined;\nV1APIServiceCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1APIServiceCondition = V1APIServiceCondition;\n/**\n* APIServiceList is a list of APIService objects.\n*/\nclass V1APIServiceList {\n static getAttributeTypeMap() {\n return V1APIServiceList.attributeTypeMap;\n }\n}\nV1APIServiceList.discriminator = undefined;\nV1APIServiceList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1APIServiceList = V1APIServiceList;\n/**\n* APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.\n*/\nclass V1APIServiceSpec {\n static getAttributeTypeMap() {\n return V1APIServiceSpec.attributeTypeMap;\n }\n}\nV1APIServiceSpec.discriminator = undefined;\nV1APIServiceSpec.attributeTypeMap = [\n {\n \"name\": \"caBundle\",\n \"baseName\": \"caBundle\",\n \"type\": \"string\"\n },\n {\n \"name\": \"group\",\n \"baseName\": \"group\",\n \"type\": \"string\"\n },\n {\n \"name\": \"groupPriorityMinimum\",\n \"baseName\": \"groupPriorityMinimum\",\n \"type\": \"number\"\n },\n {\n \"name\": \"insecureSkipTLSVerify\",\n \"baseName\": \"insecureSkipTLSVerify\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"service\",\n \"baseName\": \"service\",\n \"type\": \"V1ServiceReference\"\n },\n {\n \"name\": \"version\",\n \"baseName\": \"version\",\n \"type\": \"string\"\n },\n {\n \"name\": \"versionPriority\",\n \"baseName\": \"versionPriority\",\n \"type\": \"number\"\n }\n];\nexports.V1APIServiceSpec = V1APIServiceSpec;\n/**\n* APIServiceStatus contains derived information about an API server\n*/\nclass V1APIServiceStatus {\n static getAttributeTypeMap() {\n return V1APIServiceStatus.attributeTypeMap;\n }\n}\nV1APIServiceStatus.discriminator = undefined;\nV1APIServiceStatus.attributeTypeMap = [\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n }\n];\nexports.V1APIServiceStatus = V1APIServiceStatus;\n/**\n* APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.\n*/\nclass V1APIVersions {\n static getAttributeTypeMap() {\n return V1APIVersions.attributeTypeMap;\n }\n}\nV1APIVersions.discriminator = undefined;\nV1APIVersions.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"serverAddressByClientCIDRs\",\n \"baseName\": \"serverAddressByClientCIDRs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"versions\",\n \"baseName\": \"versions\",\n \"type\": \"Array\"\n }\n];\nexports.V1APIVersions = V1APIVersions;\n/**\n* Represents a Persistent Disk resource in AWS. An AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.\n*/\nclass V1AWSElasticBlockStoreVolumeSource {\n static getAttributeTypeMap() {\n return V1AWSElasticBlockStoreVolumeSource.attributeTypeMap;\n }\n}\nV1AWSElasticBlockStoreVolumeSource.discriminator = undefined;\nV1AWSElasticBlockStoreVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"partition\",\n \"baseName\": \"partition\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"volumeID\",\n \"baseName\": \"volumeID\",\n \"type\": \"string\"\n }\n];\nexports.V1AWSElasticBlockStoreVolumeSource = V1AWSElasticBlockStoreVolumeSource;\n/**\n* Affinity is a group of affinity scheduling rules.\n*/\nclass V1Affinity {\n static getAttributeTypeMap() {\n return V1Affinity.attributeTypeMap;\n }\n}\nV1Affinity.discriminator = undefined;\nV1Affinity.attributeTypeMap = [\n {\n \"name\": \"nodeAffinity\",\n \"baseName\": \"nodeAffinity\",\n \"type\": \"V1NodeAffinity\"\n },\n {\n \"name\": \"podAffinity\",\n \"baseName\": \"podAffinity\",\n \"type\": \"V1PodAffinity\"\n },\n {\n \"name\": \"podAntiAffinity\",\n \"baseName\": \"podAntiAffinity\",\n \"type\": \"V1PodAntiAffinity\"\n }\n];\nexports.V1Affinity = V1Affinity;\n/**\n* AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole\n*/\nclass V1AggregationRule {\n static getAttributeTypeMap() {\n return V1AggregationRule.attributeTypeMap;\n }\n}\nV1AggregationRule.discriminator = undefined;\nV1AggregationRule.attributeTypeMap = [\n {\n \"name\": \"clusterRoleSelectors\",\n \"baseName\": \"clusterRoleSelectors\",\n \"type\": \"Array\"\n }\n];\nexports.V1AggregationRule = V1AggregationRule;\n/**\n* AttachedVolume describes a volume attached to a node\n*/\nclass V1AttachedVolume {\n static getAttributeTypeMap() {\n return V1AttachedVolume.attributeTypeMap;\n }\n}\nV1AttachedVolume.discriminator = undefined;\nV1AttachedVolume.attributeTypeMap = [\n {\n \"name\": \"devicePath\",\n \"baseName\": \"devicePath\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\nexports.V1AttachedVolume = V1AttachedVolume;\n/**\n* AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.\n*/\nclass V1AzureDiskVolumeSource {\n static getAttributeTypeMap() {\n return V1AzureDiskVolumeSource.attributeTypeMap;\n }\n}\nV1AzureDiskVolumeSource.discriminator = undefined;\nV1AzureDiskVolumeSource.attributeTypeMap = [\n {\n \"name\": \"cachingMode\",\n \"baseName\": \"cachingMode\",\n \"type\": \"string\"\n },\n {\n \"name\": \"diskName\",\n \"baseName\": \"diskName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"diskURI\",\n \"baseName\": \"diskURI\",\n \"type\": \"string\"\n },\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n }\n];\nexports.V1AzureDiskVolumeSource = V1AzureDiskVolumeSource;\n/**\n* AzureFile represents an Azure File Service mount on the host and bind mount to the pod.\n*/\nclass V1AzureFilePersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1AzureFilePersistentVolumeSource.attributeTypeMap;\n }\n}\nV1AzureFilePersistentVolumeSource.discriminator = undefined;\nV1AzureFilePersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretName\",\n \"baseName\": \"secretName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"secretNamespace\",\n \"baseName\": \"secretNamespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"shareName\",\n \"baseName\": \"shareName\",\n \"type\": \"string\"\n }\n];\nexports.V1AzureFilePersistentVolumeSource = V1AzureFilePersistentVolumeSource;\n/**\n* AzureFile represents an Azure File Service mount on the host and bind mount to the pod.\n*/\nclass V1AzureFileVolumeSource {\n static getAttributeTypeMap() {\n return V1AzureFileVolumeSource.attributeTypeMap;\n }\n}\nV1AzureFileVolumeSource.discriminator = undefined;\nV1AzureFileVolumeSource.attributeTypeMap = [\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretName\",\n \"baseName\": \"secretName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"shareName\",\n \"baseName\": \"shareName\",\n \"type\": \"string\"\n }\n];\nexports.V1AzureFileVolumeSource = V1AzureFileVolumeSource;\n/**\n* Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.\n*/\nclass V1Binding {\n static getAttributeTypeMap() {\n return V1Binding.attributeTypeMap;\n }\n}\nV1Binding.discriminator = undefined;\nV1Binding.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"target\",\n \"baseName\": \"target\",\n \"type\": \"V1ObjectReference\"\n }\n];\nexports.V1Binding = V1Binding;\n/**\n* Represents storage that is managed by an external CSI volume driver (Beta feature)\n*/\nclass V1CSIPersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1CSIPersistentVolumeSource.attributeTypeMap;\n }\n}\nV1CSIPersistentVolumeSource.discriminator = undefined;\nV1CSIPersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"controllerPublishSecretRef\",\n \"baseName\": \"controllerPublishSecretRef\",\n \"type\": \"V1SecretReference\"\n },\n {\n \"name\": \"driver\",\n \"baseName\": \"driver\",\n \"type\": \"string\"\n },\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nodePublishSecretRef\",\n \"baseName\": \"nodePublishSecretRef\",\n \"type\": \"V1SecretReference\"\n },\n {\n \"name\": \"nodeStageSecretRef\",\n \"baseName\": \"nodeStageSecretRef\",\n \"type\": \"V1SecretReference\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"volumeAttributes\",\n \"baseName\": \"volumeAttributes\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"volumeHandle\",\n \"baseName\": \"volumeHandle\",\n \"type\": \"string\"\n }\n];\nexports.V1CSIPersistentVolumeSource = V1CSIPersistentVolumeSource;\n/**\n* Adds and removes POSIX capabilities from running containers.\n*/\nclass V1Capabilities {\n static getAttributeTypeMap() {\n return V1Capabilities.attributeTypeMap;\n }\n}\nV1Capabilities.discriminator = undefined;\nV1Capabilities.attributeTypeMap = [\n {\n \"name\": \"add\",\n \"baseName\": \"add\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"drop\",\n \"baseName\": \"drop\",\n \"type\": \"Array\"\n }\n];\nexports.V1Capabilities = V1Capabilities;\n/**\n* Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.\n*/\nclass V1CephFSPersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1CephFSPersistentVolumeSource.attributeTypeMap;\n }\n}\nV1CephFSPersistentVolumeSource.discriminator = undefined;\nV1CephFSPersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"monitors\",\n \"baseName\": \"monitors\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretFile\",\n \"baseName\": \"secretFile\",\n \"type\": \"string\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1SecretReference\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"string\"\n }\n];\nexports.V1CephFSPersistentVolumeSource = V1CephFSPersistentVolumeSource;\n/**\n* Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.\n*/\nclass V1CephFSVolumeSource {\n static getAttributeTypeMap() {\n return V1CephFSVolumeSource.attributeTypeMap;\n }\n}\nV1CephFSVolumeSource.discriminator = undefined;\nV1CephFSVolumeSource.attributeTypeMap = [\n {\n \"name\": \"monitors\",\n \"baseName\": \"monitors\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretFile\",\n \"baseName\": \"secretFile\",\n \"type\": \"string\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1LocalObjectReference\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"string\"\n }\n];\nexports.V1CephFSVolumeSource = V1CephFSVolumeSource;\n/**\n* Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.\n*/\nclass V1CinderPersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1CinderPersistentVolumeSource.attributeTypeMap;\n }\n}\nV1CinderPersistentVolumeSource.discriminator = undefined;\nV1CinderPersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1SecretReference\"\n },\n {\n \"name\": \"volumeID\",\n \"baseName\": \"volumeID\",\n \"type\": \"string\"\n }\n];\nexports.V1CinderPersistentVolumeSource = V1CinderPersistentVolumeSource;\n/**\n* Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.\n*/\nclass V1CinderVolumeSource {\n static getAttributeTypeMap() {\n return V1CinderVolumeSource.attributeTypeMap;\n }\n}\nV1CinderVolumeSource.discriminator = undefined;\nV1CinderVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1LocalObjectReference\"\n },\n {\n \"name\": \"volumeID\",\n \"baseName\": \"volumeID\",\n \"type\": \"string\"\n }\n];\nexports.V1CinderVolumeSource = V1CinderVolumeSource;\n/**\n* ClientIPConfig represents the configurations of Client IP based session affinity.\n*/\nclass V1ClientIPConfig {\n static getAttributeTypeMap() {\n return V1ClientIPConfig.attributeTypeMap;\n }\n}\nV1ClientIPConfig.discriminator = undefined;\nV1ClientIPConfig.attributeTypeMap = [\n {\n \"name\": \"timeoutSeconds\",\n \"baseName\": \"timeoutSeconds\",\n \"type\": \"number\"\n }\n];\nexports.V1ClientIPConfig = V1ClientIPConfig;\n/**\n* ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.\n*/\nclass V1ClusterRole {\n static getAttributeTypeMap() {\n return V1ClusterRole.attributeTypeMap;\n }\n}\nV1ClusterRole.discriminator = undefined;\nV1ClusterRole.attributeTypeMap = [\n {\n \"name\": \"aggregationRule\",\n \"baseName\": \"aggregationRule\",\n \"type\": \"V1AggregationRule\"\n },\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"rules\",\n \"baseName\": \"rules\",\n \"type\": \"Array\"\n }\n];\nexports.V1ClusterRole = V1ClusterRole;\n/**\n* ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.\n*/\nclass V1ClusterRoleBinding {\n static getAttributeTypeMap() {\n return V1ClusterRoleBinding.attributeTypeMap;\n }\n}\nV1ClusterRoleBinding.discriminator = undefined;\nV1ClusterRoleBinding.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"roleRef\",\n \"baseName\": \"roleRef\",\n \"type\": \"V1RoleRef\"\n },\n {\n \"name\": \"subjects\",\n \"baseName\": \"subjects\",\n \"type\": \"Array\"\n }\n];\nexports.V1ClusterRoleBinding = V1ClusterRoleBinding;\n/**\n* ClusterRoleBindingList is a collection of ClusterRoleBindings\n*/\nclass V1ClusterRoleBindingList {\n static getAttributeTypeMap() {\n return V1ClusterRoleBindingList.attributeTypeMap;\n }\n}\nV1ClusterRoleBindingList.discriminator = undefined;\nV1ClusterRoleBindingList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1ClusterRoleBindingList = V1ClusterRoleBindingList;\n/**\n* ClusterRoleList is a collection of ClusterRoles\n*/\nclass V1ClusterRoleList {\n static getAttributeTypeMap() {\n return V1ClusterRoleList.attributeTypeMap;\n }\n}\nV1ClusterRoleList.discriminator = undefined;\nV1ClusterRoleList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1ClusterRoleList = V1ClusterRoleList;\n/**\n* Information about the condition of a component.\n*/\nclass V1ComponentCondition {\n static getAttributeTypeMap() {\n return V1ComponentCondition.attributeTypeMap;\n }\n}\nV1ComponentCondition.discriminator = undefined;\nV1ComponentCondition.attributeTypeMap = [\n {\n \"name\": \"error\",\n \"baseName\": \"error\",\n \"type\": \"string\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1ComponentCondition = V1ComponentCondition;\n/**\n* ComponentStatus (and ComponentStatusList) holds the cluster validation info.\n*/\nclass V1ComponentStatus {\n static getAttributeTypeMap() {\n return V1ComponentStatus.attributeTypeMap;\n }\n}\nV1ComponentStatus.discriminator = undefined;\nV1ComponentStatus.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n }\n];\nexports.V1ComponentStatus = V1ComponentStatus;\n/**\n* Status of all the conditions for the component as a list of ComponentStatus objects.\n*/\nclass V1ComponentStatusList {\n static getAttributeTypeMap() {\n return V1ComponentStatusList.attributeTypeMap;\n }\n}\nV1ComponentStatusList.discriminator = undefined;\nV1ComponentStatusList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1ComponentStatusList = V1ComponentStatusList;\n/**\n* ConfigMap holds configuration data for pods to consume.\n*/\nclass V1ConfigMap {\n static getAttributeTypeMap() {\n return V1ConfigMap.attributeTypeMap;\n }\n}\nV1ConfigMap.discriminator = undefined;\nV1ConfigMap.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"binaryData\",\n \"baseName\": \"binaryData\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"data\",\n \"baseName\": \"data\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n }\n];\nexports.V1ConfigMap = V1ConfigMap;\n/**\n* ConfigMapEnvSource selects a ConfigMap to populate the environment variables with. The contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.\n*/\nclass V1ConfigMapEnvSource {\n static getAttributeTypeMap() {\n return V1ConfigMapEnvSource.attributeTypeMap;\n }\n}\nV1ConfigMapEnvSource.discriminator = undefined;\nV1ConfigMapEnvSource.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"optional\",\n \"baseName\": \"optional\",\n \"type\": \"boolean\"\n }\n];\nexports.V1ConfigMapEnvSource = V1ConfigMapEnvSource;\n/**\n* Selects a key from a ConfigMap.\n*/\nclass V1ConfigMapKeySelector {\n static getAttributeTypeMap() {\n return V1ConfigMapKeySelector.attributeTypeMap;\n }\n}\nV1ConfigMapKeySelector.discriminator = undefined;\nV1ConfigMapKeySelector.attributeTypeMap = [\n {\n \"name\": \"key\",\n \"baseName\": \"key\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"optional\",\n \"baseName\": \"optional\",\n \"type\": \"boolean\"\n }\n];\nexports.V1ConfigMapKeySelector = V1ConfigMapKeySelector;\n/**\n* ConfigMapList is a resource containing a list of ConfigMap objects.\n*/\nclass V1ConfigMapList {\n static getAttributeTypeMap() {\n return V1ConfigMapList.attributeTypeMap;\n }\n}\nV1ConfigMapList.discriminator = undefined;\nV1ConfigMapList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1ConfigMapList = V1ConfigMapList;\n/**\n* ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node.\n*/\nclass V1ConfigMapNodeConfigSource {\n static getAttributeTypeMap() {\n return V1ConfigMapNodeConfigSource.attributeTypeMap;\n }\n}\nV1ConfigMapNodeConfigSource.discriminator = undefined;\nV1ConfigMapNodeConfigSource.attributeTypeMap = [\n {\n \"name\": \"kubeletConfigKey\",\n \"baseName\": \"kubeletConfigKey\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"resourceVersion\",\n \"baseName\": \"resourceVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n }\n];\nexports.V1ConfigMapNodeConfigSource = V1ConfigMapNodeConfigSource;\n/**\n* Adapts a ConfigMap into a projected volume. The contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.\n*/\nclass V1ConfigMapProjection {\n static getAttributeTypeMap() {\n return V1ConfigMapProjection.attributeTypeMap;\n }\n}\nV1ConfigMapProjection.discriminator = undefined;\nV1ConfigMapProjection.attributeTypeMap = [\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"optional\",\n \"baseName\": \"optional\",\n \"type\": \"boolean\"\n }\n];\nexports.V1ConfigMapProjection = V1ConfigMapProjection;\n/**\n* Adapts a ConfigMap into a volume. The contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.\n*/\nclass V1ConfigMapVolumeSource {\n static getAttributeTypeMap() {\n return V1ConfigMapVolumeSource.attributeTypeMap;\n }\n}\nV1ConfigMapVolumeSource.discriminator = undefined;\nV1ConfigMapVolumeSource.attributeTypeMap = [\n {\n \"name\": \"defaultMode\",\n \"baseName\": \"defaultMode\",\n \"type\": \"number\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"optional\",\n \"baseName\": \"optional\",\n \"type\": \"boolean\"\n }\n];\nexports.V1ConfigMapVolumeSource = V1ConfigMapVolumeSource;\n/**\n* A single application container that you want to run within a pod.\n*/\nclass V1Container {\n static getAttributeTypeMap() {\n return V1Container.attributeTypeMap;\n }\n}\nV1Container.discriminator = undefined;\nV1Container.attributeTypeMap = [\n {\n \"name\": \"args\",\n \"baseName\": \"args\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"command\",\n \"baseName\": \"command\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"env\",\n \"baseName\": \"env\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"envFrom\",\n \"baseName\": \"envFrom\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"image\",\n \"baseName\": \"image\",\n \"type\": \"string\"\n },\n {\n \"name\": \"imagePullPolicy\",\n \"baseName\": \"imagePullPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"lifecycle\",\n \"baseName\": \"lifecycle\",\n \"type\": \"V1Lifecycle\"\n },\n {\n \"name\": \"livenessProbe\",\n \"baseName\": \"livenessProbe\",\n \"type\": \"V1Probe\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"ports\",\n \"baseName\": \"ports\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"readinessProbe\",\n \"baseName\": \"readinessProbe\",\n \"type\": \"V1Probe\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"V1ResourceRequirements\"\n },\n {\n \"name\": \"securityContext\",\n \"baseName\": \"securityContext\",\n \"type\": \"V1SecurityContext\"\n },\n {\n \"name\": \"stdin\",\n \"baseName\": \"stdin\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"stdinOnce\",\n \"baseName\": \"stdinOnce\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"terminationMessagePath\",\n \"baseName\": \"terminationMessagePath\",\n \"type\": \"string\"\n },\n {\n \"name\": \"terminationMessagePolicy\",\n \"baseName\": \"terminationMessagePolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"tty\",\n \"baseName\": \"tty\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"volumeDevices\",\n \"baseName\": \"volumeDevices\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"volumeMounts\",\n \"baseName\": \"volumeMounts\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"workingDir\",\n \"baseName\": \"workingDir\",\n \"type\": \"string\"\n }\n];\nexports.V1Container = V1Container;\n/**\n* Describe a container image\n*/\nclass V1ContainerImage {\n static getAttributeTypeMap() {\n return V1ContainerImage.attributeTypeMap;\n }\n}\nV1ContainerImage.discriminator = undefined;\nV1ContainerImage.attributeTypeMap = [\n {\n \"name\": \"names\",\n \"baseName\": \"names\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"sizeBytes\",\n \"baseName\": \"sizeBytes\",\n \"type\": \"number\"\n }\n];\nexports.V1ContainerImage = V1ContainerImage;\n/**\n* ContainerPort represents a network port in a single container.\n*/\nclass V1ContainerPort {\n static getAttributeTypeMap() {\n return V1ContainerPort.attributeTypeMap;\n }\n}\nV1ContainerPort.discriminator = undefined;\nV1ContainerPort.attributeTypeMap = [\n {\n \"name\": \"containerPort\",\n \"baseName\": \"containerPort\",\n \"type\": \"number\"\n },\n {\n \"name\": \"hostIP\",\n \"baseName\": \"hostIP\",\n \"type\": \"string\"\n },\n {\n \"name\": \"hostPort\",\n \"baseName\": \"hostPort\",\n \"type\": \"number\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"protocol\",\n \"baseName\": \"protocol\",\n \"type\": \"string\"\n }\n];\nexports.V1ContainerPort = V1ContainerPort;\n/**\n* ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.\n*/\nclass V1ContainerState {\n static getAttributeTypeMap() {\n return V1ContainerState.attributeTypeMap;\n }\n}\nV1ContainerState.discriminator = undefined;\nV1ContainerState.attributeTypeMap = [\n {\n \"name\": \"running\",\n \"baseName\": \"running\",\n \"type\": \"V1ContainerStateRunning\"\n },\n {\n \"name\": \"terminated\",\n \"baseName\": \"terminated\",\n \"type\": \"V1ContainerStateTerminated\"\n },\n {\n \"name\": \"waiting\",\n \"baseName\": \"waiting\",\n \"type\": \"V1ContainerStateWaiting\"\n }\n];\nexports.V1ContainerState = V1ContainerState;\n/**\n* ContainerStateRunning is a running state of a container.\n*/\nclass V1ContainerStateRunning {\n static getAttributeTypeMap() {\n return V1ContainerStateRunning.attributeTypeMap;\n }\n}\nV1ContainerStateRunning.discriminator = undefined;\nV1ContainerStateRunning.attributeTypeMap = [\n {\n \"name\": \"startedAt\",\n \"baseName\": \"startedAt\",\n \"type\": \"Date\"\n }\n];\nexports.V1ContainerStateRunning = V1ContainerStateRunning;\n/**\n* ContainerStateTerminated is a terminated state of a container.\n*/\nclass V1ContainerStateTerminated {\n static getAttributeTypeMap() {\n return V1ContainerStateTerminated.attributeTypeMap;\n }\n}\nV1ContainerStateTerminated.discriminator = undefined;\nV1ContainerStateTerminated.attributeTypeMap = [\n {\n \"name\": \"containerID\",\n \"baseName\": \"containerID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"exitCode\",\n \"baseName\": \"exitCode\",\n \"type\": \"number\"\n },\n {\n \"name\": \"finishedAt\",\n \"baseName\": \"finishedAt\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"signal\",\n \"baseName\": \"signal\",\n \"type\": \"number\"\n },\n {\n \"name\": \"startedAt\",\n \"baseName\": \"startedAt\",\n \"type\": \"Date\"\n }\n];\nexports.V1ContainerStateTerminated = V1ContainerStateTerminated;\n/**\n* ContainerStateWaiting is a waiting state of a container.\n*/\nclass V1ContainerStateWaiting {\n static getAttributeTypeMap() {\n return V1ContainerStateWaiting.attributeTypeMap;\n }\n}\nV1ContainerStateWaiting.discriminator = undefined;\nV1ContainerStateWaiting.attributeTypeMap = [\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n }\n];\nexports.V1ContainerStateWaiting = V1ContainerStateWaiting;\n/**\n* ContainerStatus contains details for the current status of this container.\n*/\nclass V1ContainerStatus {\n static getAttributeTypeMap() {\n return V1ContainerStatus.attributeTypeMap;\n }\n}\nV1ContainerStatus.discriminator = undefined;\nV1ContainerStatus.attributeTypeMap = [\n {\n \"name\": \"containerID\",\n \"baseName\": \"containerID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"image\",\n \"baseName\": \"image\",\n \"type\": \"string\"\n },\n {\n \"name\": \"imageID\",\n \"baseName\": \"imageID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"lastState\",\n \"baseName\": \"lastState\",\n \"type\": \"V1ContainerState\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"ready\",\n \"baseName\": \"ready\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"restartCount\",\n \"baseName\": \"restartCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"state\",\n \"baseName\": \"state\",\n \"type\": \"V1ContainerState\"\n }\n];\nexports.V1ContainerStatus = V1ContainerStatus;\n/**\n* ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.\n*/\nclass V1ControllerRevision {\n static getAttributeTypeMap() {\n return V1ControllerRevision.attributeTypeMap;\n }\n}\nV1ControllerRevision.discriminator = undefined;\nV1ControllerRevision.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"data\",\n \"baseName\": \"data\",\n \"type\": \"RuntimeRawExtension\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"revision\",\n \"baseName\": \"revision\",\n \"type\": \"number\"\n }\n];\nexports.V1ControllerRevision = V1ControllerRevision;\n/**\n* ControllerRevisionList is a resource containing a list of ControllerRevision objects.\n*/\nclass V1ControllerRevisionList {\n static getAttributeTypeMap() {\n return V1ControllerRevisionList.attributeTypeMap;\n }\n}\nV1ControllerRevisionList.discriminator = undefined;\nV1ControllerRevisionList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1ControllerRevisionList = V1ControllerRevisionList;\n/**\n* CrossVersionObjectReference contains enough information to let you identify the referred resource.\n*/\nclass V1CrossVersionObjectReference {\n static getAttributeTypeMap() {\n return V1CrossVersionObjectReference.attributeTypeMap;\n }\n}\nV1CrossVersionObjectReference.discriminator = undefined;\nV1CrossVersionObjectReference.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\nexports.V1CrossVersionObjectReference = V1CrossVersionObjectReference;\n/**\n* DaemonEndpoint contains information about a single Daemon endpoint.\n*/\nclass V1DaemonEndpoint {\n static getAttributeTypeMap() {\n return V1DaemonEndpoint.attributeTypeMap;\n }\n}\nV1DaemonEndpoint.discriminator = undefined;\nV1DaemonEndpoint.attributeTypeMap = [\n {\n \"name\": \"port\",\n \"baseName\": \"Port\",\n \"type\": \"number\"\n }\n];\nexports.V1DaemonEndpoint = V1DaemonEndpoint;\n/**\n* DaemonSet represents the configuration of a daemon set.\n*/\nclass V1DaemonSet {\n static getAttributeTypeMap() {\n return V1DaemonSet.attributeTypeMap;\n }\n}\nV1DaemonSet.discriminator = undefined;\nV1DaemonSet.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1DaemonSetSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1DaemonSetStatus\"\n }\n];\nexports.V1DaemonSet = V1DaemonSet;\n/**\n* DaemonSetCondition describes the state of a DaemonSet at a certain point.\n*/\nclass V1DaemonSetCondition {\n static getAttributeTypeMap() {\n return V1DaemonSetCondition.attributeTypeMap;\n }\n}\nV1DaemonSetCondition.discriminator = undefined;\nV1DaemonSetCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1DaemonSetCondition = V1DaemonSetCondition;\n/**\n* DaemonSetList is a collection of daemon sets.\n*/\nclass V1DaemonSetList {\n static getAttributeTypeMap() {\n return V1DaemonSetList.attributeTypeMap;\n }\n}\nV1DaemonSetList.discriminator = undefined;\nV1DaemonSetList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1DaemonSetList = V1DaemonSetList;\n/**\n* DaemonSetSpec is the specification of a daemon set.\n*/\nclass V1DaemonSetSpec {\n static getAttributeTypeMap() {\n return V1DaemonSetSpec.attributeTypeMap;\n }\n}\nV1DaemonSetSpec.discriminator = undefined;\nV1DaemonSetSpec.attributeTypeMap = [\n {\n \"name\": \"minReadySeconds\",\n \"baseName\": \"minReadySeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"revisionHistoryLimit\",\n \"baseName\": \"revisionHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n },\n {\n \"name\": \"updateStrategy\",\n \"baseName\": \"updateStrategy\",\n \"type\": \"V1DaemonSetUpdateStrategy\"\n }\n];\nexports.V1DaemonSetSpec = V1DaemonSetSpec;\n/**\n* DaemonSetStatus represents the current status of a daemon set.\n*/\nclass V1DaemonSetStatus {\n static getAttributeTypeMap() {\n return V1DaemonSetStatus.attributeTypeMap;\n }\n}\nV1DaemonSetStatus.discriminator = undefined;\nV1DaemonSetStatus.attributeTypeMap = [\n {\n \"name\": \"collisionCount\",\n \"baseName\": \"collisionCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"currentNumberScheduled\",\n \"baseName\": \"currentNumberScheduled\",\n \"type\": \"number\"\n },\n {\n \"name\": \"desiredNumberScheduled\",\n \"baseName\": \"desiredNumberScheduled\",\n \"type\": \"number\"\n },\n {\n \"name\": \"numberAvailable\",\n \"baseName\": \"numberAvailable\",\n \"type\": \"number\"\n },\n {\n \"name\": \"numberMisscheduled\",\n \"baseName\": \"numberMisscheduled\",\n \"type\": \"number\"\n },\n {\n \"name\": \"numberReady\",\n \"baseName\": \"numberReady\",\n \"type\": \"number\"\n },\n {\n \"name\": \"numberUnavailable\",\n \"baseName\": \"numberUnavailable\",\n \"type\": \"number\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"updatedNumberScheduled\",\n \"baseName\": \"updatedNumberScheduled\",\n \"type\": \"number\"\n }\n];\nexports.V1DaemonSetStatus = V1DaemonSetStatus;\n/**\n* DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.\n*/\nclass V1DaemonSetUpdateStrategy {\n static getAttributeTypeMap() {\n return V1DaemonSetUpdateStrategy.attributeTypeMap;\n }\n}\nV1DaemonSetUpdateStrategy.discriminator = undefined;\nV1DaemonSetUpdateStrategy.attributeTypeMap = [\n {\n \"name\": \"rollingUpdate\",\n \"baseName\": \"rollingUpdate\",\n \"type\": \"V1RollingUpdateDaemonSet\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1DaemonSetUpdateStrategy = V1DaemonSetUpdateStrategy;\n/**\n* DeleteOptions may be provided when deleting an API object.\n*/\nclass V1DeleteOptions {\n static getAttributeTypeMap() {\n return V1DeleteOptions.attributeTypeMap;\n }\n}\nV1DeleteOptions.discriminator = undefined;\nV1DeleteOptions.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"dryRun\",\n \"baseName\": \"dryRun\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"gracePeriodSeconds\",\n \"baseName\": \"gracePeriodSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"orphanDependents\",\n \"baseName\": \"orphanDependents\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"preconditions\",\n \"baseName\": \"preconditions\",\n \"type\": \"V1Preconditions\"\n },\n {\n \"name\": \"propagationPolicy\",\n \"baseName\": \"propagationPolicy\",\n \"type\": \"string\"\n }\n];\nexports.V1DeleteOptions = V1DeleteOptions;\n/**\n* Deployment enables declarative updates for Pods and ReplicaSets.\n*/\nclass V1Deployment {\n static getAttributeTypeMap() {\n return V1Deployment.attributeTypeMap;\n }\n}\nV1Deployment.discriminator = undefined;\nV1Deployment.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1DeploymentSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1DeploymentStatus\"\n }\n];\nexports.V1Deployment = V1Deployment;\n/**\n* DeploymentCondition describes the state of a deployment at a certain point.\n*/\nclass V1DeploymentCondition {\n static getAttributeTypeMap() {\n return V1DeploymentCondition.attributeTypeMap;\n }\n}\nV1DeploymentCondition.discriminator = undefined;\nV1DeploymentCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"lastUpdateTime\",\n \"baseName\": \"lastUpdateTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1DeploymentCondition = V1DeploymentCondition;\n/**\n* DeploymentList is a list of Deployments.\n*/\nclass V1DeploymentList {\n static getAttributeTypeMap() {\n return V1DeploymentList.attributeTypeMap;\n }\n}\nV1DeploymentList.discriminator = undefined;\nV1DeploymentList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1DeploymentList = V1DeploymentList;\n/**\n* DeploymentSpec is the specification of the desired behavior of the Deployment.\n*/\nclass V1DeploymentSpec {\n static getAttributeTypeMap() {\n return V1DeploymentSpec.attributeTypeMap;\n }\n}\nV1DeploymentSpec.discriminator = undefined;\nV1DeploymentSpec.attributeTypeMap = [\n {\n \"name\": \"minReadySeconds\",\n \"baseName\": \"minReadySeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"paused\",\n \"baseName\": \"paused\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"progressDeadlineSeconds\",\n \"baseName\": \"progressDeadlineSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"revisionHistoryLimit\",\n \"baseName\": \"revisionHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"strategy\",\n \"baseName\": \"strategy\",\n \"type\": \"V1DeploymentStrategy\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n }\n];\nexports.V1DeploymentSpec = V1DeploymentSpec;\n/**\n* DeploymentStatus is the most recently observed status of the Deployment.\n*/\nclass V1DeploymentStatus {\n static getAttributeTypeMap() {\n return V1DeploymentStatus.attributeTypeMap;\n }\n}\nV1DeploymentStatus.discriminator = undefined;\nV1DeploymentStatus.attributeTypeMap = [\n {\n \"name\": \"availableReplicas\",\n \"baseName\": \"availableReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"collisionCount\",\n \"baseName\": \"collisionCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readyReplicas\",\n \"baseName\": \"readyReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"unavailableReplicas\",\n \"baseName\": \"unavailableReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"updatedReplicas\",\n \"baseName\": \"updatedReplicas\",\n \"type\": \"number\"\n }\n];\nexports.V1DeploymentStatus = V1DeploymentStatus;\n/**\n* DeploymentStrategy describes how to replace existing pods with new ones.\n*/\nclass V1DeploymentStrategy {\n static getAttributeTypeMap() {\n return V1DeploymentStrategy.attributeTypeMap;\n }\n}\nV1DeploymentStrategy.discriminator = undefined;\nV1DeploymentStrategy.attributeTypeMap = [\n {\n \"name\": \"rollingUpdate\",\n \"baseName\": \"rollingUpdate\",\n \"type\": \"V1RollingUpdateDeployment\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1DeploymentStrategy = V1DeploymentStrategy;\n/**\n* Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.\n*/\nclass V1DownwardAPIProjection {\n static getAttributeTypeMap() {\n return V1DownwardAPIProjection.attributeTypeMap;\n }\n}\nV1DownwardAPIProjection.discriminator = undefined;\nV1DownwardAPIProjection.attributeTypeMap = [\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n }\n];\nexports.V1DownwardAPIProjection = V1DownwardAPIProjection;\n/**\n* DownwardAPIVolumeFile represents information to create the file containing the pod field\n*/\nclass V1DownwardAPIVolumeFile {\n static getAttributeTypeMap() {\n return V1DownwardAPIVolumeFile.attributeTypeMap;\n }\n}\nV1DownwardAPIVolumeFile.discriminator = undefined;\nV1DownwardAPIVolumeFile.attributeTypeMap = [\n {\n \"name\": \"fieldRef\",\n \"baseName\": \"fieldRef\",\n \"type\": \"V1ObjectFieldSelector\"\n },\n {\n \"name\": \"mode\",\n \"baseName\": \"mode\",\n \"type\": \"number\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"resourceFieldRef\",\n \"baseName\": \"resourceFieldRef\",\n \"type\": \"V1ResourceFieldSelector\"\n }\n];\nexports.V1DownwardAPIVolumeFile = V1DownwardAPIVolumeFile;\n/**\n* DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.\n*/\nclass V1DownwardAPIVolumeSource {\n static getAttributeTypeMap() {\n return V1DownwardAPIVolumeSource.attributeTypeMap;\n }\n}\nV1DownwardAPIVolumeSource.discriminator = undefined;\nV1DownwardAPIVolumeSource.attributeTypeMap = [\n {\n \"name\": \"defaultMode\",\n \"baseName\": \"defaultMode\",\n \"type\": \"number\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n }\n];\nexports.V1DownwardAPIVolumeSource = V1DownwardAPIVolumeSource;\n/**\n* Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.\n*/\nclass V1EmptyDirVolumeSource {\n static getAttributeTypeMap() {\n return V1EmptyDirVolumeSource.attributeTypeMap;\n }\n}\nV1EmptyDirVolumeSource.discriminator = undefined;\nV1EmptyDirVolumeSource.attributeTypeMap = [\n {\n \"name\": \"medium\",\n \"baseName\": \"medium\",\n \"type\": \"string\"\n },\n {\n \"name\": \"sizeLimit\",\n \"baseName\": \"sizeLimit\",\n \"type\": \"string\"\n }\n];\nexports.V1EmptyDirVolumeSource = V1EmptyDirVolumeSource;\n/**\n* EndpointAddress is a tuple that describes single IP address.\n*/\nclass V1EndpointAddress {\n static getAttributeTypeMap() {\n return V1EndpointAddress.attributeTypeMap;\n }\n}\nV1EndpointAddress.discriminator = undefined;\nV1EndpointAddress.attributeTypeMap = [\n {\n \"name\": \"hostname\",\n \"baseName\": \"hostname\",\n \"type\": \"string\"\n },\n {\n \"name\": \"ip\",\n \"baseName\": \"ip\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nodeName\",\n \"baseName\": \"nodeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"targetRef\",\n \"baseName\": \"targetRef\",\n \"type\": \"V1ObjectReference\"\n }\n];\nexports.V1EndpointAddress = V1EndpointAddress;\n/**\n* EndpointPort is a tuple that describes a single port.\n*/\nclass V1EndpointPort {\n static getAttributeTypeMap() {\n return V1EndpointPort.attributeTypeMap;\n }\n}\nV1EndpointPort.discriminator = undefined;\nV1EndpointPort.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"port\",\n \"baseName\": \"port\",\n \"type\": \"number\"\n },\n {\n \"name\": \"protocol\",\n \"baseName\": \"protocol\",\n \"type\": \"string\"\n }\n];\nexports.V1EndpointPort = V1EndpointPort;\n/**\n* EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given: { Addresses: [{\\\"ip\\\": \\\"10.10.1.1\\\"}, {\\\"ip\\\": \\\"10.10.2.2\\\"}], Ports: [{\\\"name\\\": \\\"a\\\", \\\"port\\\": 8675}, {\\\"name\\\": \\\"b\\\", \\\"port\\\": 309}] } The resulting set of endpoints can be viewed as: a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], b: [ 10.10.1.1:309, 10.10.2.2:309 ]\n*/\nclass V1EndpointSubset {\n static getAttributeTypeMap() {\n return V1EndpointSubset.attributeTypeMap;\n }\n}\nV1EndpointSubset.discriminator = undefined;\nV1EndpointSubset.attributeTypeMap = [\n {\n \"name\": \"addresses\",\n \"baseName\": \"addresses\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"notReadyAddresses\",\n \"baseName\": \"notReadyAddresses\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"ports\",\n \"baseName\": \"ports\",\n \"type\": \"Array\"\n }\n];\nexports.V1EndpointSubset = V1EndpointSubset;\n/**\n* Endpoints is a collection of endpoints that implement the actual service. Example: Name: \\\"mysvc\\\", Subsets: [ { Addresses: [{\\\"ip\\\": \\\"10.10.1.1\\\"}, {\\\"ip\\\": \\\"10.10.2.2\\\"}], Ports: [{\\\"name\\\": \\\"a\\\", \\\"port\\\": 8675}, {\\\"name\\\": \\\"b\\\", \\\"port\\\": 309}] }, { Addresses: [{\\\"ip\\\": \\\"10.10.3.3\\\"}], Ports: [{\\\"name\\\": \\\"a\\\", \\\"port\\\": 93}, {\\\"name\\\": \\\"b\\\", \\\"port\\\": 76}] }, ]\n*/\nclass V1Endpoints {\n static getAttributeTypeMap() {\n return V1Endpoints.attributeTypeMap;\n }\n}\nV1Endpoints.discriminator = undefined;\nV1Endpoints.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"subsets\",\n \"baseName\": \"subsets\",\n \"type\": \"Array\"\n }\n];\nexports.V1Endpoints = V1Endpoints;\n/**\n* EndpointsList is a list of endpoints.\n*/\nclass V1EndpointsList {\n static getAttributeTypeMap() {\n return V1EndpointsList.attributeTypeMap;\n }\n}\nV1EndpointsList.discriminator = undefined;\nV1EndpointsList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1EndpointsList = V1EndpointsList;\n/**\n* EnvFromSource represents the source of a set of ConfigMaps\n*/\nclass V1EnvFromSource {\n static getAttributeTypeMap() {\n return V1EnvFromSource.attributeTypeMap;\n }\n}\nV1EnvFromSource.discriminator = undefined;\nV1EnvFromSource.attributeTypeMap = [\n {\n \"name\": \"configMapRef\",\n \"baseName\": \"configMapRef\",\n \"type\": \"V1ConfigMapEnvSource\"\n },\n {\n \"name\": \"prefix\",\n \"baseName\": \"prefix\",\n \"type\": \"string\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1SecretEnvSource\"\n }\n];\nexports.V1EnvFromSource = V1EnvFromSource;\n/**\n* EnvVar represents an environment variable present in a Container.\n*/\nclass V1EnvVar {\n static getAttributeTypeMap() {\n return V1EnvVar.attributeTypeMap;\n }\n}\nV1EnvVar.discriminator = undefined;\nV1EnvVar.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"string\"\n },\n {\n \"name\": \"valueFrom\",\n \"baseName\": \"valueFrom\",\n \"type\": \"V1EnvVarSource\"\n }\n];\nexports.V1EnvVar = V1EnvVar;\n/**\n* EnvVarSource represents a source for the value of an EnvVar.\n*/\nclass V1EnvVarSource {\n static getAttributeTypeMap() {\n return V1EnvVarSource.attributeTypeMap;\n }\n}\nV1EnvVarSource.discriminator = undefined;\nV1EnvVarSource.attributeTypeMap = [\n {\n \"name\": \"configMapKeyRef\",\n \"baseName\": \"configMapKeyRef\",\n \"type\": \"V1ConfigMapKeySelector\"\n },\n {\n \"name\": \"fieldRef\",\n \"baseName\": \"fieldRef\",\n \"type\": \"V1ObjectFieldSelector\"\n },\n {\n \"name\": \"resourceFieldRef\",\n \"baseName\": \"resourceFieldRef\",\n \"type\": \"V1ResourceFieldSelector\"\n },\n {\n \"name\": \"secretKeyRef\",\n \"baseName\": \"secretKeyRef\",\n \"type\": \"V1SecretKeySelector\"\n }\n];\nexports.V1EnvVarSource = V1EnvVarSource;\n/**\n* Event is a report of an event somewhere in the cluster.\n*/\nclass V1Event {\n static getAttributeTypeMap() {\n return V1Event.attributeTypeMap;\n }\n}\nV1Event.discriminator = undefined;\nV1Event.attributeTypeMap = [\n {\n \"name\": \"action\",\n \"baseName\": \"action\",\n \"type\": \"string\"\n },\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"count\",\n \"baseName\": \"count\",\n \"type\": \"number\"\n },\n {\n \"name\": \"eventTime\",\n \"baseName\": \"eventTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"firstTimestamp\",\n \"baseName\": \"firstTimestamp\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"involvedObject\",\n \"baseName\": \"involvedObject\",\n \"type\": \"V1ObjectReference\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"lastTimestamp\",\n \"baseName\": \"lastTimestamp\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"related\",\n \"baseName\": \"related\",\n \"type\": \"V1ObjectReference\"\n },\n {\n \"name\": \"reportingComponent\",\n \"baseName\": \"reportingComponent\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reportingInstance\",\n \"baseName\": \"reportingInstance\",\n \"type\": \"string\"\n },\n {\n \"name\": \"series\",\n \"baseName\": \"series\",\n \"type\": \"V1EventSeries\"\n },\n {\n \"name\": \"source\",\n \"baseName\": \"source\",\n \"type\": \"V1EventSource\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1Event = V1Event;\n/**\n* EventList is a list of events.\n*/\nclass V1EventList {\n static getAttributeTypeMap() {\n return V1EventList.attributeTypeMap;\n }\n}\nV1EventList.discriminator = undefined;\nV1EventList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1EventList = V1EventList;\n/**\n* EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.\n*/\nclass V1EventSeries {\n static getAttributeTypeMap() {\n return V1EventSeries.attributeTypeMap;\n }\n}\nV1EventSeries.discriminator = undefined;\nV1EventSeries.attributeTypeMap = [\n {\n \"name\": \"count\",\n \"baseName\": \"count\",\n \"type\": \"number\"\n },\n {\n \"name\": \"lastObservedTime\",\n \"baseName\": \"lastObservedTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"state\",\n \"baseName\": \"state\",\n \"type\": \"string\"\n }\n];\nexports.V1EventSeries = V1EventSeries;\n/**\n* EventSource contains information for an event.\n*/\nclass V1EventSource {\n static getAttributeTypeMap() {\n return V1EventSource.attributeTypeMap;\n }\n}\nV1EventSource.discriminator = undefined;\nV1EventSource.attributeTypeMap = [\n {\n \"name\": \"component\",\n \"baseName\": \"component\",\n \"type\": \"string\"\n },\n {\n \"name\": \"host\",\n \"baseName\": \"host\",\n \"type\": \"string\"\n }\n];\nexports.V1EventSource = V1EventSource;\n/**\n* ExecAction describes a \\\"run in container\\\" action.\n*/\nclass V1ExecAction {\n static getAttributeTypeMap() {\n return V1ExecAction.attributeTypeMap;\n }\n}\nV1ExecAction.discriminator = undefined;\nV1ExecAction.attributeTypeMap = [\n {\n \"name\": \"command\",\n \"baseName\": \"command\",\n \"type\": \"Array\"\n }\n];\nexports.V1ExecAction = V1ExecAction;\n/**\n* Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.\n*/\nclass V1FCVolumeSource {\n static getAttributeTypeMap() {\n return V1FCVolumeSource.attributeTypeMap;\n }\n}\nV1FCVolumeSource.discriminator = undefined;\nV1FCVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"lun\",\n \"baseName\": \"lun\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"targetWWNs\",\n \"baseName\": \"targetWWNs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"wwids\",\n \"baseName\": \"wwids\",\n \"type\": \"Array\"\n }\n];\nexports.V1FCVolumeSource = V1FCVolumeSource;\n/**\n* FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.\n*/\nclass V1FlexPersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1FlexPersistentVolumeSource.attributeTypeMap;\n }\n}\nV1FlexPersistentVolumeSource.discriminator = undefined;\nV1FlexPersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"driver\",\n \"baseName\": \"driver\",\n \"type\": \"string\"\n },\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"options\",\n \"baseName\": \"options\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1SecretReference\"\n }\n];\nexports.V1FlexPersistentVolumeSource = V1FlexPersistentVolumeSource;\n/**\n* FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.\n*/\nclass V1FlexVolumeSource {\n static getAttributeTypeMap() {\n return V1FlexVolumeSource.attributeTypeMap;\n }\n}\nV1FlexVolumeSource.discriminator = undefined;\nV1FlexVolumeSource.attributeTypeMap = [\n {\n \"name\": \"driver\",\n \"baseName\": \"driver\",\n \"type\": \"string\"\n },\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"options\",\n \"baseName\": \"options\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1LocalObjectReference\"\n }\n];\nexports.V1FlexVolumeSource = V1FlexVolumeSource;\n/**\n* Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.\n*/\nclass V1FlockerVolumeSource {\n static getAttributeTypeMap() {\n return V1FlockerVolumeSource.attributeTypeMap;\n }\n}\nV1FlockerVolumeSource.discriminator = undefined;\nV1FlockerVolumeSource.attributeTypeMap = [\n {\n \"name\": \"datasetName\",\n \"baseName\": \"datasetName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"datasetUUID\",\n \"baseName\": \"datasetUUID\",\n \"type\": \"string\"\n }\n];\nexports.V1FlockerVolumeSource = V1FlockerVolumeSource;\n/**\n* Represents a Persistent Disk resource in Google Compute Engine. A GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.\n*/\nclass V1GCEPersistentDiskVolumeSource {\n static getAttributeTypeMap() {\n return V1GCEPersistentDiskVolumeSource.attributeTypeMap;\n }\n}\nV1GCEPersistentDiskVolumeSource.discriminator = undefined;\nV1GCEPersistentDiskVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"partition\",\n \"baseName\": \"partition\",\n \"type\": \"number\"\n },\n {\n \"name\": \"pdName\",\n \"baseName\": \"pdName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n }\n];\nexports.V1GCEPersistentDiskVolumeSource = V1GCEPersistentDiskVolumeSource;\n/**\n* Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.\n*/\nclass V1GitRepoVolumeSource {\n static getAttributeTypeMap() {\n return V1GitRepoVolumeSource.attributeTypeMap;\n }\n}\nV1GitRepoVolumeSource.discriminator = undefined;\nV1GitRepoVolumeSource.attributeTypeMap = [\n {\n \"name\": \"directory\",\n \"baseName\": \"directory\",\n \"type\": \"string\"\n },\n {\n \"name\": \"repository\",\n \"baseName\": \"repository\",\n \"type\": \"string\"\n },\n {\n \"name\": \"revision\",\n \"baseName\": \"revision\",\n \"type\": \"string\"\n }\n];\nexports.V1GitRepoVolumeSource = V1GitRepoVolumeSource;\n/**\n* Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.\n*/\nclass V1GlusterfsPersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1GlusterfsPersistentVolumeSource.attributeTypeMap;\n }\n}\nV1GlusterfsPersistentVolumeSource.discriminator = undefined;\nV1GlusterfsPersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"endpoints\",\n \"baseName\": \"endpoints\",\n \"type\": \"string\"\n },\n {\n \"name\": \"endpointsNamespace\",\n \"baseName\": \"endpointsNamespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n }\n];\nexports.V1GlusterfsPersistentVolumeSource = V1GlusterfsPersistentVolumeSource;\n/**\n* Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.\n*/\nclass V1GlusterfsVolumeSource {\n static getAttributeTypeMap() {\n return V1GlusterfsVolumeSource.attributeTypeMap;\n }\n}\nV1GlusterfsVolumeSource.discriminator = undefined;\nV1GlusterfsVolumeSource.attributeTypeMap = [\n {\n \"name\": \"endpoints\",\n \"baseName\": \"endpoints\",\n \"type\": \"string\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n }\n];\nexports.V1GlusterfsVolumeSource = V1GlusterfsVolumeSource;\n/**\n* GroupVersion contains the \\\"group/version\\\" and \\\"version\\\" string of a version. It is made a struct to keep extensibility.\n*/\nclass V1GroupVersionForDiscovery {\n static getAttributeTypeMap() {\n return V1GroupVersionForDiscovery.attributeTypeMap;\n }\n}\nV1GroupVersionForDiscovery.discriminator = undefined;\nV1GroupVersionForDiscovery.attributeTypeMap = [\n {\n \"name\": \"groupVersion\",\n \"baseName\": \"groupVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"version\",\n \"baseName\": \"version\",\n \"type\": \"string\"\n }\n];\nexports.V1GroupVersionForDiscovery = V1GroupVersionForDiscovery;\n/**\n* HTTPGetAction describes an action based on HTTP Get requests.\n*/\nclass V1HTTPGetAction {\n static getAttributeTypeMap() {\n return V1HTTPGetAction.attributeTypeMap;\n }\n}\nV1HTTPGetAction.discriminator = undefined;\nV1HTTPGetAction.attributeTypeMap = [\n {\n \"name\": \"host\",\n \"baseName\": \"host\",\n \"type\": \"string\"\n },\n {\n \"name\": \"httpHeaders\",\n \"baseName\": \"httpHeaders\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"port\",\n \"baseName\": \"port\",\n \"type\": \"any\"\n },\n {\n \"name\": \"scheme\",\n \"baseName\": \"scheme\",\n \"type\": \"string\"\n }\n];\nexports.V1HTTPGetAction = V1HTTPGetAction;\n/**\n* HTTPHeader describes a custom header to be used in HTTP probes\n*/\nclass V1HTTPHeader {\n static getAttributeTypeMap() {\n return V1HTTPHeader.attributeTypeMap;\n }\n}\nV1HTTPHeader.discriminator = undefined;\nV1HTTPHeader.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"string\"\n }\n];\nexports.V1HTTPHeader = V1HTTPHeader;\n/**\n* Handler defines a specific action that should be taken\n*/\nclass V1Handler {\n static getAttributeTypeMap() {\n return V1Handler.attributeTypeMap;\n }\n}\nV1Handler.discriminator = undefined;\nV1Handler.attributeTypeMap = [\n {\n \"name\": \"exec\",\n \"baseName\": \"exec\",\n \"type\": \"V1ExecAction\"\n },\n {\n \"name\": \"httpGet\",\n \"baseName\": \"httpGet\",\n \"type\": \"V1HTTPGetAction\"\n },\n {\n \"name\": \"tcpSocket\",\n \"baseName\": \"tcpSocket\",\n \"type\": \"V1TCPSocketAction\"\n }\n];\nexports.V1Handler = V1Handler;\n/**\n* configuration of a horizontal pod autoscaler.\n*/\nclass V1HorizontalPodAutoscaler {\n static getAttributeTypeMap() {\n return V1HorizontalPodAutoscaler.attributeTypeMap;\n }\n}\nV1HorizontalPodAutoscaler.discriminator = undefined;\nV1HorizontalPodAutoscaler.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1HorizontalPodAutoscalerSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1HorizontalPodAutoscalerStatus\"\n }\n];\nexports.V1HorizontalPodAutoscaler = V1HorizontalPodAutoscaler;\n/**\n* list of horizontal pod autoscaler objects.\n*/\nclass V1HorizontalPodAutoscalerList {\n static getAttributeTypeMap() {\n return V1HorizontalPodAutoscalerList.attributeTypeMap;\n }\n}\nV1HorizontalPodAutoscalerList.discriminator = undefined;\nV1HorizontalPodAutoscalerList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1HorizontalPodAutoscalerList = V1HorizontalPodAutoscalerList;\n/**\n* specification of a horizontal pod autoscaler.\n*/\nclass V1HorizontalPodAutoscalerSpec {\n static getAttributeTypeMap() {\n return V1HorizontalPodAutoscalerSpec.attributeTypeMap;\n }\n}\nV1HorizontalPodAutoscalerSpec.discriminator = undefined;\nV1HorizontalPodAutoscalerSpec.attributeTypeMap = [\n {\n \"name\": \"maxReplicas\",\n \"baseName\": \"maxReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"minReplicas\",\n \"baseName\": \"minReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"scaleTargetRef\",\n \"baseName\": \"scaleTargetRef\",\n \"type\": \"V1CrossVersionObjectReference\"\n },\n {\n \"name\": \"targetCPUUtilizationPercentage\",\n \"baseName\": \"targetCPUUtilizationPercentage\",\n \"type\": \"number\"\n }\n];\nexports.V1HorizontalPodAutoscalerSpec = V1HorizontalPodAutoscalerSpec;\n/**\n* current status of a horizontal pod autoscaler\n*/\nclass V1HorizontalPodAutoscalerStatus {\n static getAttributeTypeMap() {\n return V1HorizontalPodAutoscalerStatus.attributeTypeMap;\n }\n}\nV1HorizontalPodAutoscalerStatus.discriminator = undefined;\nV1HorizontalPodAutoscalerStatus.attributeTypeMap = [\n {\n \"name\": \"currentCPUUtilizationPercentage\",\n \"baseName\": \"currentCPUUtilizationPercentage\",\n \"type\": \"number\"\n },\n {\n \"name\": \"currentReplicas\",\n \"baseName\": \"currentReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"desiredReplicas\",\n \"baseName\": \"desiredReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"lastScaleTime\",\n \"baseName\": \"lastScaleTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n }\n];\nexports.V1HorizontalPodAutoscalerStatus = V1HorizontalPodAutoscalerStatus;\n/**\n* HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.\n*/\nclass V1HostAlias {\n static getAttributeTypeMap() {\n return V1HostAlias.attributeTypeMap;\n }\n}\nV1HostAlias.discriminator = undefined;\nV1HostAlias.attributeTypeMap = [\n {\n \"name\": \"hostnames\",\n \"baseName\": \"hostnames\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"ip\",\n \"baseName\": \"ip\",\n \"type\": \"string\"\n }\n];\nexports.V1HostAlias = V1HostAlias;\n/**\n* Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.\n*/\nclass V1HostPathVolumeSource {\n static getAttributeTypeMap() {\n return V1HostPathVolumeSource.attributeTypeMap;\n }\n}\nV1HostPathVolumeSource.discriminator = undefined;\nV1HostPathVolumeSource.attributeTypeMap = [\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1HostPathVolumeSource = V1HostPathVolumeSource;\n/**\n* IPBlock describes a particular CIDR (Ex. \\\"192.168.1.1/24\\\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.\n*/\nclass V1IPBlock {\n static getAttributeTypeMap() {\n return V1IPBlock.attributeTypeMap;\n }\n}\nV1IPBlock.discriminator = undefined;\nV1IPBlock.attributeTypeMap = [\n {\n \"name\": \"cidr\",\n \"baseName\": \"cidr\",\n \"type\": \"string\"\n },\n {\n \"name\": \"except\",\n \"baseName\": \"except\",\n \"type\": \"Array\"\n }\n];\nexports.V1IPBlock = V1IPBlock;\n/**\n* ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.\n*/\nclass V1ISCSIPersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1ISCSIPersistentVolumeSource.attributeTypeMap;\n }\n}\nV1ISCSIPersistentVolumeSource.discriminator = undefined;\nV1ISCSIPersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"chapAuthDiscovery\",\n \"baseName\": \"chapAuthDiscovery\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"chapAuthSession\",\n \"baseName\": \"chapAuthSession\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"initiatorName\",\n \"baseName\": \"initiatorName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"iqn\",\n \"baseName\": \"iqn\",\n \"type\": \"string\"\n },\n {\n \"name\": \"iscsiInterface\",\n \"baseName\": \"iscsiInterface\",\n \"type\": \"string\"\n },\n {\n \"name\": \"lun\",\n \"baseName\": \"lun\",\n \"type\": \"number\"\n },\n {\n \"name\": \"portals\",\n \"baseName\": \"portals\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1SecretReference\"\n },\n {\n \"name\": \"targetPortal\",\n \"baseName\": \"targetPortal\",\n \"type\": \"string\"\n }\n];\nexports.V1ISCSIPersistentVolumeSource = V1ISCSIPersistentVolumeSource;\n/**\n* Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.\n*/\nclass V1ISCSIVolumeSource {\n static getAttributeTypeMap() {\n return V1ISCSIVolumeSource.attributeTypeMap;\n }\n}\nV1ISCSIVolumeSource.discriminator = undefined;\nV1ISCSIVolumeSource.attributeTypeMap = [\n {\n \"name\": \"chapAuthDiscovery\",\n \"baseName\": \"chapAuthDiscovery\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"chapAuthSession\",\n \"baseName\": \"chapAuthSession\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"initiatorName\",\n \"baseName\": \"initiatorName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"iqn\",\n \"baseName\": \"iqn\",\n \"type\": \"string\"\n },\n {\n \"name\": \"iscsiInterface\",\n \"baseName\": \"iscsiInterface\",\n \"type\": \"string\"\n },\n {\n \"name\": \"lun\",\n \"baseName\": \"lun\",\n \"type\": \"number\"\n },\n {\n \"name\": \"portals\",\n \"baseName\": \"portals\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1LocalObjectReference\"\n },\n {\n \"name\": \"targetPortal\",\n \"baseName\": \"targetPortal\",\n \"type\": \"string\"\n }\n];\nexports.V1ISCSIVolumeSource = V1ISCSIVolumeSource;\n/**\n* Initializer is information about an initializer that has not yet completed.\n*/\nclass V1Initializer {\n static getAttributeTypeMap() {\n return V1Initializer.attributeTypeMap;\n }\n}\nV1Initializer.discriminator = undefined;\nV1Initializer.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\nexports.V1Initializer = V1Initializer;\n/**\n* Initializers tracks the progress of initialization.\n*/\nclass V1Initializers {\n static getAttributeTypeMap() {\n return V1Initializers.attributeTypeMap;\n }\n}\nV1Initializers.discriminator = undefined;\nV1Initializers.attributeTypeMap = [\n {\n \"name\": \"pending\",\n \"baseName\": \"pending\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"result\",\n \"baseName\": \"result\",\n \"type\": \"V1Status\"\n }\n];\nexports.V1Initializers = V1Initializers;\n/**\n* Job represents the configuration of a single job.\n*/\nclass V1Job {\n static getAttributeTypeMap() {\n return V1Job.attributeTypeMap;\n }\n}\nV1Job.discriminator = undefined;\nV1Job.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1JobSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1JobStatus\"\n }\n];\nexports.V1Job = V1Job;\n/**\n* JobCondition describes current state of a job.\n*/\nclass V1JobCondition {\n static getAttributeTypeMap() {\n return V1JobCondition.attributeTypeMap;\n }\n}\nV1JobCondition.discriminator = undefined;\nV1JobCondition.attributeTypeMap = [\n {\n \"name\": \"lastProbeTime\",\n \"baseName\": \"lastProbeTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1JobCondition = V1JobCondition;\n/**\n* JobList is a collection of jobs.\n*/\nclass V1JobList {\n static getAttributeTypeMap() {\n return V1JobList.attributeTypeMap;\n }\n}\nV1JobList.discriminator = undefined;\nV1JobList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1JobList = V1JobList;\n/**\n* JobSpec describes how the job execution will look like.\n*/\nclass V1JobSpec {\n static getAttributeTypeMap() {\n return V1JobSpec.attributeTypeMap;\n }\n}\nV1JobSpec.discriminator = undefined;\nV1JobSpec.attributeTypeMap = [\n {\n \"name\": \"activeDeadlineSeconds\",\n \"baseName\": \"activeDeadlineSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"backoffLimit\",\n \"baseName\": \"backoffLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"completions\",\n \"baseName\": \"completions\",\n \"type\": \"number\"\n },\n {\n \"name\": \"manualSelector\",\n \"baseName\": \"manualSelector\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"parallelism\",\n \"baseName\": \"parallelism\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n },\n {\n \"name\": \"ttlSecondsAfterFinished\",\n \"baseName\": \"ttlSecondsAfterFinished\",\n \"type\": \"number\"\n }\n];\nexports.V1JobSpec = V1JobSpec;\n/**\n* JobStatus represents the current state of a Job.\n*/\nclass V1JobStatus {\n static getAttributeTypeMap() {\n return V1JobStatus.attributeTypeMap;\n }\n}\nV1JobStatus.discriminator = undefined;\nV1JobStatus.attributeTypeMap = [\n {\n \"name\": \"active\",\n \"baseName\": \"active\",\n \"type\": \"number\"\n },\n {\n \"name\": \"completionTime\",\n \"baseName\": \"completionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"failed\",\n \"baseName\": \"failed\",\n \"type\": \"number\"\n },\n {\n \"name\": \"startTime\",\n \"baseName\": \"startTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"succeeded\",\n \"baseName\": \"succeeded\",\n \"type\": \"number\"\n }\n];\nexports.V1JobStatus = V1JobStatus;\n/**\n* Maps a string key to a path within a volume.\n*/\nclass V1KeyToPath {\n static getAttributeTypeMap() {\n return V1KeyToPath.attributeTypeMap;\n }\n}\nV1KeyToPath.discriminator = undefined;\nV1KeyToPath.attributeTypeMap = [\n {\n \"name\": \"key\",\n \"baseName\": \"key\",\n \"type\": \"string\"\n },\n {\n \"name\": \"mode\",\n \"baseName\": \"mode\",\n \"type\": \"number\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n }\n];\nexports.V1KeyToPath = V1KeyToPath;\n/**\n* A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.\n*/\nclass V1LabelSelector {\n static getAttributeTypeMap() {\n return V1LabelSelector.attributeTypeMap;\n }\n}\nV1LabelSelector.discriminator = undefined;\nV1LabelSelector.attributeTypeMap = [\n {\n \"name\": \"matchExpressions\",\n \"baseName\": \"matchExpressions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"matchLabels\",\n \"baseName\": \"matchLabels\",\n \"type\": \"{ [key: string]: string; }\"\n }\n];\nexports.V1LabelSelector = V1LabelSelector;\n/**\n* A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.\n*/\nclass V1LabelSelectorRequirement {\n static getAttributeTypeMap() {\n return V1LabelSelectorRequirement.attributeTypeMap;\n }\n}\nV1LabelSelectorRequirement.discriminator = undefined;\nV1LabelSelectorRequirement.attributeTypeMap = [\n {\n \"name\": \"key\",\n \"baseName\": \"key\",\n \"type\": \"string\"\n },\n {\n \"name\": \"operator\",\n \"baseName\": \"operator\",\n \"type\": \"string\"\n },\n {\n \"name\": \"values\",\n \"baseName\": \"values\",\n \"type\": \"Array\"\n }\n];\nexports.V1LabelSelectorRequirement = V1LabelSelectorRequirement;\n/**\n* Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.\n*/\nclass V1Lifecycle {\n static getAttributeTypeMap() {\n return V1Lifecycle.attributeTypeMap;\n }\n}\nV1Lifecycle.discriminator = undefined;\nV1Lifecycle.attributeTypeMap = [\n {\n \"name\": \"postStart\",\n \"baseName\": \"postStart\",\n \"type\": \"V1Handler\"\n },\n {\n \"name\": \"preStop\",\n \"baseName\": \"preStop\",\n \"type\": \"V1Handler\"\n }\n];\nexports.V1Lifecycle = V1Lifecycle;\n/**\n* LimitRange sets resource usage limits for each kind of resource in a Namespace.\n*/\nclass V1LimitRange {\n static getAttributeTypeMap() {\n return V1LimitRange.attributeTypeMap;\n }\n}\nV1LimitRange.discriminator = undefined;\nV1LimitRange.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1LimitRangeSpec\"\n }\n];\nexports.V1LimitRange = V1LimitRange;\n/**\n* LimitRangeItem defines a min/max usage limit for any resource that matches on kind.\n*/\nclass V1LimitRangeItem {\n static getAttributeTypeMap() {\n return V1LimitRangeItem.attributeTypeMap;\n }\n}\nV1LimitRangeItem.discriminator = undefined;\nV1LimitRangeItem.attributeTypeMap = [\n {\n \"name\": \"_default\",\n \"baseName\": \"default\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"defaultRequest\",\n \"baseName\": \"defaultRequest\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"max\",\n \"baseName\": \"max\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"maxLimitRequestRatio\",\n \"baseName\": \"maxLimitRequestRatio\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"min\",\n \"baseName\": \"min\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1LimitRangeItem = V1LimitRangeItem;\n/**\n* LimitRangeList is a list of LimitRange items.\n*/\nclass V1LimitRangeList {\n static getAttributeTypeMap() {\n return V1LimitRangeList.attributeTypeMap;\n }\n}\nV1LimitRangeList.discriminator = undefined;\nV1LimitRangeList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1LimitRangeList = V1LimitRangeList;\n/**\n* LimitRangeSpec defines a min/max usage limit for resources that match on kind.\n*/\nclass V1LimitRangeSpec {\n static getAttributeTypeMap() {\n return V1LimitRangeSpec.attributeTypeMap;\n }\n}\nV1LimitRangeSpec.discriminator = undefined;\nV1LimitRangeSpec.attributeTypeMap = [\n {\n \"name\": \"limits\",\n \"baseName\": \"limits\",\n \"type\": \"Array\"\n }\n];\nexports.V1LimitRangeSpec = V1LimitRangeSpec;\n/**\n* ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.\n*/\nclass V1ListMeta {\n static getAttributeTypeMap() {\n return V1ListMeta.attributeTypeMap;\n }\n}\nV1ListMeta.discriminator = undefined;\nV1ListMeta.attributeTypeMap = [\n {\n \"name\": \"_continue\",\n \"baseName\": \"continue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"resourceVersion\",\n \"baseName\": \"resourceVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"selfLink\",\n \"baseName\": \"selfLink\",\n \"type\": \"string\"\n }\n];\nexports.V1ListMeta = V1ListMeta;\n/**\n* LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.\n*/\nclass V1LoadBalancerIngress {\n static getAttributeTypeMap() {\n return V1LoadBalancerIngress.attributeTypeMap;\n }\n}\nV1LoadBalancerIngress.discriminator = undefined;\nV1LoadBalancerIngress.attributeTypeMap = [\n {\n \"name\": \"hostname\",\n \"baseName\": \"hostname\",\n \"type\": \"string\"\n },\n {\n \"name\": \"ip\",\n \"baseName\": \"ip\",\n \"type\": \"string\"\n }\n];\nexports.V1LoadBalancerIngress = V1LoadBalancerIngress;\n/**\n* LoadBalancerStatus represents the status of a load-balancer.\n*/\nclass V1LoadBalancerStatus {\n static getAttributeTypeMap() {\n return V1LoadBalancerStatus.attributeTypeMap;\n }\n}\nV1LoadBalancerStatus.discriminator = undefined;\nV1LoadBalancerStatus.attributeTypeMap = [\n {\n \"name\": \"ingress\",\n \"baseName\": \"ingress\",\n \"type\": \"Array\"\n }\n];\nexports.V1LoadBalancerStatus = V1LoadBalancerStatus;\n/**\n* LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.\n*/\nclass V1LocalObjectReference {\n static getAttributeTypeMap() {\n return V1LocalObjectReference.attributeTypeMap;\n }\n}\nV1LocalObjectReference.discriminator = undefined;\nV1LocalObjectReference.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\nexports.V1LocalObjectReference = V1LocalObjectReference;\n/**\n* LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.\n*/\nclass V1LocalSubjectAccessReview {\n static getAttributeTypeMap() {\n return V1LocalSubjectAccessReview.attributeTypeMap;\n }\n}\nV1LocalSubjectAccessReview.discriminator = undefined;\nV1LocalSubjectAccessReview.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1SubjectAccessReviewSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1SubjectAccessReviewStatus\"\n }\n];\nexports.V1LocalSubjectAccessReview = V1LocalSubjectAccessReview;\n/**\n* Local represents directly-attached storage with node affinity (Beta feature)\n*/\nclass V1LocalVolumeSource {\n static getAttributeTypeMap() {\n return V1LocalVolumeSource.attributeTypeMap;\n }\n}\nV1LocalVolumeSource.discriminator = undefined;\nV1LocalVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n }\n];\nexports.V1LocalVolumeSource = V1LocalVolumeSource;\n/**\n* Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.\n*/\nclass V1NFSVolumeSource {\n static getAttributeTypeMap() {\n return V1NFSVolumeSource.attributeTypeMap;\n }\n}\nV1NFSVolumeSource.discriminator = undefined;\nV1NFSVolumeSource.attributeTypeMap = [\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"server\",\n \"baseName\": \"server\",\n \"type\": \"string\"\n }\n];\nexports.V1NFSVolumeSource = V1NFSVolumeSource;\n/**\n* Namespace provides a scope for Names. Use of multiple namespaces is optional.\n*/\nclass V1Namespace {\n static getAttributeTypeMap() {\n return V1Namespace.attributeTypeMap;\n }\n}\nV1Namespace.discriminator = undefined;\nV1Namespace.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1NamespaceSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1NamespaceStatus\"\n }\n];\nexports.V1Namespace = V1Namespace;\n/**\n* NamespaceList is a list of Namespaces.\n*/\nclass V1NamespaceList {\n static getAttributeTypeMap() {\n return V1NamespaceList.attributeTypeMap;\n }\n}\nV1NamespaceList.discriminator = undefined;\nV1NamespaceList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1NamespaceList = V1NamespaceList;\n/**\n* NamespaceSpec describes the attributes on a Namespace.\n*/\nclass V1NamespaceSpec {\n static getAttributeTypeMap() {\n return V1NamespaceSpec.attributeTypeMap;\n }\n}\nV1NamespaceSpec.discriminator = undefined;\nV1NamespaceSpec.attributeTypeMap = [\n {\n \"name\": \"finalizers\",\n \"baseName\": \"finalizers\",\n \"type\": \"Array\"\n }\n];\nexports.V1NamespaceSpec = V1NamespaceSpec;\n/**\n* NamespaceStatus is information about the current status of a Namespace.\n*/\nclass V1NamespaceStatus {\n static getAttributeTypeMap() {\n return V1NamespaceStatus.attributeTypeMap;\n }\n}\nV1NamespaceStatus.discriminator = undefined;\nV1NamespaceStatus.attributeTypeMap = [\n {\n \"name\": \"phase\",\n \"baseName\": \"phase\",\n \"type\": \"string\"\n }\n];\nexports.V1NamespaceStatus = V1NamespaceStatus;\n/**\n* NetworkPolicy describes what network traffic is allowed for a set of Pods\n*/\nclass V1NetworkPolicy {\n static getAttributeTypeMap() {\n return V1NetworkPolicy.attributeTypeMap;\n }\n}\nV1NetworkPolicy.discriminator = undefined;\nV1NetworkPolicy.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1NetworkPolicySpec\"\n }\n];\nexports.V1NetworkPolicy = V1NetworkPolicy;\n/**\n* NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8\n*/\nclass V1NetworkPolicyEgressRule {\n static getAttributeTypeMap() {\n return V1NetworkPolicyEgressRule.attributeTypeMap;\n }\n}\nV1NetworkPolicyEgressRule.discriminator = undefined;\nV1NetworkPolicyEgressRule.attributeTypeMap = [\n {\n \"name\": \"ports\",\n \"baseName\": \"ports\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"to\",\n \"baseName\": \"to\",\n \"type\": \"Array\"\n }\n];\nexports.V1NetworkPolicyEgressRule = V1NetworkPolicyEgressRule;\n/**\n* NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.\n*/\nclass V1NetworkPolicyIngressRule {\n static getAttributeTypeMap() {\n return V1NetworkPolicyIngressRule.attributeTypeMap;\n }\n}\nV1NetworkPolicyIngressRule.discriminator = undefined;\nV1NetworkPolicyIngressRule.attributeTypeMap = [\n {\n \"name\": \"from\",\n \"baseName\": \"from\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"ports\",\n \"baseName\": \"ports\",\n \"type\": \"Array\"\n }\n];\nexports.V1NetworkPolicyIngressRule = V1NetworkPolicyIngressRule;\n/**\n* NetworkPolicyList is a list of NetworkPolicy objects.\n*/\nclass V1NetworkPolicyList {\n static getAttributeTypeMap() {\n return V1NetworkPolicyList.attributeTypeMap;\n }\n}\nV1NetworkPolicyList.discriminator = undefined;\nV1NetworkPolicyList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1NetworkPolicyList = V1NetworkPolicyList;\n/**\n* NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of fields are allowed\n*/\nclass V1NetworkPolicyPeer {\n static getAttributeTypeMap() {\n return V1NetworkPolicyPeer.attributeTypeMap;\n }\n}\nV1NetworkPolicyPeer.discriminator = undefined;\nV1NetworkPolicyPeer.attributeTypeMap = [\n {\n \"name\": \"ipBlock\",\n \"baseName\": \"ipBlock\",\n \"type\": \"V1IPBlock\"\n },\n {\n \"name\": \"namespaceSelector\",\n \"baseName\": \"namespaceSelector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"podSelector\",\n \"baseName\": \"podSelector\",\n \"type\": \"V1LabelSelector\"\n }\n];\nexports.V1NetworkPolicyPeer = V1NetworkPolicyPeer;\n/**\n* NetworkPolicyPort describes a port to allow traffic on\n*/\nclass V1NetworkPolicyPort {\n static getAttributeTypeMap() {\n return V1NetworkPolicyPort.attributeTypeMap;\n }\n}\nV1NetworkPolicyPort.discriminator = undefined;\nV1NetworkPolicyPort.attributeTypeMap = [\n {\n \"name\": \"port\",\n \"baseName\": \"port\",\n \"type\": \"any\"\n },\n {\n \"name\": \"protocol\",\n \"baseName\": \"protocol\",\n \"type\": \"string\"\n }\n];\nexports.V1NetworkPolicyPort = V1NetworkPolicyPort;\n/**\n* NetworkPolicySpec provides the specification of a NetworkPolicy\n*/\nclass V1NetworkPolicySpec {\n static getAttributeTypeMap() {\n return V1NetworkPolicySpec.attributeTypeMap;\n }\n}\nV1NetworkPolicySpec.discriminator = undefined;\nV1NetworkPolicySpec.attributeTypeMap = [\n {\n \"name\": \"egress\",\n \"baseName\": \"egress\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"ingress\",\n \"baseName\": \"ingress\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"podSelector\",\n \"baseName\": \"podSelector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"policyTypes\",\n \"baseName\": \"policyTypes\",\n \"type\": \"Array\"\n }\n];\nexports.V1NetworkPolicySpec = V1NetworkPolicySpec;\n/**\n* Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).\n*/\nclass V1Node {\n static getAttributeTypeMap() {\n return V1Node.attributeTypeMap;\n }\n}\nV1Node.discriminator = undefined;\nV1Node.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1NodeSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1NodeStatus\"\n }\n];\nexports.V1Node = V1Node;\n/**\n* NodeAddress contains information for the node's address.\n*/\nclass V1NodeAddress {\n static getAttributeTypeMap() {\n return V1NodeAddress.attributeTypeMap;\n }\n}\nV1NodeAddress.discriminator = undefined;\nV1NodeAddress.attributeTypeMap = [\n {\n \"name\": \"address\",\n \"baseName\": \"address\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1NodeAddress = V1NodeAddress;\n/**\n* Node affinity is a group of node affinity scheduling rules.\n*/\nclass V1NodeAffinity {\n static getAttributeTypeMap() {\n return V1NodeAffinity.attributeTypeMap;\n }\n}\nV1NodeAffinity.discriminator = undefined;\nV1NodeAffinity.attributeTypeMap = [\n {\n \"name\": \"preferredDuringSchedulingIgnoredDuringExecution\",\n \"baseName\": \"preferredDuringSchedulingIgnoredDuringExecution\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"requiredDuringSchedulingIgnoredDuringExecution\",\n \"baseName\": \"requiredDuringSchedulingIgnoredDuringExecution\",\n \"type\": \"V1NodeSelector\"\n }\n];\nexports.V1NodeAffinity = V1NodeAffinity;\n/**\n* NodeCondition contains condition information for a node.\n*/\nclass V1NodeCondition {\n static getAttributeTypeMap() {\n return V1NodeCondition.attributeTypeMap;\n }\n}\nV1NodeCondition.discriminator = undefined;\nV1NodeCondition.attributeTypeMap = [\n {\n \"name\": \"lastHeartbeatTime\",\n \"baseName\": \"lastHeartbeatTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1NodeCondition = V1NodeCondition;\n/**\n* NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil.\n*/\nclass V1NodeConfigSource {\n static getAttributeTypeMap() {\n return V1NodeConfigSource.attributeTypeMap;\n }\n}\nV1NodeConfigSource.discriminator = undefined;\nV1NodeConfigSource.attributeTypeMap = [\n {\n \"name\": \"configMap\",\n \"baseName\": \"configMap\",\n \"type\": \"V1ConfigMapNodeConfigSource\"\n }\n];\nexports.V1NodeConfigSource = V1NodeConfigSource;\n/**\n* NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource.\n*/\nclass V1NodeConfigStatus {\n static getAttributeTypeMap() {\n return V1NodeConfigStatus.attributeTypeMap;\n }\n}\nV1NodeConfigStatus.discriminator = undefined;\nV1NodeConfigStatus.attributeTypeMap = [\n {\n \"name\": \"active\",\n \"baseName\": \"active\",\n \"type\": \"V1NodeConfigSource\"\n },\n {\n \"name\": \"assigned\",\n \"baseName\": \"assigned\",\n \"type\": \"V1NodeConfigSource\"\n },\n {\n \"name\": \"error\",\n \"baseName\": \"error\",\n \"type\": \"string\"\n },\n {\n \"name\": \"lastKnownGood\",\n \"baseName\": \"lastKnownGood\",\n \"type\": \"V1NodeConfigSource\"\n }\n];\nexports.V1NodeConfigStatus = V1NodeConfigStatus;\n/**\n* NodeDaemonEndpoints lists ports opened by daemons running on the Node.\n*/\nclass V1NodeDaemonEndpoints {\n static getAttributeTypeMap() {\n return V1NodeDaemonEndpoints.attributeTypeMap;\n }\n}\nV1NodeDaemonEndpoints.discriminator = undefined;\nV1NodeDaemonEndpoints.attributeTypeMap = [\n {\n \"name\": \"kubeletEndpoint\",\n \"baseName\": \"kubeletEndpoint\",\n \"type\": \"V1DaemonEndpoint\"\n }\n];\nexports.V1NodeDaemonEndpoints = V1NodeDaemonEndpoints;\n/**\n* NodeList is the whole list of all Nodes which have been registered with master.\n*/\nclass V1NodeList {\n static getAttributeTypeMap() {\n return V1NodeList.attributeTypeMap;\n }\n}\nV1NodeList.discriminator = undefined;\nV1NodeList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1NodeList = V1NodeList;\n/**\n* A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.\n*/\nclass V1NodeSelector {\n static getAttributeTypeMap() {\n return V1NodeSelector.attributeTypeMap;\n }\n}\nV1NodeSelector.discriminator = undefined;\nV1NodeSelector.attributeTypeMap = [\n {\n \"name\": \"nodeSelectorTerms\",\n \"baseName\": \"nodeSelectorTerms\",\n \"type\": \"Array\"\n }\n];\nexports.V1NodeSelector = V1NodeSelector;\n/**\n* A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.\n*/\nclass V1NodeSelectorRequirement {\n static getAttributeTypeMap() {\n return V1NodeSelectorRequirement.attributeTypeMap;\n }\n}\nV1NodeSelectorRequirement.discriminator = undefined;\nV1NodeSelectorRequirement.attributeTypeMap = [\n {\n \"name\": \"key\",\n \"baseName\": \"key\",\n \"type\": \"string\"\n },\n {\n \"name\": \"operator\",\n \"baseName\": \"operator\",\n \"type\": \"string\"\n },\n {\n \"name\": \"values\",\n \"baseName\": \"values\",\n \"type\": \"Array\"\n }\n];\nexports.V1NodeSelectorRequirement = V1NodeSelectorRequirement;\n/**\n* A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.\n*/\nclass V1NodeSelectorTerm {\n static getAttributeTypeMap() {\n return V1NodeSelectorTerm.attributeTypeMap;\n }\n}\nV1NodeSelectorTerm.discriminator = undefined;\nV1NodeSelectorTerm.attributeTypeMap = [\n {\n \"name\": \"matchExpressions\",\n \"baseName\": \"matchExpressions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"matchFields\",\n \"baseName\": \"matchFields\",\n \"type\": \"Array\"\n }\n];\nexports.V1NodeSelectorTerm = V1NodeSelectorTerm;\n/**\n* NodeSpec describes the attributes that a node is created with.\n*/\nclass V1NodeSpec {\n static getAttributeTypeMap() {\n return V1NodeSpec.attributeTypeMap;\n }\n}\nV1NodeSpec.discriminator = undefined;\nV1NodeSpec.attributeTypeMap = [\n {\n \"name\": \"configSource\",\n \"baseName\": \"configSource\",\n \"type\": \"V1NodeConfigSource\"\n },\n {\n \"name\": \"externalID\",\n \"baseName\": \"externalID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"podCIDR\",\n \"baseName\": \"podCIDR\",\n \"type\": \"string\"\n },\n {\n \"name\": \"providerID\",\n \"baseName\": \"providerID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"taints\",\n \"baseName\": \"taints\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"unschedulable\",\n \"baseName\": \"unschedulable\",\n \"type\": \"boolean\"\n }\n];\nexports.V1NodeSpec = V1NodeSpec;\n/**\n* NodeStatus is information about the current status of a node.\n*/\nclass V1NodeStatus {\n static getAttributeTypeMap() {\n return V1NodeStatus.attributeTypeMap;\n }\n}\nV1NodeStatus.discriminator = undefined;\nV1NodeStatus.attributeTypeMap = [\n {\n \"name\": \"addresses\",\n \"baseName\": \"addresses\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"allocatable\",\n \"baseName\": \"allocatable\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"capacity\",\n \"baseName\": \"capacity\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"config\",\n \"baseName\": \"config\",\n \"type\": \"V1NodeConfigStatus\"\n },\n {\n \"name\": \"daemonEndpoints\",\n \"baseName\": \"daemonEndpoints\",\n \"type\": \"V1NodeDaemonEndpoints\"\n },\n {\n \"name\": \"images\",\n \"baseName\": \"images\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"nodeInfo\",\n \"baseName\": \"nodeInfo\",\n \"type\": \"V1NodeSystemInfo\"\n },\n {\n \"name\": \"phase\",\n \"baseName\": \"phase\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumesAttached\",\n \"baseName\": \"volumesAttached\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"volumesInUse\",\n \"baseName\": \"volumesInUse\",\n \"type\": \"Array\"\n }\n];\nexports.V1NodeStatus = V1NodeStatus;\n/**\n* NodeSystemInfo is a set of ids/uuids to uniquely identify the node.\n*/\nclass V1NodeSystemInfo {\n static getAttributeTypeMap() {\n return V1NodeSystemInfo.attributeTypeMap;\n }\n}\nV1NodeSystemInfo.discriminator = undefined;\nV1NodeSystemInfo.attributeTypeMap = [\n {\n \"name\": \"architecture\",\n \"baseName\": \"architecture\",\n \"type\": \"string\"\n },\n {\n \"name\": \"bootID\",\n \"baseName\": \"bootID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"containerRuntimeVersion\",\n \"baseName\": \"containerRuntimeVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kernelVersion\",\n \"baseName\": \"kernelVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kubeProxyVersion\",\n \"baseName\": \"kubeProxyVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kubeletVersion\",\n \"baseName\": \"kubeletVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"machineID\",\n \"baseName\": \"machineID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"operatingSystem\",\n \"baseName\": \"operatingSystem\",\n \"type\": \"string\"\n },\n {\n \"name\": \"osImage\",\n \"baseName\": \"osImage\",\n \"type\": \"string\"\n },\n {\n \"name\": \"systemUUID\",\n \"baseName\": \"systemUUID\",\n \"type\": \"string\"\n }\n];\nexports.V1NodeSystemInfo = V1NodeSystemInfo;\n/**\n* NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface\n*/\nclass V1NonResourceAttributes {\n static getAttributeTypeMap() {\n return V1NonResourceAttributes.attributeTypeMap;\n }\n}\nV1NonResourceAttributes.discriminator = undefined;\nV1NonResourceAttributes.attributeTypeMap = [\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"verb\",\n \"baseName\": \"verb\",\n \"type\": \"string\"\n }\n];\nexports.V1NonResourceAttributes = V1NonResourceAttributes;\n/**\n* NonResourceRule holds information that describes a rule for the non-resource\n*/\nclass V1NonResourceRule {\n static getAttributeTypeMap() {\n return V1NonResourceRule.attributeTypeMap;\n }\n}\nV1NonResourceRule.discriminator = undefined;\nV1NonResourceRule.attributeTypeMap = [\n {\n \"name\": \"nonResourceURLs\",\n \"baseName\": \"nonResourceURLs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"verbs\",\n \"baseName\": \"verbs\",\n \"type\": \"Array\"\n }\n];\nexports.V1NonResourceRule = V1NonResourceRule;\n/**\n* ObjectFieldSelector selects an APIVersioned field of an object.\n*/\nclass V1ObjectFieldSelector {\n static getAttributeTypeMap() {\n return V1ObjectFieldSelector.attributeTypeMap;\n }\n}\nV1ObjectFieldSelector.discriminator = undefined;\nV1ObjectFieldSelector.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"fieldPath\",\n \"baseName\": \"fieldPath\",\n \"type\": \"string\"\n }\n];\nexports.V1ObjectFieldSelector = V1ObjectFieldSelector;\n/**\n* ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.\n*/\nclass V1ObjectMeta {\n static getAttributeTypeMap() {\n return V1ObjectMeta.attributeTypeMap;\n }\n}\nV1ObjectMeta.discriminator = undefined;\nV1ObjectMeta.attributeTypeMap = [\n {\n \"name\": \"annotations\",\n \"baseName\": \"annotations\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"clusterName\",\n \"baseName\": \"clusterName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"creationTimestamp\",\n \"baseName\": \"creationTimestamp\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"deletionGracePeriodSeconds\",\n \"baseName\": \"deletionGracePeriodSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"deletionTimestamp\",\n \"baseName\": \"deletionTimestamp\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"finalizers\",\n \"baseName\": \"finalizers\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"generateName\",\n \"baseName\": \"generateName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"generation\",\n \"baseName\": \"generation\",\n \"type\": \"number\"\n },\n {\n \"name\": \"initializers\",\n \"baseName\": \"initializers\",\n \"type\": \"V1Initializers\"\n },\n {\n \"name\": \"labels\",\n \"baseName\": \"labels\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"ownerReferences\",\n \"baseName\": \"ownerReferences\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resourceVersion\",\n \"baseName\": \"resourceVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"selfLink\",\n \"baseName\": \"selfLink\",\n \"type\": \"string\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n }\n];\nexports.V1ObjectMeta = V1ObjectMeta;\n/**\n* ObjectReference contains enough information to let you inspect or modify the referred object.\n*/\nclass V1ObjectReference {\n static getAttributeTypeMap() {\n return V1ObjectReference.attributeTypeMap;\n }\n}\nV1ObjectReference.discriminator = undefined;\nV1ObjectReference.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"fieldPath\",\n \"baseName\": \"fieldPath\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"resourceVersion\",\n \"baseName\": \"resourceVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n }\n];\nexports.V1ObjectReference = V1ObjectReference;\n/**\n* OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.\n*/\nclass V1OwnerReference {\n static getAttributeTypeMap() {\n return V1OwnerReference.attributeTypeMap;\n }\n}\nV1OwnerReference.discriminator = undefined;\nV1OwnerReference.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"blockOwnerDeletion\",\n \"baseName\": \"blockOwnerDeletion\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"controller\",\n \"baseName\": \"controller\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n }\n];\nexports.V1OwnerReference = V1OwnerReference;\n/**\n* PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes\n*/\nclass V1PersistentVolume {\n static getAttributeTypeMap() {\n return V1PersistentVolume.attributeTypeMap;\n }\n}\nV1PersistentVolume.discriminator = undefined;\nV1PersistentVolume.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1PersistentVolumeSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1PersistentVolumeStatus\"\n }\n];\nexports.V1PersistentVolume = V1PersistentVolume;\n/**\n* PersistentVolumeClaim is a user's request for and claim to a persistent volume\n*/\nclass V1PersistentVolumeClaim {\n static getAttributeTypeMap() {\n return V1PersistentVolumeClaim.attributeTypeMap;\n }\n}\nV1PersistentVolumeClaim.discriminator = undefined;\nV1PersistentVolumeClaim.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1PersistentVolumeClaimSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1PersistentVolumeClaimStatus\"\n }\n];\nexports.V1PersistentVolumeClaim = V1PersistentVolumeClaim;\n/**\n* PersistentVolumeClaimCondition contails details about state of pvc\n*/\nclass V1PersistentVolumeClaimCondition {\n static getAttributeTypeMap() {\n return V1PersistentVolumeClaimCondition.attributeTypeMap;\n }\n}\nV1PersistentVolumeClaimCondition.discriminator = undefined;\nV1PersistentVolumeClaimCondition.attributeTypeMap = [\n {\n \"name\": \"lastProbeTime\",\n \"baseName\": \"lastProbeTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1PersistentVolumeClaimCondition = V1PersistentVolumeClaimCondition;\n/**\n* PersistentVolumeClaimList is a list of PersistentVolumeClaim items.\n*/\nclass V1PersistentVolumeClaimList {\n static getAttributeTypeMap() {\n return V1PersistentVolumeClaimList.attributeTypeMap;\n }\n}\nV1PersistentVolumeClaimList.discriminator = undefined;\nV1PersistentVolumeClaimList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1PersistentVolumeClaimList = V1PersistentVolumeClaimList;\n/**\n* PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes\n*/\nclass V1PersistentVolumeClaimSpec {\n static getAttributeTypeMap() {\n return V1PersistentVolumeClaimSpec.attributeTypeMap;\n }\n}\nV1PersistentVolumeClaimSpec.discriminator = undefined;\nV1PersistentVolumeClaimSpec.attributeTypeMap = [\n {\n \"name\": \"accessModes\",\n \"baseName\": \"accessModes\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"dataSource\",\n \"baseName\": \"dataSource\",\n \"type\": \"V1TypedLocalObjectReference\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"V1ResourceRequirements\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"storageClassName\",\n \"baseName\": \"storageClassName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumeMode\",\n \"baseName\": \"volumeMode\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumeName\",\n \"baseName\": \"volumeName\",\n \"type\": \"string\"\n }\n];\nexports.V1PersistentVolumeClaimSpec = V1PersistentVolumeClaimSpec;\n/**\n* PersistentVolumeClaimStatus is the current status of a persistent volume claim.\n*/\nclass V1PersistentVolumeClaimStatus {\n static getAttributeTypeMap() {\n return V1PersistentVolumeClaimStatus.attributeTypeMap;\n }\n}\nV1PersistentVolumeClaimStatus.discriminator = undefined;\nV1PersistentVolumeClaimStatus.attributeTypeMap = [\n {\n \"name\": \"accessModes\",\n \"baseName\": \"accessModes\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"capacity\",\n \"baseName\": \"capacity\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"phase\",\n \"baseName\": \"phase\",\n \"type\": \"string\"\n }\n];\nexports.V1PersistentVolumeClaimStatus = V1PersistentVolumeClaimStatus;\n/**\n* PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).\n*/\nclass V1PersistentVolumeClaimVolumeSource {\n static getAttributeTypeMap() {\n return V1PersistentVolumeClaimVolumeSource.attributeTypeMap;\n }\n}\nV1PersistentVolumeClaimVolumeSource.discriminator = undefined;\nV1PersistentVolumeClaimVolumeSource.attributeTypeMap = [\n {\n \"name\": \"claimName\",\n \"baseName\": \"claimName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n }\n];\nexports.V1PersistentVolumeClaimVolumeSource = V1PersistentVolumeClaimVolumeSource;\n/**\n* PersistentVolumeList is a list of PersistentVolume items.\n*/\nclass V1PersistentVolumeList {\n static getAttributeTypeMap() {\n return V1PersistentVolumeList.attributeTypeMap;\n }\n}\nV1PersistentVolumeList.discriminator = undefined;\nV1PersistentVolumeList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1PersistentVolumeList = V1PersistentVolumeList;\n/**\n* PersistentVolumeSpec is the specification of a persistent volume.\n*/\nclass V1PersistentVolumeSpec {\n static getAttributeTypeMap() {\n return V1PersistentVolumeSpec.attributeTypeMap;\n }\n}\nV1PersistentVolumeSpec.discriminator = undefined;\nV1PersistentVolumeSpec.attributeTypeMap = [\n {\n \"name\": \"accessModes\",\n \"baseName\": \"accessModes\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"awsElasticBlockStore\",\n \"baseName\": \"awsElasticBlockStore\",\n \"type\": \"V1AWSElasticBlockStoreVolumeSource\"\n },\n {\n \"name\": \"azureDisk\",\n \"baseName\": \"azureDisk\",\n \"type\": \"V1AzureDiskVolumeSource\"\n },\n {\n \"name\": \"azureFile\",\n \"baseName\": \"azureFile\",\n \"type\": \"V1AzureFilePersistentVolumeSource\"\n },\n {\n \"name\": \"capacity\",\n \"baseName\": \"capacity\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"cephfs\",\n \"baseName\": \"cephfs\",\n \"type\": \"V1CephFSPersistentVolumeSource\"\n },\n {\n \"name\": \"cinder\",\n \"baseName\": \"cinder\",\n \"type\": \"V1CinderPersistentVolumeSource\"\n },\n {\n \"name\": \"claimRef\",\n \"baseName\": \"claimRef\",\n \"type\": \"V1ObjectReference\"\n },\n {\n \"name\": \"csi\",\n \"baseName\": \"csi\",\n \"type\": \"V1CSIPersistentVolumeSource\"\n },\n {\n \"name\": \"fc\",\n \"baseName\": \"fc\",\n \"type\": \"V1FCVolumeSource\"\n },\n {\n \"name\": \"flexVolume\",\n \"baseName\": \"flexVolume\",\n \"type\": \"V1FlexPersistentVolumeSource\"\n },\n {\n \"name\": \"flocker\",\n \"baseName\": \"flocker\",\n \"type\": \"V1FlockerVolumeSource\"\n },\n {\n \"name\": \"gcePersistentDisk\",\n \"baseName\": \"gcePersistentDisk\",\n \"type\": \"V1GCEPersistentDiskVolumeSource\"\n },\n {\n \"name\": \"glusterfs\",\n \"baseName\": \"glusterfs\",\n \"type\": \"V1GlusterfsPersistentVolumeSource\"\n },\n {\n \"name\": \"hostPath\",\n \"baseName\": \"hostPath\",\n \"type\": \"V1HostPathVolumeSource\"\n },\n {\n \"name\": \"iscsi\",\n \"baseName\": \"iscsi\",\n \"type\": \"V1ISCSIPersistentVolumeSource\"\n },\n {\n \"name\": \"local\",\n \"baseName\": \"local\",\n \"type\": \"V1LocalVolumeSource\"\n },\n {\n \"name\": \"mountOptions\",\n \"baseName\": \"mountOptions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"nfs\",\n \"baseName\": \"nfs\",\n \"type\": \"V1NFSVolumeSource\"\n },\n {\n \"name\": \"nodeAffinity\",\n \"baseName\": \"nodeAffinity\",\n \"type\": \"V1VolumeNodeAffinity\"\n },\n {\n \"name\": \"persistentVolumeReclaimPolicy\",\n \"baseName\": \"persistentVolumeReclaimPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"photonPersistentDisk\",\n \"baseName\": \"photonPersistentDisk\",\n \"type\": \"V1PhotonPersistentDiskVolumeSource\"\n },\n {\n \"name\": \"portworxVolume\",\n \"baseName\": \"portworxVolume\",\n \"type\": \"V1PortworxVolumeSource\"\n },\n {\n \"name\": \"quobyte\",\n \"baseName\": \"quobyte\",\n \"type\": \"V1QuobyteVolumeSource\"\n },\n {\n \"name\": \"rbd\",\n \"baseName\": \"rbd\",\n \"type\": \"V1RBDPersistentVolumeSource\"\n },\n {\n \"name\": \"scaleIO\",\n \"baseName\": \"scaleIO\",\n \"type\": \"V1ScaleIOPersistentVolumeSource\"\n },\n {\n \"name\": \"storageClassName\",\n \"baseName\": \"storageClassName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"storageos\",\n \"baseName\": \"storageos\",\n \"type\": \"V1StorageOSPersistentVolumeSource\"\n },\n {\n \"name\": \"volumeMode\",\n \"baseName\": \"volumeMode\",\n \"type\": \"string\"\n },\n {\n \"name\": \"vsphereVolume\",\n \"baseName\": \"vsphereVolume\",\n \"type\": \"V1VsphereVirtualDiskVolumeSource\"\n }\n];\nexports.V1PersistentVolumeSpec = V1PersistentVolumeSpec;\n/**\n* PersistentVolumeStatus is the current status of a persistent volume.\n*/\nclass V1PersistentVolumeStatus {\n static getAttributeTypeMap() {\n return V1PersistentVolumeStatus.attributeTypeMap;\n }\n}\nV1PersistentVolumeStatus.discriminator = undefined;\nV1PersistentVolumeStatus.attributeTypeMap = [\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"phase\",\n \"baseName\": \"phase\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n }\n];\nexports.V1PersistentVolumeStatus = V1PersistentVolumeStatus;\n/**\n* Represents a Photon Controller persistent disk resource.\n*/\nclass V1PhotonPersistentDiskVolumeSource {\n static getAttributeTypeMap() {\n return V1PhotonPersistentDiskVolumeSource.attributeTypeMap;\n }\n}\nV1PhotonPersistentDiskVolumeSource.discriminator = undefined;\nV1PhotonPersistentDiskVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"pdID\",\n \"baseName\": \"pdID\",\n \"type\": \"string\"\n }\n];\nexports.V1PhotonPersistentDiskVolumeSource = V1PhotonPersistentDiskVolumeSource;\n/**\n* Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.\n*/\nclass V1Pod {\n static getAttributeTypeMap() {\n return V1Pod.attributeTypeMap;\n }\n}\nV1Pod.discriminator = undefined;\nV1Pod.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1PodSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1PodStatus\"\n }\n];\nexports.V1Pod = V1Pod;\n/**\n* Pod affinity is a group of inter pod affinity scheduling rules.\n*/\nclass V1PodAffinity {\n static getAttributeTypeMap() {\n return V1PodAffinity.attributeTypeMap;\n }\n}\nV1PodAffinity.discriminator = undefined;\nV1PodAffinity.attributeTypeMap = [\n {\n \"name\": \"preferredDuringSchedulingIgnoredDuringExecution\",\n \"baseName\": \"preferredDuringSchedulingIgnoredDuringExecution\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"requiredDuringSchedulingIgnoredDuringExecution\",\n \"baseName\": \"requiredDuringSchedulingIgnoredDuringExecution\",\n \"type\": \"Array\"\n }\n];\nexports.V1PodAffinity = V1PodAffinity;\n/**\n* Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running\n*/\nclass V1PodAffinityTerm {\n static getAttributeTypeMap() {\n return V1PodAffinityTerm.attributeTypeMap;\n }\n}\nV1PodAffinityTerm.discriminator = undefined;\nV1PodAffinityTerm.attributeTypeMap = [\n {\n \"name\": \"labelSelector\",\n \"baseName\": \"labelSelector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"namespaces\",\n \"baseName\": \"namespaces\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"topologyKey\",\n \"baseName\": \"topologyKey\",\n \"type\": \"string\"\n }\n];\nexports.V1PodAffinityTerm = V1PodAffinityTerm;\n/**\n* Pod anti affinity is a group of inter pod anti affinity scheduling rules.\n*/\nclass V1PodAntiAffinity {\n static getAttributeTypeMap() {\n return V1PodAntiAffinity.attributeTypeMap;\n }\n}\nV1PodAntiAffinity.discriminator = undefined;\nV1PodAntiAffinity.attributeTypeMap = [\n {\n \"name\": \"preferredDuringSchedulingIgnoredDuringExecution\",\n \"baseName\": \"preferredDuringSchedulingIgnoredDuringExecution\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"requiredDuringSchedulingIgnoredDuringExecution\",\n \"baseName\": \"requiredDuringSchedulingIgnoredDuringExecution\",\n \"type\": \"Array\"\n }\n];\nexports.V1PodAntiAffinity = V1PodAntiAffinity;\n/**\n* PodCondition contains details for the current condition of this pod.\n*/\nclass V1PodCondition {\n static getAttributeTypeMap() {\n return V1PodCondition.attributeTypeMap;\n }\n}\nV1PodCondition.discriminator = undefined;\nV1PodCondition.attributeTypeMap = [\n {\n \"name\": \"lastProbeTime\",\n \"baseName\": \"lastProbeTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1PodCondition = V1PodCondition;\n/**\n* PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.\n*/\nclass V1PodDNSConfig {\n static getAttributeTypeMap() {\n return V1PodDNSConfig.attributeTypeMap;\n }\n}\nV1PodDNSConfig.discriminator = undefined;\nV1PodDNSConfig.attributeTypeMap = [\n {\n \"name\": \"nameservers\",\n \"baseName\": \"nameservers\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"options\",\n \"baseName\": \"options\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"searches\",\n \"baseName\": \"searches\",\n \"type\": \"Array\"\n }\n];\nexports.V1PodDNSConfig = V1PodDNSConfig;\n/**\n* PodDNSConfigOption defines DNS resolver options of a pod.\n*/\nclass V1PodDNSConfigOption {\n static getAttributeTypeMap() {\n return V1PodDNSConfigOption.attributeTypeMap;\n }\n}\nV1PodDNSConfigOption.discriminator = undefined;\nV1PodDNSConfigOption.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"string\"\n }\n];\nexports.V1PodDNSConfigOption = V1PodDNSConfigOption;\n/**\n* PodList is a list of Pods.\n*/\nclass V1PodList {\n static getAttributeTypeMap() {\n return V1PodList.attributeTypeMap;\n }\n}\nV1PodList.discriminator = undefined;\nV1PodList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1PodList = V1PodList;\n/**\n* PodReadinessGate contains the reference to a pod condition\n*/\nclass V1PodReadinessGate {\n static getAttributeTypeMap() {\n return V1PodReadinessGate.attributeTypeMap;\n }\n}\nV1PodReadinessGate.discriminator = undefined;\nV1PodReadinessGate.attributeTypeMap = [\n {\n \"name\": \"conditionType\",\n \"baseName\": \"conditionType\",\n \"type\": \"string\"\n }\n];\nexports.V1PodReadinessGate = V1PodReadinessGate;\n/**\n* PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.\n*/\nclass V1PodSecurityContext {\n static getAttributeTypeMap() {\n return V1PodSecurityContext.attributeTypeMap;\n }\n}\nV1PodSecurityContext.discriminator = undefined;\nV1PodSecurityContext.attributeTypeMap = [\n {\n \"name\": \"fsGroup\",\n \"baseName\": \"fsGroup\",\n \"type\": \"number\"\n },\n {\n \"name\": \"runAsGroup\",\n \"baseName\": \"runAsGroup\",\n \"type\": \"number\"\n },\n {\n \"name\": \"runAsNonRoot\",\n \"baseName\": \"runAsNonRoot\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"runAsUser\",\n \"baseName\": \"runAsUser\",\n \"type\": \"number\"\n },\n {\n \"name\": \"seLinuxOptions\",\n \"baseName\": \"seLinuxOptions\",\n \"type\": \"V1SELinuxOptions\"\n },\n {\n \"name\": \"supplementalGroups\",\n \"baseName\": \"supplementalGroups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"sysctls\",\n \"baseName\": \"sysctls\",\n \"type\": \"Array\"\n }\n];\nexports.V1PodSecurityContext = V1PodSecurityContext;\n/**\n* PodSpec is a description of a pod.\n*/\nclass V1PodSpec {\n static getAttributeTypeMap() {\n return V1PodSpec.attributeTypeMap;\n }\n}\nV1PodSpec.discriminator = undefined;\nV1PodSpec.attributeTypeMap = [\n {\n \"name\": \"activeDeadlineSeconds\",\n \"baseName\": \"activeDeadlineSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"affinity\",\n \"baseName\": \"affinity\",\n \"type\": \"V1Affinity\"\n },\n {\n \"name\": \"automountServiceAccountToken\",\n \"baseName\": \"automountServiceAccountToken\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"containers\",\n \"baseName\": \"containers\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"dnsConfig\",\n \"baseName\": \"dnsConfig\",\n \"type\": \"V1PodDNSConfig\"\n },\n {\n \"name\": \"dnsPolicy\",\n \"baseName\": \"dnsPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"enableServiceLinks\",\n \"baseName\": \"enableServiceLinks\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"hostAliases\",\n \"baseName\": \"hostAliases\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"hostIPC\",\n \"baseName\": \"hostIPC\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"hostNetwork\",\n \"baseName\": \"hostNetwork\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"hostPID\",\n \"baseName\": \"hostPID\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"hostname\",\n \"baseName\": \"hostname\",\n \"type\": \"string\"\n },\n {\n \"name\": \"imagePullSecrets\",\n \"baseName\": \"imagePullSecrets\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"initContainers\",\n \"baseName\": \"initContainers\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"nodeName\",\n \"baseName\": \"nodeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nodeSelector\",\n \"baseName\": \"nodeSelector\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"priority\",\n \"baseName\": \"priority\",\n \"type\": \"number\"\n },\n {\n \"name\": \"priorityClassName\",\n \"baseName\": \"priorityClassName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readinessGates\",\n \"baseName\": \"readinessGates\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"restartPolicy\",\n \"baseName\": \"restartPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"runtimeClassName\",\n \"baseName\": \"runtimeClassName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"schedulerName\",\n \"baseName\": \"schedulerName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"securityContext\",\n \"baseName\": \"securityContext\",\n \"type\": \"V1PodSecurityContext\"\n },\n {\n \"name\": \"serviceAccount\",\n \"baseName\": \"serviceAccount\",\n \"type\": \"string\"\n },\n {\n \"name\": \"serviceAccountName\",\n \"baseName\": \"serviceAccountName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"shareProcessNamespace\",\n \"baseName\": \"shareProcessNamespace\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"subdomain\",\n \"baseName\": \"subdomain\",\n \"type\": \"string\"\n },\n {\n \"name\": \"terminationGracePeriodSeconds\",\n \"baseName\": \"terminationGracePeriodSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"tolerations\",\n \"baseName\": \"tolerations\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"volumes\",\n \"baseName\": \"volumes\",\n \"type\": \"Array\"\n }\n];\nexports.V1PodSpec = V1PodSpec;\n/**\n* PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane.\n*/\nclass V1PodStatus {\n static getAttributeTypeMap() {\n return V1PodStatus.attributeTypeMap;\n }\n}\nV1PodStatus.discriminator = undefined;\nV1PodStatus.attributeTypeMap = [\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"containerStatuses\",\n \"baseName\": \"containerStatuses\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"hostIP\",\n \"baseName\": \"hostIP\",\n \"type\": \"string\"\n },\n {\n \"name\": \"initContainerStatuses\",\n \"baseName\": \"initContainerStatuses\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nominatedNodeName\",\n \"baseName\": \"nominatedNodeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"phase\",\n \"baseName\": \"phase\",\n \"type\": \"string\"\n },\n {\n \"name\": \"podIP\",\n \"baseName\": \"podIP\",\n \"type\": \"string\"\n },\n {\n \"name\": \"qosClass\",\n \"baseName\": \"qosClass\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"startTime\",\n \"baseName\": \"startTime\",\n \"type\": \"Date\"\n }\n];\nexports.V1PodStatus = V1PodStatus;\n/**\n* PodTemplate describes a template for creating copies of a predefined pod.\n*/\nclass V1PodTemplate {\n static getAttributeTypeMap() {\n return V1PodTemplate.attributeTypeMap;\n }\n}\nV1PodTemplate.discriminator = undefined;\nV1PodTemplate.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n }\n];\nexports.V1PodTemplate = V1PodTemplate;\n/**\n* PodTemplateList is a list of PodTemplates.\n*/\nclass V1PodTemplateList {\n static getAttributeTypeMap() {\n return V1PodTemplateList.attributeTypeMap;\n }\n}\nV1PodTemplateList.discriminator = undefined;\nV1PodTemplateList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1PodTemplateList = V1PodTemplateList;\n/**\n* PodTemplateSpec describes the data a pod should have when created from a template\n*/\nclass V1PodTemplateSpec {\n static getAttributeTypeMap() {\n return V1PodTemplateSpec.attributeTypeMap;\n }\n}\nV1PodTemplateSpec.discriminator = undefined;\nV1PodTemplateSpec.attributeTypeMap = [\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1PodSpec\"\n }\n];\nexports.V1PodTemplateSpec = V1PodTemplateSpec;\n/**\n* PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.\n*/\nclass V1PolicyRule {\n static getAttributeTypeMap() {\n return V1PolicyRule.attributeTypeMap;\n }\n}\nV1PolicyRule.discriminator = undefined;\nV1PolicyRule.attributeTypeMap = [\n {\n \"name\": \"apiGroups\",\n \"baseName\": \"apiGroups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"nonResourceURLs\",\n \"baseName\": \"nonResourceURLs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resourceNames\",\n \"baseName\": \"resourceNames\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"verbs\",\n \"baseName\": \"verbs\",\n \"type\": \"Array\"\n }\n];\nexports.V1PolicyRule = V1PolicyRule;\n/**\n* PortworxVolumeSource represents a Portworx volume resource.\n*/\nclass V1PortworxVolumeSource {\n static getAttributeTypeMap() {\n return V1PortworxVolumeSource.attributeTypeMap;\n }\n}\nV1PortworxVolumeSource.discriminator = undefined;\nV1PortworxVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"volumeID\",\n \"baseName\": \"volumeID\",\n \"type\": \"string\"\n }\n];\nexports.V1PortworxVolumeSource = V1PortworxVolumeSource;\n/**\n* Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.\n*/\nclass V1Preconditions {\n static getAttributeTypeMap() {\n return V1Preconditions.attributeTypeMap;\n }\n}\nV1Preconditions.discriminator = undefined;\nV1Preconditions.attributeTypeMap = [\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n }\n];\nexports.V1Preconditions = V1Preconditions;\n/**\n* An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).\n*/\nclass V1PreferredSchedulingTerm {\n static getAttributeTypeMap() {\n return V1PreferredSchedulingTerm.attributeTypeMap;\n }\n}\nV1PreferredSchedulingTerm.discriminator = undefined;\nV1PreferredSchedulingTerm.attributeTypeMap = [\n {\n \"name\": \"preference\",\n \"baseName\": \"preference\",\n \"type\": \"V1NodeSelectorTerm\"\n },\n {\n \"name\": \"weight\",\n \"baseName\": \"weight\",\n \"type\": \"number\"\n }\n];\nexports.V1PreferredSchedulingTerm = V1PreferredSchedulingTerm;\n/**\n* Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.\n*/\nclass V1Probe {\n static getAttributeTypeMap() {\n return V1Probe.attributeTypeMap;\n }\n}\nV1Probe.discriminator = undefined;\nV1Probe.attributeTypeMap = [\n {\n \"name\": \"exec\",\n \"baseName\": \"exec\",\n \"type\": \"V1ExecAction\"\n },\n {\n \"name\": \"failureThreshold\",\n \"baseName\": \"failureThreshold\",\n \"type\": \"number\"\n },\n {\n \"name\": \"httpGet\",\n \"baseName\": \"httpGet\",\n \"type\": \"V1HTTPGetAction\"\n },\n {\n \"name\": \"initialDelaySeconds\",\n \"baseName\": \"initialDelaySeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"periodSeconds\",\n \"baseName\": \"periodSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"successThreshold\",\n \"baseName\": \"successThreshold\",\n \"type\": \"number\"\n },\n {\n \"name\": \"tcpSocket\",\n \"baseName\": \"tcpSocket\",\n \"type\": \"V1TCPSocketAction\"\n },\n {\n \"name\": \"timeoutSeconds\",\n \"baseName\": \"timeoutSeconds\",\n \"type\": \"number\"\n }\n];\nexports.V1Probe = V1Probe;\n/**\n* Represents a projected volume source\n*/\nclass V1ProjectedVolumeSource {\n static getAttributeTypeMap() {\n return V1ProjectedVolumeSource.attributeTypeMap;\n }\n}\nV1ProjectedVolumeSource.discriminator = undefined;\nV1ProjectedVolumeSource.attributeTypeMap = [\n {\n \"name\": \"defaultMode\",\n \"baseName\": \"defaultMode\",\n \"type\": \"number\"\n },\n {\n \"name\": \"sources\",\n \"baseName\": \"sources\",\n \"type\": \"Array\"\n }\n];\nexports.V1ProjectedVolumeSource = V1ProjectedVolumeSource;\n/**\n* Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.\n*/\nclass V1QuobyteVolumeSource {\n static getAttributeTypeMap() {\n return V1QuobyteVolumeSource.attributeTypeMap;\n }\n}\nV1QuobyteVolumeSource.discriminator = undefined;\nV1QuobyteVolumeSource.attributeTypeMap = [\n {\n \"name\": \"group\",\n \"baseName\": \"group\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"registry\",\n \"baseName\": \"registry\",\n \"type\": \"string\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volume\",\n \"baseName\": \"volume\",\n \"type\": \"string\"\n }\n];\nexports.V1QuobyteVolumeSource = V1QuobyteVolumeSource;\n/**\n* Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.\n*/\nclass V1RBDPersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1RBDPersistentVolumeSource.attributeTypeMap;\n }\n}\nV1RBDPersistentVolumeSource.discriminator = undefined;\nV1RBDPersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"image\",\n \"baseName\": \"image\",\n \"type\": \"string\"\n },\n {\n \"name\": \"keyring\",\n \"baseName\": \"keyring\",\n \"type\": \"string\"\n },\n {\n \"name\": \"monitors\",\n \"baseName\": \"monitors\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"pool\",\n \"baseName\": \"pool\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1SecretReference\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"string\"\n }\n];\nexports.V1RBDPersistentVolumeSource = V1RBDPersistentVolumeSource;\n/**\n* Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.\n*/\nclass V1RBDVolumeSource {\n static getAttributeTypeMap() {\n return V1RBDVolumeSource.attributeTypeMap;\n }\n}\nV1RBDVolumeSource.discriminator = undefined;\nV1RBDVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"image\",\n \"baseName\": \"image\",\n \"type\": \"string\"\n },\n {\n \"name\": \"keyring\",\n \"baseName\": \"keyring\",\n \"type\": \"string\"\n },\n {\n \"name\": \"monitors\",\n \"baseName\": \"monitors\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"pool\",\n \"baseName\": \"pool\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1LocalObjectReference\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"string\"\n }\n];\nexports.V1RBDVolumeSource = V1RBDVolumeSource;\n/**\n* ReplicaSet ensures that a specified number of pod replicas are running at any given time.\n*/\nclass V1ReplicaSet {\n static getAttributeTypeMap() {\n return V1ReplicaSet.attributeTypeMap;\n }\n}\nV1ReplicaSet.discriminator = undefined;\nV1ReplicaSet.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1ReplicaSetSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1ReplicaSetStatus\"\n }\n];\nexports.V1ReplicaSet = V1ReplicaSet;\n/**\n* ReplicaSetCondition describes the state of a replica set at a certain point.\n*/\nclass V1ReplicaSetCondition {\n static getAttributeTypeMap() {\n return V1ReplicaSetCondition.attributeTypeMap;\n }\n}\nV1ReplicaSetCondition.discriminator = undefined;\nV1ReplicaSetCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1ReplicaSetCondition = V1ReplicaSetCondition;\n/**\n* ReplicaSetList is a collection of ReplicaSets.\n*/\nclass V1ReplicaSetList {\n static getAttributeTypeMap() {\n return V1ReplicaSetList.attributeTypeMap;\n }\n}\nV1ReplicaSetList.discriminator = undefined;\nV1ReplicaSetList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1ReplicaSetList = V1ReplicaSetList;\n/**\n* ReplicaSetSpec is the specification of a ReplicaSet.\n*/\nclass V1ReplicaSetSpec {\n static getAttributeTypeMap() {\n return V1ReplicaSetSpec.attributeTypeMap;\n }\n}\nV1ReplicaSetSpec.discriminator = undefined;\nV1ReplicaSetSpec.attributeTypeMap = [\n {\n \"name\": \"minReadySeconds\",\n \"baseName\": \"minReadySeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n }\n];\nexports.V1ReplicaSetSpec = V1ReplicaSetSpec;\n/**\n* ReplicaSetStatus represents the current status of a ReplicaSet.\n*/\nclass V1ReplicaSetStatus {\n static getAttributeTypeMap() {\n return V1ReplicaSetStatus.attributeTypeMap;\n }\n}\nV1ReplicaSetStatus.discriminator = undefined;\nV1ReplicaSetStatus.attributeTypeMap = [\n {\n \"name\": \"availableReplicas\",\n \"baseName\": \"availableReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"fullyLabeledReplicas\",\n \"baseName\": \"fullyLabeledReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readyReplicas\",\n \"baseName\": \"readyReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n }\n];\nexports.V1ReplicaSetStatus = V1ReplicaSetStatus;\n/**\n* ReplicationController represents the configuration of a replication controller.\n*/\nclass V1ReplicationController {\n static getAttributeTypeMap() {\n return V1ReplicationController.attributeTypeMap;\n }\n}\nV1ReplicationController.discriminator = undefined;\nV1ReplicationController.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1ReplicationControllerSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1ReplicationControllerStatus\"\n }\n];\nexports.V1ReplicationController = V1ReplicationController;\n/**\n* ReplicationControllerCondition describes the state of a replication controller at a certain point.\n*/\nclass V1ReplicationControllerCondition {\n static getAttributeTypeMap() {\n return V1ReplicationControllerCondition.attributeTypeMap;\n }\n}\nV1ReplicationControllerCondition.discriminator = undefined;\nV1ReplicationControllerCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1ReplicationControllerCondition = V1ReplicationControllerCondition;\n/**\n* ReplicationControllerList is a collection of replication controllers.\n*/\nclass V1ReplicationControllerList {\n static getAttributeTypeMap() {\n return V1ReplicationControllerList.attributeTypeMap;\n }\n}\nV1ReplicationControllerList.discriminator = undefined;\nV1ReplicationControllerList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1ReplicationControllerList = V1ReplicationControllerList;\n/**\n* ReplicationControllerSpec is the specification of a replication controller.\n*/\nclass V1ReplicationControllerSpec {\n static getAttributeTypeMap() {\n return V1ReplicationControllerSpec.attributeTypeMap;\n }\n}\nV1ReplicationControllerSpec.discriminator = undefined;\nV1ReplicationControllerSpec.attributeTypeMap = [\n {\n \"name\": \"minReadySeconds\",\n \"baseName\": \"minReadySeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n }\n];\nexports.V1ReplicationControllerSpec = V1ReplicationControllerSpec;\n/**\n* ReplicationControllerStatus represents the current status of a replication controller.\n*/\nclass V1ReplicationControllerStatus {\n static getAttributeTypeMap() {\n return V1ReplicationControllerStatus.attributeTypeMap;\n }\n}\nV1ReplicationControllerStatus.discriminator = undefined;\nV1ReplicationControllerStatus.attributeTypeMap = [\n {\n \"name\": \"availableReplicas\",\n \"baseName\": \"availableReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"fullyLabeledReplicas\",\n \"baseName\": \"fullyLabeledReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readyReplicas\",\n \"baseName\": \"readyReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n }\n];\nexports.V1ReplicationControllerStatus = V1ReplicationControllerStatus;\n/**\n* ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface\n*/\nclass V1ResourceAttributes {\n static getAttributeTypeMap() {\n return V1ResourceAttributes.attributeTypeMap;\n }\n}\nV1ResourceAttributes.discriminator = undefined;\nV1ResourceAttributes.attributeTypeMap = [\n {\n \"name\": \"group\",\n \"baseName\": \"group\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"resource\",\n \"baseName\": \"resource\",\n \"type\": \"string\"\n },\n {\n \"name\": \"subresource\",\n \"baseName\": \"subresource\",\n \"type\": \"string\"\n },\n {\n \"name\": \"verb\",\n \"baseName\": \"verb\",\n \"type\": \"string\"\n },\n {\n \"name\": \"version\",\n \"baseName\": \"version\",\n \"type\": \"string\"\n }\n];\nexports.V1ResourceAttributes = V1ResourceAttributes;\n/**\n* ResourceFieldSelector represents container resources (cpu, memory) and their output format\n*/\nclass V1ResourceFieldSelector {\n static getAttributeTypeMap() {\n return V1ResourceFieldSelector.attributeTypeMap;\n }\n}\nV1ResourceFieldSelector.discriminator = undefined;\nV1ResourceFieldSelector.attributeTypeMap = [\n {\n \"name\": \"containerName\",\n \"baseName\": \"containerName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"divisor\",\n \"baseName\": \"divisor\",\n \"type\": \"string\"\n },\n {\n \"name\": \"resource\",\n \"baseName\": \"resource\",\n \"type\": \"string\"\n }\n];\nexports.V1ResourceFieldSelector = V1ResourceFieldSelector;\n/**\n* ResourceQuota sets aggregate quota restrictions enforced per namespace\n*/\nclass V1ResourceQuota {\n static getAttributeTypeMap() {\n return V1ResourceQuota.attributeTypeMap;\n }\n}\nV1ResourceQuota.discriminator = undefined;\nV1ResourceQuota.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1ResourceQuotaSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1ResourceQuotaStatus\"\n }\n];\nexports.V1ResourceQuota = V1ResourceQuota;\n/**\n* ResourceQuotaList is a list of ResourceQuota items.\n*/\nclass V1ResourceQuotaList {\n static getAttributeTypeMap() {\n return V1ResourceQuotaList.attributeTypeMap;\n }\n}\nV1ResourceQuotaList.discriminator = undefined;\nV1ResourceQuotaList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1ResourceQuotaList = V1ResourceQuotaList;\n/**\n* ResourceQuotaSpec defines the desired hard limits to enforce for Quota.\n*/\nclass V1ResourceQuotaSpec {\n static getAttributeTypeMap() {\n return V1ResourceQuotaSpec.attributeTypeMap;\n }\n}\nV1ResourceQuotaSpec.discriminator = undefined;\nV1ResourceQuotaSpec.attributeTypeMap = [\n {\n \"name\": \"hard\",\n \"baseName\": \"hard\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"scopeSelector\",\n \"baseName\": \"scopeSelector\",\n \"type\": \"V1ScopeSelector\"\n },\n {\n \"name\": \"scopes\",\n \"baseName\": \"scopes\",\n \"type\": \"Array\"\n }\n];\nexports.V1ResourceQuotaSpec = V1ResourceQuotaSpec;\n/**\n* ResourceQuotaStatus defines the enforced hard limits and observed use.\n*/\nclass V1ResourceQuotaStatus {\n static getAttributeTypeMap() {\n return V1ResourceQuotaStatus.attributeTypeMap;\n }\n}\nV1ResourceQuotaStatus.discriminator = undefined;\nV1ResourceQuotaStatus.attributeTypeMap = [\n {\n \"name\": \"hard\",\n \"baseName\": \"hard\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"used\",\n \"baseName\": \"used\",\n \"type\": \"{ [key: string]: string; }\"\n }\n];\nexports.V1ResourceQuotaStatus = V1ResourceQuotaStatus;\n/**\n* ResourceRequirements describes the compute resource requirements.\n*/\nclass V1ResourceRequirements {\n static getAttributeTypeMap() {\n return V1ResourceRequirements.attributeTypeMap;\n }\n}\nV1ResourceRequirements.discriminator = undefined;\nV1ResourceRequirements.attributeTypeMap = [\n {\n \"name\": \"limits\",\n \"baseName\": \"limits\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"requests\",\n \"baseName\": \"requests\",\n \"type\": \"{ [key: string]: string; }\"\n }\n];\nexports.V1ResourceRequirements = V1ResourceRequirements;\n/**\n* ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.\n*/\nclass V1ResourceRule {\n static getAttributeTypeMap() {\n return V1ResourceRule.attributeTypeMap;\n }\n}\nV1ResourceRule.discriminator = undefined;\nV1ResourceRule.attributeTypeMap = [\n {\n \"name\": \"apiGroups\",\n \"baseName\": \"apiGroups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resourceNames\",\n \"baseName\": \"resourceNames\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"verbs\",\n \"baseName\": \"verbs\",\n \"type\": \"Array\"\n }\n];\nexports.V1ResourceRule = V1ResourceRule;\n/**\n* Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.\n*/\nclass V1Role {\n static getAttributeTypeMap() {\n return V1Role.attributeTypeMap;\n }\n}\nV1Role.discriminator = undefined;\nV1Role.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"rules\",\n \"baseName\": \"rules\",\n \"type\": \"Array\"\n }\n];\nexports.V1Role = V1Role;\n/**\n* RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.\n*/\nclass V1RoleBinding {\n static getAttributeTypeMap() {\n return V1RoleBinding.attributeTypeMap;\n }\n}\nV1RoleBinding.discriminator = undefined;\nV1RoleBinding.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"roleRef\",\n \"baseName\": \"roleRef\",\n \"type\": \"V1RoleRef\"\n },\n {\n \"name\": \"subjects\",\n \"baseName\": \"subjects\",\n \"type\": \"Array\"\n }\n];\nexports.V1RoleBinding = V1RoleBinding;\n/**\n* RoleBindingList is a collection of RoleBindings\n*/\nclass V1RoleBindingList {\n static getAttributeTypeMap() {\n return V1RoleBindingList.attributeTypeMap;\n }\n}\nV1RoleBindingList.discriminator = undefined;\nV1RoleBindingList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1RoleBindingList = V1RoleBindingList;\n/**\n* RoleList is a collection of Roles\n*/\nclass V1RoleList {\n static getAttributeTypeMap() {\n return V1RoleList.attributeTypeMap;\n }\n}\nV1RoleList.discriminator = undefined;\nV1RoleList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1RoleList = V1RoleList;\n/**\n* RoleRef contains information that points to the role being used\n*/\nclass V1RoleRef {\n static getAttributeTypeMap() {\n return V1RoleRef.attributeTypeMap;\n }\n}\nV1RoleRef.discriminator = undefined;\nV1RoleRef.attributeTypeMap = [\n {\n \"name\": \"apiGroup\",\n \"baseName\": \"apiGroup\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\nexports.V1RoleRef = V1RoleRef;\n/**\n* Spec to control the desired behavior of daemon set rolling update.\n*/\nclass V1RollingUpdateDaemonSet {\n static getAttributeTypeMap() {\n return V1RollingUpdateDaemonSet.attributeTypeMap;\n }\n}\nV1RollingUpdateDaemonSet.discriminator = undefined;\nV1RollingUpdateDaemonSet.attributeTypeMap = [\n {\n \"name\": \"maxUnavailable\",\n \"baseName\": \"maxUnavailable\",\n \"type\": \"any\"\n }\n];\nexports.V1RollingUpdateDaemonSet = V1RollingUpdateDaemonSet;\n/**\n* Spec to control the desired behavior of rolling update.\n*/\nclass V1RollingUpdateDeployment {\n static getAttributeTypeMap() {\n return V1RollingUpdateDeployment.attributeTypeMap;\n }\n}\nV1RollingUpdateDeployment.discriminator = undefined;\nV1RollingUpdateDeployment.attributeTypeMap = [\n {\n \"name\": \"maxSurge\",\n \"baseName\": \"maxSurge\",\n \"type\": \"any\"\n },\n {\n \"name\": \"maxUnavailable\",\n \"baseName\": \"maxUnavailable\",\n \"type\": \"any\"\n }\n];\nexports.V1RollingUpdateDeployment = V1RollingUpdateDeployment;\n/**\n* RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.\n*/\nclass V1RollingUpdateStatefulSetStrategy {\n static getAttributeTypeMap() {\n return V1RollingUpdateStatefulSetStrategy.attributeTypeMap;\n }\n}\nV1RollingUpdateStatefulSetStrategy.discriminator = undefined;\nV1RollingUpdateStatefulSetStrategy.attributeTypeMap = [\n {\n \"name\": \"partition\",\n \"baseName\": \"partition\",\n \"type\": \"number\"\n }\n];\nexports.V1RollingUpdateStatefulSetStrategy = V1RollingUpdateStatefulSetStrategy;\n/**\n* SELinuxOptions are the labels to be applied to the container\n*/\nclass V1SELinuxOptions {\n static getAttributeTypeMap() {\n return V1SELinuxOptions.attributeTypeMap;\n }\n}\nV1SELinuxOptions.discriminator = undefined;\nV1SELinuxOptions.attributeTypeMap = [\n {\n \"name\": \"level\",\n \"baseName\": \"level\",\n \"type\": \"string\"\n },\n {\n \"name\": \"role\",\n \"baseName\": \"role\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"string\"\n }\n];\nexports.V1SELinuxOptions = V1SELinuxOptions;\n/**\n* Scale represents a scaling request for a resource.\n*/\nclass V1Scale {\n static getAttributeTypeMap() {\n return V1Scale.attributeTypeMap;\n }\n}\nV1Scale.discriminator = undefined;\nV1Scale.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1ScaleSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1ScaleStatus\"\n }\n];\nexports.V1Scale = V1Scale;\n/**\n* ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume\n*/\nclass V1ScaleIOPersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1ScaleIOPersistentVolumeSource.attributeTypeMap;\n }\n}\nV1ScaleIOPersistentVolumeSource.discriminator = undefined;\nV1ScaleIOPersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"gateway\",\n \"baseName\": \"gateway\",\n \"type\": \"string\"\n },\n {\n \"name\": \"protectionDomain\",\n \"baseName\": \"protectionDomain\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1SecretReference\"\n },\n {\n \"name\": \"sslEnabled\",\n \"baseName\": \"sslEnabled\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"storageMode\",\n \"baseName\": \"storageMode\",\n \"type\": \"string\"\n },\n {\n \"name\": \"storagePool\",\n \"baseName\": \"storagePool\",\n \"type\": \"string\"\n },\n {\n \"name\": \"system\",\n \"baseName\": \"system\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumeName\",\n \"baseName\": \"volumeName\",\n \"type\": \"string\"\n }\n];\nexports.V1ScaleIOPersistentVolumeSource = V1ScaleIOPersistentVolumeSource;\n/**\n* ScaleIOVolumeSource represents a persistent ScaleIO volume\n*/\nclass V1ScaleIOVolumeSource {\n static getAttributeTypeMap() {\n return V1ScaleIOVolumeSource.attributeTypeMap;\n }\n}\nV1ScaleIOVolumeSource.discriminator = undefined;\nV1ScaleIOVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"gateway\",\n \"baseName\": \"gateway\",\n \"type\": \"string\"\n },\n {\n \"name\": \"protectionDomain\",\n \"baseName\": \"protectionDomain\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1LocalObjectReference\"\n },\n {\n \"name\": \"sslEnabled\",\n \"baseName\": \"sslEnabled\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"storageMode\",\n \"baseName\": \"storageMode\",\n \"type\": \"string\"\n },\n {\n \"name\": \"storagePool\",\n \"baseName\": \"storagePool\",\n \"type\": \"string\"\n },\n {\n \"name\": \"system\",\n \"baseName\": \"system\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumeName\",\n \"baseName\": \"volumeName\",\n \"type\": \"string\"\n }\n];\nexports.V1ScaleIOVolumeSource = V1ScaleIOVolumeSource;\n/**\n* ScaleSpec describes the attributes of a scale subresource.\n*/\nclass V1ScaleSpec {\n static getAttributeTypeMap() {\n return V1ScaleSpec.attributeTypeMap;\n }\n}\nV1ScaleSpec.discriminator = undefined;\nV1ScaleSpec.attributeTypeMap = [\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n }\n];\nexports.V1ScaleSpec = V1ScaleSpec;\n/**\n* ScaleStatus represents the current status of a scale subresource.\n*/\nclass V1ScaleStatus {\n static getAttributeTypeMap() {\n return V1ScaleStatus.attributeTypeMap;\n }\n}\nV1ScaleStatus.discriminator = undefined;\nV1ScaleStatus.attributeTypeMap = [\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"string\"\n }\n];\nexports.V1ScaleStatus = V1ScaleStatus;\n/**\n* A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements.\n*/\nclass V1ScopeSelector {\n static getAttributeTypeMap() {\n return V1ScopeSelector.attributeTypeMap;\n }\n}\nV1ScopeSelector.discriminator = undefined;\nV1ScopeSelector.attributeTypeMap = [\n {\n \"name\": \"matchExpressions\",\n \"baseName\": \"matchExpressions\",\n \"type\": \"Array\"\n }\n];\nexports.V1ScopeSelector = V1ScopeSelector;\n/**\n* A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values.\n*/\nclass V1ScopedResourceSelectorRequirement {\n static getAttributeTypeMap() {\n return V1ScopedResourceSelectorRequirement.attributeTypeMap;\n }\n}\nV1ScopedResourceSelectorRequirement.discriminator = undefined;\nV1ScopedResourceSelectorRequirement.attributeTypeMap = [\n {\n \"name\": \"operator\",\n \"baseName\": \"operator\",\n \"type\": \"string\"\n },\n {\n \"name\": \"scopeName\",\n \"baseName\": \"scopeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"values\",\n \"baseName\": \"values\",\n \"type\": \"Array\"\n }\n];\nexports.V1ScopedResourceSelectorRequirement = V1ScopedResourceSelectorRequirement;\n/**\n* Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.\n*/\nclass V1Secret {\n static getAttributeTypeMap() {\n return V1Secret.attributeTypeMap;\n }\n}\nV1Secret.discriminator = undefined;\nV1Secret.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"data\",\n \"baseName\": \"data\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"stringData\",\n \"baseName\": \"stringData\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1Secret = V1Secret;\n/**\n* SecretEnvSource selects a Secret to populate the environment variables with. The contents of the target Secret's Data field will represent the key-value pairs as environment variables.\n*/\nclass V1SecretEnvSource {\n static getAttributeTypeMap() {\n return V1SecretEnvSource.attributeTypeMap;\n }\n}\nV1SecretEnvSource.discriminator = undefined;\nV1SecretEnvSource.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"optional\",\n \"baseName\": \"optional\",\n \"type\": \"boolean\"\n }\n];\nexports.V1SecretEnvSource = V1SecretEnvSource;\n/**\n* SecretKeySelector selects a key of a Secret.\n*/\nclass V1SecretKeySelector {\n static getAttributeTypeMap() {\n return V1SecretKeySelector.attributeTypeMap;\n }\n}\nV1SecretKeySelector.discriminator = undefined;\nV1SecretKeySelector.attributeTypeMap = [\n {\n \"name\": \"key\",\n \"baseName\": \"key\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"optional\",\n \"baseName\": \"optional\",\n \"type\": \"boolean\"\n }\n];\nexports.V1SecretKeySelector = V1SecretKeySelector;\n/**\n* SecretList is a list of Secret.\n*/\nclass V1SecretList {\n static getAttributeTypeMap() {\n return V1SecretList.attributeTypeMap;\n }\n}\nV1SecretList.discriminator = undefined;\nV1SecretList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1SecretList = V1SecretList;\n/**\n* Adapts a secret into a projected volume. The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.\n*/\nclass V1SecretProjection {\n static getAttributeTypeMap() {\n return V1SecretProjection.attributeTypeMap;\n }\n}\nV1SecretProjection.discriminator = undefined;\nV1SecretProjection.attributeTypeMap = [\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"optional\",\n \"baseName\": \"optional\",\n \"type\": \"boolean\"\n }\n];\nexports.V1SecretProjection = V1SecretProjection;\n/**\n* SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace\n*/\nclass V1SecretReference {\n static getAttributeTypeMap() {\n return V1SecretReference.attributeTypeMap;\n }\n}\nV1SecretReference.discriminator = undefined;\nV1SecretReference.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n }\n];\nexports.V1SecretReference = V1SecretReference;\n/**\n* Adapts a Secret into a volume. The contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.\n*/\nclass V1SecretVolumeSource {\n static getAttributeTypeMap() {\n return V1SecretVolumeSource.attributeTypeMap;\n }\n}\nV1SecretVolumeSource.discriminator = undefined;\nV1SecretVolumeSource.attributeTypeMap = [\n {\n \"name\": \"defaultMode\",\n \"baseName\": \"defaultMode\",\n \"type\": \"number\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"optional\",\n \"baseName\": \"optional\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretName\",\n \"baseName\": \"secretName\",\n \"type\": \"string\"\n }\n];\nexports.V1SecretVolumeSource = V1SecretVolumeSource;\n/**\n* SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.\n*/\nclass V1SecurityContext {\n static getAttributeTypeMap() {\n return V1SecurityContext.attributeTypeMap;\n }\n}\nV1SecurityContext.discriminator = undefined;\nV1SecurityContext.attributeTypeMap = [\n {\n \"name\": \"allowPrivilegeEscalation\",\n \"baseName\": \"allowPrivilegeEscalation\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"capabilities\",\n \"baseName\": \"capabilities\",\n \"type\": \"V1Capabilities\"\n },\n {\n \"name\": \"privileged\",\n \"baseName\": \"privileged\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"procMount\",\n \"baseName\": \"procMount\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnlyRootFilesystem\",\n \"baseName\": \"readOnlyRootFilesystem\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"runAsGroup\",\n \"baseName\": \"runAsGroup\",\n \"type\": \"number\"\n },\n {\n \"name\": \"runAsNonRoot\",\n \"baseName\": \"runAsNonRoot\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"runAsUser\",\n \"baseName\": \"runAsUser\",\n \"type\": \"number\"\n },\n {\n \"name\": \"seLinuxOptions\",\n \"baseName\": \"seLinuxOptions\",\n \"type\": \"V1SELinuxOptions\"\n }\n];\nexports.V1SecurityContext = V1SecurityContext;\n/**\n* SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \\\"in all namespaces\\\". Self is a special case, because users should always be able to check whether they can perform an action\n*/\nclass V1SelfSubjectAccessReview {\n static getAttributeTypeMap() {\n return V1SelfSubjectAccessReview.attributeTypeMap;\n }\n}\nV1SelfSubjectAccessReview.discriminator = undefined;\nV1SelfSubjectAccessReview.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1SelfSubjectAccessReviewSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1SubjectAccessReviewStatus\"\n }\n];\nexports.V1SelfSubjectAccessReview = V1SelfSubjectAccessReview;\n/**\n* SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set\n*/\nclass V1SelfSubjectAccessReviewSpec {\n static getAttributeTypeMap() {\n return V1SelfSubjectAccessReviewSpec.attributeTypeMap;\n }\n}\nV1SelfSubjectAccessReviewSpec.discriminator = undefined;\nV1SelfSubjectAccessReviewSpec.attributeTypeMap = [\n {\n \"name\": \"nonResourceAttributes\",\n \"baseName\": \"nonResourceAttributes\",\n \"type\": \"V1NonResourceAttributes\"\n },\n {\n \"name\": \"resourceAttributes\",\n \"baseName\": \"resourceAttributes\",\n \"type\": \"V1ResourceAttributes\"\n }\n];\nexports.V1SelfSubjectAccessReviewSpec = V1SelfSubjectAccessReviewSpec;\n/**\n* SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.\n*/\nclass V1SelfSubjectRulesReview {\n static getAttributeTypeMap() {\n return V1SelfSubjectRulesReview.attributeTypeMap;\n }\n}\nV1SelfSubjectRulesReview.discriminator = undefined;\nV1SelfSubjectRulesReview.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1SelfSubjectRulesReviewSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1SubjectRulesReviewStatus\"\n }\n];\nexports.V1SelfSubjectRulesReview = V1SelfSubjectRulesReview;\nclass V1SelfSubjectRulesReviewSpec {\n static getAttributeTypeMap() {\n return V1SelfSubjectRulesReviewSpec.attributeTypeMap;\n }\n}\nV1SelfSubjectRulesReviewSpec.discriminator = undefined;\nV1SelfSubjectRulesReviewSpec.attributeTypeMap = [\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n }\n];\nexports.V1SelfSubjectRulesReviewSpec = V1SelfSubjectRulesReviewSpec;\n/**\n* ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.\n*/\nclass V1ServerAddressByClientCIDR {\n static getAttributeTypeMap() {\n return V1ServerAddressByClientCIDR.attributeTypeMap;\n }\n}\nV1ServerAddressByClientCIDR.discriminator = undefined;\nV1ServerAddressByClientCIDR.attributeTypeMap = [\n {\n \"name\": \"clientCIDR\",\n \"baseName\": \"clientCIDR\",\n \"type\": \"string\"\n },\n {\n \"name\": \"serverAddress\",\n \"baseName\": \"serverAddress\",\n \"type\": \"string\"\n }\n];\nexports.V1ServerAddressByClientCIDR = V1ServerAddressByClientCIDR;\n/**\n* Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.\n*/\nclass V1Service {\n static getAttributeTypeMap() {\n return V1Service.attributeTypeMap;\n }\n}\nV1Service.discriminator = undefined;\nV1Service.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1ServiceSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1ServiceStatus\"\n }\n];\nexports.V1Service = V1Service;\n/**\n* ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets\n*/\nclass V1ServiceAccount {\n static getAttributeTypeMap() {\n return V1ServiceAccount.attributeTypeMap;\n }\n}\nV1ServiceAccount.discriminator = undefined;\nV1ServiceAccount.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"automountServiceAccountToken\",\n \"baseName\": \"automountServiceAccountToken\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"imagePullSecrets\",\n \"baseName\": \"imagePullSecrets\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"secrets\",\n \"baseName\": \"secrets\",\n \"type\": \"Array\"\n }\n];\nexports.V1ServiceAccount = V1ServiceAccount;\n/**\n* ServiceAccountList is a list of ServiceAccount objects\n*/\nclass V1ServiceAccountList {\n static getAttributeTypeMap() {\n return V1ServiceAccountList.attributeTypeMap;\n }\n}\nV1ServiceAccountList.discriminator = undefined;\nV1ServiceAccountList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1ServiceAccountList = V1ServiceAccountList;\n/**\n* ServiceAccountTokenProjection represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise).\n*/\nclass V1ServiceAccountTokenProjection {\n static getAttributeTypeMap() {\n return V1ServiceAccountTokenProjection.attributeTypeMap;\n }\n}\nV1ServiceAccountTokenProjection.discriminator = undefined;\nV1ServiceAccountTokenProjection.attributeTypeMap = [\n {\n \"name\": \"audience\",\n \"baseName\": \"audience\",\n \"type\": \"string\"\n },\n {\n \"name\": \"expirationSeconds\",\n \"baseName\": \"expirationSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n }\n];\nexports.V1ServiceAccountTokenProjection = V1ServiceAccountTokenProjection;\n/**\n* ServiceList holds a list of services.\n*/\nclass V1ServiceList {\n static getAttributeTypeMap() {\n return V1ServiceList.attributeTypeMap;\n }\n}\nV1ServiceList.discriminator = undefined;\nV1ServiceList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1ServiceList = V1ServiceList;\n/**\n* ServicePort contains information on service's port.\n*/\nclass V1ServicePort {\n static getAttributeTypeMap() {\n return V1ServicePort.attributeTypeMap;\n }\n}\nV1ServicePort.discriminator = undefined;\nV1ServicePort.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nodePort\",\n \"baseName\": \"nodePort\",\n \"type\": \"number\"\n },\n {\n \"name\": \"port\",\n \"baseName\": \"port\",\n \"type\": \"number\"\n },\n {\n \"name\": \"protocol\",\n \"baseName\": \"protocol\",\n \"type\": \"string\"\n },\n {\n \"name\": \"targetPort\",\n \"baseName\": \"targetPort\",\n \"type\": \"any\"\n }\n];\nexports.V1ServicePort = V1ServicePort;\n/**\n* ServiceReference holds a reference to Service.legacy.k8s.io\n*/\nclass V1ServiceReference {\n static getAttributeTypeMap() {\n return V1ServiceReference.attributeTypeMap;\n }\n}\nV1ServiceReference.discriminator = undefined;\nV1ServiceReference.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n }\n];\nexports.V1ServiceReference = V1ServiceReference;\n/**\n* ServiceSpec describes the attributes that a user creates on a service.\n*/\nclass V1ServiceSpec {\n static getAttributeTypeMap() {\n return V1ServiceSpec.attributeTypeMap;\n }\n}\nV1ServiceSpec.discriminator = undefined;\nV1ServiceSpec.attributeTypeMap = [\n {\n \"name\": \"clusterIP\",\n \"baseName\": \"clusterIP\",\n \"type\": \"string\"\n },\n {\n \"name\": \"externalIPs\",\n \"baseName\": \"externalIPs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"externalName\",\n \"baseName\": \"externalName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"externalTrafficPolicy\",\n \"baseName\": \"externalTrafficPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"healthCheckNodePort\",\n \"baseName\": \"healthCheckNodePort\",\n \"type\": \"number\"\n },\n {\n \"name\": \"loadBalancerIP\",\n \"baseName\": \"loadBalancerIP\",\n \"type\": \"string\"\n },\n {\n \"name\": \"loadBalancerSourceRanges\",\n \"baseName\": \"loadBalancerSourceRanges\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"ports\",\n \"baseName\": \"ports\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"publishNotReadyAddresses\",\n \"baseName\": \"publishNotReadyAddresses\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"sessionAffinity\",\n \"baseName\": \"sessionAffinity\",\n \"type\": \"string\"\n },\n {\n \"name\": \"sessionAffinityConfig\",\n \"baseName\": \"sessionAffinityConfig\",\n \"type\": \"V1SessionAffinityConfig\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1ServiceSpec = V1ServiceSpec;\n/**\n* ServiceStatus represents the current status of a service.\n*/\nclass V1ServiceStatus {\n static getAttributeTypeMap() {\n return V1ServiceStatus.attributeTypeMap;\n }\n}\nV1ServiceStatus.discriminator = undefined;\nV1ServiceStatus.attributeTypeMap = [\n {\n \"name\": \"loadBalancer\",\n \"baseName\": \"loadBalancer\",\n \"type\": \"V1LoadBalancerStatus\"\n }\n];\nexports.V1ServiceStatus = V1ServiceStatus;\n/**\n* SessionAffinityConfig represents the configurations of session affinity.\n*/\nclass V1SessionAffinityConfig {\n static getAttributeTypeMap() {\n return V1SessionAffinityConfig.attributeTypeMap;\n }\n}\nV1SessionAffinityConfig.discriminator = undefined;\nV1SessionAffinityConfig.attributeTypeMap = [\n {\n \"name\": \"clientIP\",\n \"baseName\": \"clientIP\",\n \"type\": \"V1ClientIPConfig\"\n }\n];\nexports.V1SessionAffinityConfig = V1SessionAffinityConfig;\n/**\n* StatefulSet represents a set of pods with consistent identities. Identities are defined as: - Network: A single stable DNS and hostname. - Storage: As many VolumeClaims as requested. The StatefulSet guarantees that a given network identity will always map to the same storage identity.\n*/\nclass V1StatefulSet {\n static getAttributeTypeMap() {\n return V1StatefulSet.attributeTypeMap;\n }\n}\nV1StatefulSet.discriminator = undefined;\nV1StatefulSet.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1StatefulSetSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1StatefulSetStatus\"\n }\n];\nexports.V1StatefulSet = V1StatefulSet;\n/**\n* StatefulSetCondition describes the state of a statefulset at a certain point.\n*/\nclass V1StatefulSetCondition {\n static getAttributeTypeMap() {\n return V1StatefulSetCondition.attributeTypeMap;\n }\n}\nV1StatefulSetCondition.discriminator = undefined;\nV1StatefulSetCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1StatefulSetCondition = V1StatefulSetCondition;\n/**\n* StatefulSetList is a collection of StatefulSets.\n*/\nclass V1StatefulSetList {\n static getAttributeTypeMap() {\n return V1StatefulSetList.attributeTypeMap;\n }\n}\nV1StatefulSetList.discriminator = undefined;\nV1StatefulSetList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1StatefulSetList = V1StatefulSetList;\n/**\n* A StatefulSetSpec is the specification of a StatefulSet.\n*/\nclass V1StatefulSetSpec {\n static getAttributeTypeMap() {\n return V1StatefulSetSpec.attributeTypeMap;\n }\n}\nV1StatefulSetSpec.discriminator = undefined;\nV1StatefulSetSpec.attributeTypeMap = [\n {\n \"name\": \"podManagementPolicy\",\n \"baseName\": \"podManagementPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"revisionHistoryLimit\",\n \"baseName\": \"revisionHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"serviceName\",\n \"baseName\": \"serviceName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n },\n {\n \"name\": \"updateStrategy\",\n \"baseName\": \"updateStrategy\",\n \"type\": \"V1StatefulSetUpdateStrategy\"\n },\n {\n \"name\": \"volumeClaimTemplates\",\n \"baseName\": \"volumeClaimTemplates\",\n \"type\": \"Array\"\n }\n];\nexports.V1StatefulSetSpec = V1StatefulSetSpec;\n/**\n* StatefulSetStatus represents the current state of a StatefulSet.\n*/\nclass V1StatefulSetStatus {\n static getAttributeTypeMap() {\n return V1StatefulSetStatus.attributeTypeMap;\n }\n}\nV1StatefulSetStatus.discriminator = undefined;\nV1StatefulSetStatus.attributeTypeMap = [\n {\n \"name\": \"collisionCount\",\n \"baseName\": \"collisionCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"currentReplicas\",\n \"baseName\": \"currentReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"currentRevision\",\n \"baseName\": \"currentRevision\",\n \"type\": \"string\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readyReplicas\",\n \"baseName\": \"readyReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"updateRevision\",\n \"baseName\": \"updateRevision\",\n \"type\": \"string\"\n },\n {\n \"name\": \"updatedReplicas\",\n \"baseName\": \"updatedReplicas\",\n \"type\": \"number\"\n }\n];\nexports.V1StatefulSetStatus = V1StatefulSetStatus;\n/**\n* StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.\n*/\nclass V1StatefulSetUpdateStrategy {\n static getAttributeTypeMap() {\n return V1StatefulSetUpdateStrategy.attributeTypeMap;\n }\n}\nV1StatefulSetUpdateStrategy.discriminator = undefined;\nV1StatefulSetUpdateStrategy.attributeTypeMap = [\n {\n \"name\": \"rollingUpdate\",\n \"baseName\": \"rollingUpdate\",\n \"type\": \"V1RollingUpdateStatefulSetStrategy\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1StatefulSetUpdateStrategy = V1StatefulSetUpdateStrategy;\n/**\n* Status is a return value for calls that don't return other objects.\n*/\nclass V1Status {\n static getAttributeTypeMap() {\n return V1Status.attributeTypeMap;\n }\n}\nV1Status.discriminator = undefined;\nV1Status.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"code\",\n \"baseName\": \"code\",\n \"type\": \"number\"\n },\n {\n \"name\": \"details\",\n \"baseName\": \"details\",\n \"type\": \"V1StatusDetails\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n }\n];\nexports.V1Status = V1Status;\n/**\n* StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.\n*/\nclass V1StatusCause {\n static getAttributeTypeMap() {\n return V1StatusCause.attributeTypeMap;\n }\n}\nV1StatusCause.discriminator = undefined;\nV1StatusCause.attributeTypeMap = [\n {\n \"name\": \"field\",\n \"baseName\": \"field\",\n \"type\": \"string\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n }\n];\nexports.V1StatusCause = V1StatusCause;\n/**\n* StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.\n*/\nclass V1StatusDetails {\n static getAttributeTypeMap() {\n return V1StatusDetails.attributeTypeMap;\n }\n}\nV1StatusDetails.discriminator = undefined;\nV1StatusDetails.attributeTypeMap = [\n {\n \"name\": \"causes\",\n \"baseName\": \"causes\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"group\",\n \"baseName\": \"group\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"retryAfterSeconds\",\n \"baseName\": \"retryAfterSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n }\n];\nexports.V1StatusDetails = V1StatusDetails;\n/**\n* StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned. StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.\n*/\nclass V1StorageClass {\n static getAttributeTypeMap() {\n return V1StorageClass.attributeTypeMap;\n }\n}\nV1StorageClass.discriminator = undefined;\nV1StorageClass.attributeTypeMap = [\n {\n \"name\": \"allowVolumeExpansion\",\n \"baseName\": \"allowVolumeExpansion\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"allowedTopologies\",\n \"baseName\": \"allowedTopologies\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"mountOptions\",\n \"baseName\": \"mountOptions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"parameters\",\n \"baseName\": \"parameters\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"provisioner\",\n \"baseName\": \"provisioner\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reclaimPolicy\",\n \"baseName\": \"reclaimPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumeBindingMode\",\n \"baseName\": \"volumeBindingMode\",\n \"type\": \"string\"\n }\n];\nexports.V1StorageClass = V1StorageClass;\n/**\n* StorageClassList is a collection of storage classes.\n*/\nclass V1StorageClassList {\n static getAttributeTypeMap() {\n return V1StorageClassList.attributeTypeMap;\n }\n}\nV1StorageClassList.discriminator = undefined;\nV1StorageClassList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1StorageClassList = V1StorageClassList;\n/**\n* Represents a StorageOS persistent volume resource.\n*/\nclass V1StorageOSPersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1StorageOSPersistentVolumeSource.attributeTypeMap;\n }\n}\nV1StorageOSPersistentVolumeSource.discriminator = undefined;\nV1StorageOSPersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1ObjectReference\"\n },\n {\n \"name\": \"volumeName\",\n \"baseName\": \"volumeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumeNamespace\",\n \"baseName\": \"volumeNamespace\",\n \"type\": \"string\"\n }\n];\nexports.V1StorageOSPersistentVolumeSource = V1StorageOSPersistentVolumeSource;\n/**\n* Represents a StorageOS persistent volume resource.\n*/\nclass V1StorageOSVolumeSource {\n static getAttributeTypeMap() {\n return V1StorageOSVolumeSource.attributeTypeMap;\n }\n}\nV1StorageOSVolumeSource.discriminator = undefined;\nV1StorageOSVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1LocalObjectReference\"\n },\n {\n \"name\": \"volumeName\",\n \"baseName\": \"volumeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumeNamespace\",\n \"baseName\": \"volumeNamespace\",\n \"type\": \"string\"\n }\n];\nexports.V1StorageOSVolumeSource = V1StorageOSVolumeSource;\n/**\n* Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.\n*/\nclass V1Subject {\n static getAttributeTypeMap() {\n return V1Subject.attributeTypeMap;\n }\n}\nV1Subject.discriminator = undefined;\nV1Subject.attributeTypeMap = [\n {\n \"name\": \"apiGroup\",\n \"baseName\": \"apiGroup\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n }\n];\nexports.V1Subject = V1Subject;\n/**\n* SubjectAccessReview checks whether or not a user or group can perform an action.\n*/\nclass V1SubjectAccessReview {\n static getAttributeTypeMap() {\n return V1SubjectAccessReview.attributeTypeMap;\n }\n}\nV1SubjectAccessReview.discriminator = undefined;\nV1SubjectAccessReview.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1SubjectAccessReviewSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1SubjectAccessReviewStatus\"\n }\n];\nexports.V1SubjectAccessReview = V1SubjectAccessReview;\n/**\n* SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set\n*/\nclass V1SubjectAccessReviewSpec {\n static getAttributeTypeMap() {\n return V1SubjectAccessReviewSpec.attributeTypeMap;\n }\n}\nV1SubjectAccessReviewSpec.discriminator = undefined;\nV1SubjectAccessReviewSpec.attributeTypeMap = [\n {\n \"name\": \"extra\",\n \"baseName\": \"extra\",\n \"type\": \"{ [key: string]: Array; }\"\n },\n {\n \"name\": \"groups\",\n \"baseName\": \"groups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"nonResourceAttributes\",\n \"baseName\": \"nonResourceAttributes\",\n \"type\": \"V1NonResourceAttributes\"\n },\n {\n \"name\": \"resourceAttributes\",\n \"baseName\": \"resourceAttributes\",\n \"type\": \"V1ResourceAttributes\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"string\"\n }\n];\nexports.V1SubjectAccessReviewSpec = V1SubjectAccessReviewSpec;\n/**\n* SubjectAccessReviewStatus\n*/\nclass V1SubjectAccessReviewStatus {\n static getAttributeTypeMap() {\n return V1SubjectAccessReviewStatus.attributeTypeMap;\n }\n}\nV1SubjectAccessReviewStatus.discriminator = undefined;\nV1SubjectAccessReviewStatus.attributeTypeMap = [\n {\n \"name\": \"allowed\",\n \"baseName\": \"allowed\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"denied\",\n \"baseName\": \"denied\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"evaluationError\",\n \"baseName\": \"evaluationError\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n }\n];\nexports.V1SubjectAccessReviewStatus = V1SubjectAccessReviewStatus;\n/**\n* SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete.\n*/\nclass V1SubjectRulesReviewStatus {\n static getAttributeTypeMap() {\n return V1SubjectRulesReviewStatus.attributeTypeMap;\n }\n}\nV1SubjectRulesReviewStatus.discriminator = undefined;\nV1SubjectRulesReviewStatus.attributeTypeMap = [\n {\n \"name\": \"evaluationError\",\n \"baseName\": \"evaluationError\",\n \"type\": \"string\"\n },\n {\n \"name\": \"incomplete\",\n \"baseName\": \"incomplete\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"nonResourceRules\",\n \"baseName\": \"nonResourceRules\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resourceRules\",\n \"baseName\": \"resourceRules\",\n \"type\": \"Array\"\n }\n];\nexports.V1SubjectRulesReviewStatus = V1SubjectRulesReviewStatus;\n/**\n* Sysctl defines a kernel parameter to be set\n*/\nclass V1Sysctl {\n static getAttributeTypeMap() {\n return V1Sysctl.attributeTypeMap;\n }\n}\nV1Sysctl.discriminator = undefined;\nV1Sysctl.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"string\"\n }\n];\nexports.V1Sysctl = V1Sysctl;\n/**\n* TCPSocketAction describes an action based on opening a socket\n*/\nclass V1TCPSocketAction {\n static getAttributeTypeMap() {\n return V1TCPSocketAction.attributeTypeMap;\n }\n}\nV1TCPSocketAction.discriminator = undefined;\nV1TCPSocketAction.attributeTypeMap = [\n {\n \"name\": \"host\",\n \"baseName\": \"host\",\n \"type\": \"string\"\n },\n {\n \"name\": \"port\",\n \"baseName\": \"port\",\n \"type\": \"any\"\n }\n];\nexports.V1TCPSocketAction = V1TCPSocketAction;\n/**\n* The node this Taint is attached to has the \\\"effect\\\" on any pod that does not tolerate the Taint.\n*/\nclass V1Taint {\n static getAttributeTypeMap() {\n return V1Taint.attributeTypeMap;\n }\n}\nV1Taint.discriminator = undefined;\nV1Taint.attributeTypeMap = [\n {\n \"name\": \"effect\",\n \"baseName\": \"effect\",\n \"type\": \"string\"\n },\n {\n \"name\": \"key\",\n \"baseName\": \"key\",\n \"type\": \"string\"\n },\n {\n \"name\": \"timeAdded\",\n \"baseName\": \"timeAdded\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"string\"\n }\n];\nexports.V1Taint = V1Taint;\n/**\n* TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.\n*/\nclass V1TokenReview {\n static getAttributeTypeMap() {\n return V1TokenReview.attributeTypeMap;\n }\n}\nV1TokenReview.discriminator = undefined;\nV1TokenReview.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1TokenReviewSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1TokenReviewStatus\"\n }\n];\nexports.V1TokenReview = V1TokenReview;\n/**\n* TokenReviewSpec is a description of the token authentication request.\n*/\nclass V1TokenReviewSpec {\n static getAttributeTypeMap() {\n return V1TokenReviewSpec.attributeTypeMap;\n }\n}\nV1TokenReviewSpec.discriminator = undefined;\nV1TokenReviewSpec.attributeTypeMap = [\n {\n \"name\": \"audiences\",\n \"baseName\": \"audiences\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"token\",\n \"baseName\": \"token\",\n \"type\": \"string\"\n }\n];\nexports.V1TokenReviewSpec = V1TokenReviewSpec;\n/**\n* TokenReviewStatus is the result of the token authentication request.\n*/\nclass V1TokenReviewStatus {\n static getAttributeTypeMap() {\n return V1TokenReviewStatus.attributeTypeMap;\n }\n}\nV1TokenReviewStatus.discriminator = undefined;\nV1TokenReviewStatus.attributeTypeMap = [\n {\n \"name\": \"audiences\",\n \"baseName\": \"audiences\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"authenticated\",\n \"baseName\": \"authenticated\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"error\",\n \"baseName\": \"error\",\n \"type\": \"string\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"V1UserInfo\"\n }\n];\nexports.V1TokenReviewStatus = V1TokenReviewStatus;\n/**\n* The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator .\n*/\nclass V1Toleration {\n static getAttributeTypeMap() {\n return V1Toleration.attributeTypeMap;\n }\n}\nV1Toleration.discriminator = undefined;\nV1Toleration.attributeTypeMap = [\n {\n \"name\": \"effect\",\n \"baseName\": \"effect\",\n \"type\": \"string\"\n },\n {\n \"name\": \"key\",\n \"baseName\": \"key\",\n \"type\": \"string\"\n },\n {\n \"name\": \"operator\",\n \"baseName\": \"operator\",\n \"type\": \"string\"\n },\n {\n \"name\": \"tolerationSeconds\",\n \"baseName\": \"tolerationSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"string\"\n }\n];\nexports.V1Toleration = V1Toleration;\n/**\n* A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future.\n*/\nclass V1TopologySelectorLabelRequirement {\n static getAttributeTypeMap() {\n return V1TopologySelectorLabelRequirement.attributeTypeMap;\n }\n}\nV1TopologySelectorLabelRequirement.discriminator = undefined;\nV1TopologySelectorLabelRequirement.attributeTypeMap = [\n {\n \"name\": \"key\",\n \"baseName\": \"key\",\n \"type\": \"string\"\n },\n {\n \"name\": \"values\",\n \"baseName\": \"values\",\n \"type\": \"Array\"\n }\n];\nexports.V1TopologySelectorLabelRequirement = V1TopologySelectorLabelRequirement;\n/**\n* A topology selector term represents the result of label queries. A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future.\n*/\nclass V1TopologySelectorTerm {\n static getAttributeTypeMap() {\n return V1TopologySelectorTerm.attributeTypeMap;\n }\n}\nV1TopologySelectorTerm.discriminator = undefined;\nV1TopologySelectorTerm.attributeTypeMap = [\n {\n \"name\": \"matchLabelExpressions\",\n \"baseName\": \"matchLabelExpressions\",\n \"type\": \"Array\"\n }\n];\nexports.V1TopologySelectorTerm = V1TopologySelectorTerm;\n/**\n* TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.\n*/\nclass V1TypedLocalObjectReference {\n static getAttributeTypeMap() {\n return V1TypedLocalObjectReference.attributeTypeMap;\n }\n}\nV1TypedLocalObjectReference.discriminator = undefined;\nV1TypedLocalObjectReference.attributeTypeMap = [\n {\n \"name\": \"apiGroup\",\n \"baseName\": \"apiGroup\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\nexports.V1TypedLocalObjectReference = V1TypedLocalObjectReference;\n/**\n* UserInfo holds the information about the user needed to implement the user.Info interface.\n*/\nclass V1UserInfo {\n static getAttributeTypeMap() {\n return V1UserInfo.attributeTypeMap;\n }\n}\nV1UserInfo.discriminator = undefined;\nV1UserInfo.attributeTypeMap = [\n {\n \"name\": \"extra\",\n \"baseName\": \"extra\",\n \"type\": \"{ [key: string]: Array; }\"\n },\n {\n \"name\": \"groups\",\n \"baseName\": \"groups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n },\n {\n \"name\": \"username\",\n \"baseName\": \"username\",\n \"type\": \"string\"\n }\n];\nexports.V1UserInfo = V1UserInfo;\n/**\n* Volume represents a named volume in a pod that may be accessed by any container in the pod.\n*/\nclass V1Volume {\n static getAttributeTypeMap() {\n return V1Volume.attributeTypeMap;\n }\n}\nV1Volume.discriminator = undefined;\nV1Volume.attributeTypeMap = [\n {\n \"name\": \"awsElasticBlockStore\",\n \"baseName\": \"awsElasticBlockStore\",\n \"type\": \"V1AWSElasticBlockStoreVolumeSource\"\n },\n {\n \"name\": \"azureDisk\",\n \"baseName\": \"azureDisk\",\n \"type\": \"V1AzureDiskVolumeSource\"\n },\n {\n \"name\": \"azureFile\",\n \"baseName\": \"azureFile\",\n \"type\": \"V1AzureFileVolumeSource\"\n },\n {\n \"name\": \"cephfs\",\n \"baseName\": \"cephfs\",\n \"type\": \"V1CephFSVolumeSource\"\n },\n {\n \"name\": \"cinder\",\n \"baseName\": \"cinder\",\n \"type\": \"V1CinderVolumeSource\"\n },\n {\n \"name\": \"configMap\",\n \"baseName\": \"configMap\",\n \"type\": \"V1ConfigMapVolumeSource\"\n },\n {\n \"name\": \"downwardAPI\",\n \"baseName\": \"downwardAPI\",\n \"type\": \"V1DownwardAPIVolumeSource\"\n },\n {\n \"name\": \"emptyDir\",\n \"baseName\": \"emptyDir\",\n \"type\": \"V1EmptyDirVolumeSource\"\n },\n {\n \"name\": \"fc\",\n \"baseName\": \"fc\",\n \"type\": \"V1FCVolumeSource\"\n },\n {\n \"name\": \"flexVolume\",\n \"baseName\": \"flexVolume\",\n \"type\": \"V1FlexVolumeSource\"\n },\n {\n \"name\": \"flocker\",\n \"baseName\": \"flocker\",\n \"type\": \"V1FlockerVolumeSource\"\n },\n {\n \"name\": \"gcePersistentDisk\",\n \"baseName\": \"gcePersistentDisk\",\n \"type\": \"V1GCEPersistentDiskVolumeSource\"\n },\n {\n \"name\": \"gitRepo\",\n \"baseName\": \"gitRepo\",\n \"type\": \"V1GitRepoVolumeSource\"\n },\n {\n \"name\": \"glusterfs\",\n \"baseName\": \"glusterfs\",\n \"type\": \"V1GlusterfsVolumeSource\"\n },\n {\n \"name\": \"hostPath\",\n \"baseName\": \"hostPath\",\n \"type\": \"V1HostPathVolumeSource\"\n },\n {\n \"name\": \"iscsi\",\n \"baseName\": \"iscsi\",\n \"type\": \"V1ISCSIVolumeSource\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nfs\",\n \"baseName\": \"nfs\",\n \"type\": \"V1NFSVolumeSource\"\n },\n {\n \"name\": \"persistentVolumeClaim\",\n \"baseName\": \"persistentVolumeClaim\",\n \"type\": \"V1PersistentVolumeClaimVolumeSource\"\n },\n {\n \"name\": \"photonPersistentDisk\",\n \"baseName\": \"photonPersistentDisk\",\n \"type\": \"V1PhotonPersistentDiskVolumeSource\"\n },\n {\n \"name\": \"portworxVolume\",\n \"baseName\": \"portworxVolume\",\n \"type\": \"V1PortworxVolumeSource\"\n },\n {\n \"name\": \"projected\",\n \"baseName\": \"projected\",\n \"type\": \"V1ProjectedVolumeSource\"\n },\n {\n \"name\": \"quobyte\",\n \"baseName\": \"quobyte\",\n \"type\": \"V1QuobyteVolumeSource\"\n },\n {\n \"name\": \"rbd\",\n \"baseName\": \"rbd\",\n \"type\": \"V1RBDVolumeSource\"\n },\n {\n \"name\": \"scaleIO\",\n \"baseName\": \"scaleIO\",\n \"type\": \"V1ScaleIOVolumeSource\"\n },\n {\n \"name\": \"secret\",\n \"baseName\": \"secret\",\n \"type\": \"V1SecretVolumeSource\"\n },\n {\n \"name\": \"storageos\",\n \"baseName\": \"storageos\",\n \"type\": \"V1StorageOSVolumeSource\"\n },\n {\n \"name\": \"vsphereVolume\",\n \"baseName\": \"vsphereVolume\",\n \"type\": \"V1VsphereVirtualDiskVolumeSource\"\n }\n];\nexports.V1Volume = V1Volume;\n/**\n* VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. VolumeAttachment objects are non-namespaced.\n*/\nclass V1VolumeAttachment {\n static getAttributeTypeMap() {\n return V1VolumeAttachment.attributeTypeMap;\n }\n}\nV1VolumeAttachment.discriminator = undefined;\nV1VolumeAttachment.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1VolumeAttachmentSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1VolumeAttachmentStatus\"\n }\n];\nexports.V1VolumeAttachment = V1VolumeAttachment;\n/**\n* VolumeAttachmentList is a collection of VolumeAttachment objects.\n*/\nclass V1VolumeAttachmentList {\n static getAttributeTypeMap() {\n return V1VolumeAttachmentList.attributeTypeMap;\n }\n}\nV1VolumeAttachmentList.discriminator = undefined;\nV1VolumeAttachmentList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1VolumeAttachmentList = V1VolumeAttachmentList;\n/**\n* VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.\n*/\nclass V1VolumeAttachmentSource {\n static getAttributeTypeMap() {\n return V1VolumeAttachmentSource.attributeTypeMap;\n }\n}\nV1VolumeAttachmentSource.discriminator = undefined;\nV1VolumeAttachmentSource.attributeTypeMap = [\n {\n \"name\": \"persistentVolumeName\",\n \"baseName\": \"persistentVolumeName\",\n \"type\": \"string\"\n }\n];\nexports.V1VolumeAttachmentSource = V1VolumeAttachmentSource;\n/**\n* VolumeAttachmentSpec is the specification of a VolumeAttachment request.\n*/\nclass V1VolumeAttachmentSpec {\n static getAttributeTypeMap() {\n return V1VolumeAttachmentSpec.attributeTypeMap;\n }\n}\nV1VolumeAttachmentSpec.discriminator = undefined;\nV1VolumeAttachmentSpec.attributeTypeMap = [\n {\n \"name\": \"attacher\",\n \"baseName\": \"attacher\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nodeName\",\n \"baseName\": \"nodeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"source\",\n \"baseName\": \"source\",\n \"type\": \"V1VolumeAttachmentSource\"\n }\n];\nexports.V1VolumeAttachmentSpec = V1VolumeAttachmentSpec;\n/**\n* VolumeAttachmentStatus is the status of a VolumeAttachment request.\n*/\nclass V1VolumeAttachmentStatus {\n static getAttributeTypeMap() {\n return V1VolumeAttachmentStatus.attributeTypeMap;\n }\n}\nV1VolumeAttachmentStatus.discriminator = undefined;\nV1VolumeAttachmentStatus.attributeTypeMap = [\n {\n \"name\": \"attachError\",\n \"baseName\": \"attachError\",\n \"type\": \"V1VolumeError\"\n },\n {\n \"name\": \"attached\",\n \"baseName\": \"attached\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"attachmentMetadata\",\n \"baseName\": \"attachmentMetadata\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"detachError\",\n \"baseName\": \"detachError\",\n \"type\": \"V1VolumeError\"\n }\n];\nexports.V1VolumeAttachmentStatus = V1VolumeAttachmentStatus;\n/**\n* volumeDevice describes a mapping of a raw block device within a container.\n*/\nclass V1VolumeDevice {\n static getAttributeTypeMap() {\n return V1VolumeDevice.attributeTypeMap;\n }\n}\nV1VolumeDevice.discriminator = undefined;\nV1VolumeDevice.attributeTypeMap = [\n {\n \"name\": \"devicePath\",\n \"baseName\": \"devicePath\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\nexports.V1VolumeDevice = V1VolumeDevice;\n/**\n* VolumeError captures an error encountered during a volume operation.\n*/\nclass V1VolumeError {\n static getAttributeTypeMap() {\n return V1VolumeError.attributeTypeMap;\n }\n}\nV1VolumeError.discriminator = undefined;\nV1VolumeError.attributeTypeMap = [\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"time\",\n \"baseName\": \"time\",\n \"type\": \"Date\"\n }\n];\nexports.V1VolumeError = V1VolumeError;\n/**\n* VolumeMount describes a mounting of a Volume within a container.\n*/\nclass V1VolumeMount {\n static getAttributeTypeMap() {\n return V1VolumeMount.attributeTypeMap;\n }\n}\nV1VolumeMount.discriminator = undefined;\nV1VolumeMount.attributeTypeMap = [\n {\n \"name\": \"mountPath\",\n \"baseName\": \"mountPath\",\n \"type\": \"string\"\n },\n {\n \"name\": \"mountPropagation\",\n \"baseName\": \"mountPropagation\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"subPath\",\n \"baseName\": \"subPath\",\n \"type\": \"string\"\n }\n];\nexports.V1VolumeMount = V1VolumeMount;\n/**\n* VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.\n*/\nclass V1VolumeNodeAffinity {\n static getAttributeTypeMap() {\n return V1VolumeNodeAffinity.attributeTypeMap;\n }\n}\nV1VolumeNodeAffinity.discriminator = undefined;\nV1VolumeNodeAffinity.attributeTypeMap = [\n {\n \"name\": \"required\",\n \"baseName\": \"required\",\n \"type\": \"V1NodeSelector\"\n }\n];\nexports.V1VolumeNodeAffinity = V1VolumeNodeAffinity;\n/**\n* Projection that may be projected along with other supported volume types\n*/\nclass V1VolumeProjection {\n static getAttributeTypeMap() {\n return V1VolumeProjection.attributeTypeMap;\n }\n}\nV1VolumeProjection.discriminator = undefined;\nV1VolumeProjection.attributeTypeMap = [\n {\n \"name\": \"configMap\",\n \"baseName\": \"configMap\",\n \"type\": \"V1ConfigMapProjection\"\n },\n {\n \"name\": \"downwardAPI\",\n \"baseName\": \"downwardAPI\",\n \"type\": \"V1DownwardAPIProjection\"\n },\n {\n \"name\": \"secret\",\n \"baseName\": \"secret\",\n \"type\": \"V1SecretProjection\"\n },\n {\n \"name\": \"serviceAccountToken\",\n \"baseName\": \"serviceAccountToken\",\n \"type\": \"V1ServiceAccountTokenProjection\"\n }\n];\nexports.V1VolumeProjection = V1VolumeProjection;\n/**\n* Represents a vSphere volume resource.\n*/\nclass V1VsphereVirtualDiskVolumeSource {\n static getAttributeTypeMap() {\n return V1VsphereVirtualDiskVolumeSource.attributeTypeMap;\n }\n}\nV1VsphereVirtualDiskVolumeSource.discriminator = undefined;\nV1VsphereVirtualDiskVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"storagePolicyID\",\n \"baseName\": \"storagePolicyID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"storagePolicyName\",\n \"baseName\": \"storagePolicyName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumePath\",\n \"baseName\": \"volumePath\",\n \"type\": \"string\"\n }\n];\nexports.V1VsphereVirtualDiskVolumeSource = V1VsphereVirtualDiskVolumeSource;\n/**\n* Event represents a single event to a watched resource.\n*/\nclass V1WatchEvent {\n static getAttributeTypeMap() {\n return V1WatchEvent.attributeTypeMap;\n }\n}\nV1WatchEvent.discriminator = undefined;\nV1WatchEvent.attributeTypeMap = [\n {\n \"name\": \"object\",\n \"baseName\": \"object\",\n \"type\": \"RuntimeRawExtension\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1WatchEvent = V1WatchEvent;\n/**\n* The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)\n*/\nclass V1WeightedPodAffinityTerm {\n static getAttributeTypeMap() {\n return V1WeightedPodAffinityTerm.attributeTypeMap;\n }\n}\nV1WeightedPodAffinityTerm.discriminator = undefined;\nV1WeightedPodAffinityTerm.attributeTypeMap = [\n {\n \"name\": \"podAffinityTerm\",\n \"baseName\": \"podAffinityTerm\",\n \"type\": \"V1PodAffinityTerm\"\n },\n {\n \"name\": \"weight\",\n \"baseName\": \"weight\",\n \"type\": \"number\"\n }\n];\nexports.V1WeightedPodAffinityTerm = V1WeightedPodAffinityTerm;\n/**\n* AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole\n*/\nclass V1alpha1AggregationRule {\n static getAttributeTypeMap() {\n return V1alpha1AggregationRule.attributeTypeMap;\n }\n}\nV1alpha1AggregationRule.discriminator = undefined;\nV1alpha1AggregationRule.attributeTypeMap = [\n {\n \"name\": \"clusterRoleSelectors\",\n \"baseName\": \"clusterRoleSelectors\",\n \"type\": \"Array\"\n }\n];\nexports.V1alpha1AggregationRule = V1alpha1AggregationRule;\n/**\n* AuditSink represents a cluster level audit sink\n*/\nclass V1alpha1AuditSink {\n static getAttributeTypeMap() {\n return V1alpha1AuditSink.attributeTypeMap;\n }\n}\nV1alpha1AuditSink.discriminator = undefined;\nV1alpha1AuditSink.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1alpha1AuditSinkSpec\"\n }\n];\nexports.V1alpha1AuditSink = V1alpha1AuditSink;\n/**\n* AuditSinkList is a list of AuditSink items.\n*/\nclass V1alpha1AuditSinkList {\n static getAttributeTypeMap() {\n return V1alpha1AuditSinkList.attributeTypeMap;\n }\n}\nV1alpha1AuditSinkList.discriminator = undefined;\nV1alpha1AuditSinkList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1alpha1AuditSinkList = V1alpha1AuditSinkList;\n/**\n* AuditSinkSpec holds the spec for the audit sink\n*/\nclass V1alpha1AuditSinkSpec {\n static getAttributeTypeMap() {\n return V1alpha1AuditSinkSpec.attributeTypeMap;\n }\n}\nV1alpha1AuditSinkSpec.discriminator = undefined;\nV1alpha1AuditSinkSpec.attributeTypeMap = [\n {\n \"name\": \"policy\",\n \"baseName\": \"policy\",\n \"type\": \"V1alpha1Policy\"\n },\n {\n \"name\": \"webhook\",\n \"baseName\": \"webhook\",\n \"type\": \"V1alpha1Webhook\"\n }\n];\nexports.V1alpha1AuditSinkSpec = V1alpha1AuditSinkSpec;\n/**\n* ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.\n*/\nclass V1alpha1ClusterRole {\n static getAttributeTypeMap() {\n return V1alpha1ClusterRole.attributeTypeMap;\n }\n}\nV1alpha1ClusterRole.discriminator = undefined;\nV1alpha1ClusterRole.attributeTypeMap = [\n {\n \"name\": \"aggregationRule\",\n \"baseName\": \"aggregationRule\",\n \"type\": \"V1alpha1AggregationRule\"\n },\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"rules\",\n \"baseName\": \"rules\",\n \"type\": \"Array\"\n }\n];\nexports.V1alpha1ClusterRole = V1alpha1ClusterRole;\n/**\n* ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.\n*/\nclass V1alpha1ClusterRoleBinding {\n static getAttributeTypeMap() {\n return V1alpha1ClusterRoleBinding.attributeTypeMap;\n }\n}\nV1alpha1ClusterRoleBinding.discriminator = undefined;\nV1alpha1ClusterRoleBinding.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"roleRef\",\n \"baseName\": \"roleRef\",\n \"type\": \"V1alpha1RoleRef\"\n },\n {\n \"name\": \"subjects\",\n \"baseName\": \"subjects\",\n \"type\": \"Array\"\n }\n];\nexports.V1alpha1ClusterRoleBinding = V1alpha1ClusterRoleBinding;\n/**\n* ClusterRoleBindingList is a collection of ClusterRoleBindings\n*/\nclass V1alpha1ClusterRoleBindingList {\n static getAttributeTypeMap() {\n return V1alpha1ClusterRoleBindingList.attributeTypeMap;\n }\n}\nV1alpha1ClusterRoleBindingList.discriminator = undefined;\nV1alpha1ClusterRoleBindingList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1alpha1ClusterRoleBindingList = V1alpha1ClusterRoleBindingList;\n/**\n* ClusterRoleList is a collection of ClusterRoles\n*/\nclass V1alpha1ClusterRoleList {\n static getAttributeTypeMap() {\n return V1alpha1ClusterRoleList.attributeTypeMap;\n }\n}\nV1alpha1ClusterRoleList.discriminator = undefined;\nV1alpha1ClusterRoleList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1alpha1ClusterRoleList = V1alpha1ClusterRoleList;\n/**\n* Initializer describes the name and the failure policy of an initializer, and what resources it applies to.\n*/\nclass V1alpha1Initializer {\n static getAttributeTypeMap() {\n return V1alpha1Initializer.attributeTypeMap;\n }\n}\nV1alpha1Initializer.discriminator = undefined;\nV1alpha1Initializer.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"rules\",\n \"baseName\": \"rules\",\n \"type\": \"Array\"\n }\n];\nexports.V1alpha1Initializer = V1alpha1Initializer;\n/**\n* InitializerConfiguration describes the configuration of initializers.\n*/\nclass V1alpha1InitializerConfiguration {\n static getAttributeTypeMap() {\n return V1alpha1InitializerConfiguration.attributeTypeMap;\n }\n}\nV1alpha1InitializerConfiguration.discriminator = undefined;\nV1alpha1InitializerConfiguration.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"initializers\",\n \"baseName\": \"initializers\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n }\n];\nexports.V1alpha1InitializerConfiguration = V1alpha1InitializerConfiguration;\n/**\n* InitializerConfigurationList is a list of InitializerConfiguration.\n*/\nclass V1alpha1InitializerConfigurationList {\n static getAttributeTypeMap() {\n return V1alpha1InitializerConfigurationList.attributeTypeMap;\n }\n}\nV1alpha1InitializerConfigurationList.discriminator = undefined;\nV1alpha1InitializerConfigurationList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1alpha1InitializerConfigurationList = V1alpha1InitializerConfigurationList;\n/**\n* PodPreset is a policy resource that defines additional runtime requirements for a Pod.\n*/\nclass V1alpha1PodPreset {\n static getAttributeTypeMap() {\n return V1alpha1PodPreset.attributeTypeMap;\n }\n}\nV1alpha1PodPreset.discriminator = undefined;\nV1alpha1PodPreset.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1alpha1PodPresetSpec\"\n }\n];\nexports.V1alpha1PodPreset = V1alpha1PodPreset;\n/**\n* PodPresetList is a list of PodPreset objects.\n*/\nclass V1alpha1PodPresetList {\n static getAttributeTypeMap() {\n return V1alpha1PodPresetList.attributeTypeMap;\n }\n}\nV1alpha1PodPresetList.discriminator = undefined;\nV1alpha1PodPresetList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1alpha1PodPresetList = V1alpha1PodPresetList;\n/**\n* PodPresetSpec is a description of a pod preset.\n*/\nclass V1alpha1PodPresetSpec {\n static getAttributeTypeMap() {\n return V1alpha1PodPresetSpec.attributeTypeMap;\n }\n}\nV1alpha1PodPresetSpec.discriminator = undefined;\nV1alpha1PodPresetSpec.attributeTypeMap = [\n {\n \"name\": \"env\",\n \"baseName\": \"env\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"envFrom\",\n \"baseName\": \"envFrom\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"volumeMounts\",\n \"baseName\": \"volumeMounts\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"volumes\",\n \"baseName\": \"volumes\",\n \"type\": \"Array\"\n }\n];\nexports.V1alpha1PodPresetSpec = V1alpha1PodPresetSpec;\n/**\n* Policy defines the configuration of how audit events are logged\n*/\nclass V1alpha1Policy {\n static getAttributeTypeMap() {\n return V1alpha1Policy.attributeTypeMap;\n }\n}\nV1alpha1Policy.discriminator = undefined;\nV1alpha1Policy.attributeTypeMap = [\n {\n \"name\": \"level\",\n \"baseName\": \"level\",\n \"type\": \"string\"\n },\n {\n \"name\": \"stages\",\n \"baseName\": \"stages\",\n \"type\": \"Array\"\n }\n];\nexports.V1alpha1Policy = V1alpha1Policy;\n/**\n* PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.\n*/\nclass V1alpha1PolicyRule {\n static getAttributeTypeMap() {\n return V1alpha1PolicyRule.attributeTypeMap;\n }\n}\nV1alpha1PolicyRule.discriminator = undefined;\nV1alpha1PolicyRule.attributeTypeMap = [\n {\n \"name\": \"apiGroups\",\n \"baseName\": \"apiGroups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"nonResourceURLs\",\n \"baseName\": \"nonResourceURLs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resourceNames\",\n \"baseName\": \"resourceNames\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"verbs\",\n \"baseName\": \"verbs\",\n \"type\": \"Array\"\n }\n];\nexports.V1alpha1PolicyRule = V1alpha1PolicyRule;\n/**\n* PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.\n*/\nclass V1alpha1PriorityClass {\n static getAttributeTypeMap() {\n return V1alpha1PriorityClass.attributeTypeMap;\n }\n}\nV1alpha1PriorityClass.discriminator = undefined;\nV1alpha1PriorityClass.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"description\",\n \"baseName\": \"description\",\n \"type\": \"string\"\n },\n {\n \"name\": \"globalDefault\",\n \"baseName\": \"globalDefault\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"number\"\n }\n];\nexports.V1alpha1PriorityClass = V1alpha1PriorityClass;\n/**\n* PriorityClassList is a collection of priority classes.\n*/\nclass V1alpha1PriorityClassList {\n static getAttributeTypeMap() {\n return V1alpha1PriorityClassList.attributeTypeMap;\n }\n}\nV1alpha1PriorityClassList.discriminator = undefined;\nV1alpha1PriorityClassList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1alpha1PriorityClassList = V1alpha1PriorityClassList;\n/**\n* Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.\n*/\nclass V1alpha1Role {\n static getAttributeTypeMap() {\n return V1alpha1Role.attributeTypeMap;\n }\n}\nV1alpha1Role.discriminator = undefined;\nV1alpha1Role.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"rules\",\n \"baseName\": \"rules\",\n \"type\": \"Array\"\n }\n];\nexports.V1alpha1Role = V1alpha1Role;\n/**\n* RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.\n*/\nclass V1alpha1RoleBinding {\n static getAttributeTypeMap() {\n return V1alpha1RoleBinding.attributeTypeMap;\n }\n}\nV1alpha1RoleBinding.discriminator = undefined;\nV1alpha1RoleBinding.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"roleRef\",\n \"baseName\": \"roleRef\",\n \"type\": \"V1alpha1RoleRef\"\n },\n {\n \"name\": \"subjects\",\n \"baseName\": \"subjects\",\n \"type\": \"Array\"\n }\n];\nexports.V1alpha1RoleBinding = V1alpha1RoleBinding;\n/**\n* RoleBindingList is a collection of RoleBindings\n*/\nclass V1alpha1RoleBindingList {\n static getAttributeTypeMap() {\n return V1alpha1RoleBindingList.attributeTypeMap;\n }\n}\nV1alpha1RoleBindingList.discriminator = undefined;\nV1alpha1RoleBindingList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1alpha1RoleBindingList = V1alpha1RoleBindingList;\n/**\n* RoleList is a collection of Roles\n*/\nclass V1alpha1RoleList {\n static getAttributeTypeMap() {\n return V1alpha1RoleList.attributeTypeMap;\n }\n}\nV1alpha1RoleList.discriminator = undefined;\nV1alpha1RoleList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1alpha1RoleList = V1alpha1RoleList;\n/**\n* RoleRef contains information that points to the role being used\n*/\nclass V1alpha1RoleRef {\n static getAttributeTypeMap() {\n return V1alpha1RoleRef.attributeTypeMap;\n }\n}\nV1alpha1RoleRef.discriminator = undefined;\nV1alpha1RoleRef.attributeTypeMap = [\n {\n \"name\": \"apiGroup\",\n \"baseName\": \"apiGroup\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\nexports.V1alpha1RoleRef = V1alpha1RoleRef;\n/**\n* Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.\n*/\nclass V1alpha1Rule {\n static getAttributeTypeMap() {\n return V1alpha1Rule.attributeTypeMap;\n }\n}\nV1alpha1Rule.discriminator = undefined;\nV1alpha1Rule.attributeTypeMap = [\n {\n \"name\": \"apiGroups\",\n \"baseName\": \"apiGroups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"apiVersions\",\n \"baseName\": \"apiVersions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"Array\"\n }\n];\nexports.V1alpha1Rule = V1alpha1Rule;\n/**\n* ServiceReference holds a reference to Service.legacy.k8s.io\n*/\nclass V1alpha1ServiceReference {\n static getAttributeTypeMap() {\n return V1alpha1ServiceReference.attributeTypeMap;\n }\n}\nV1alpha1ServiceReference.discriminator = undefined;\nV1alpha1ServiceReference.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n }\n];\nexports.V1alpha1ServiceReference = V1alpha1ServiceReference;\n/**\n* Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.\n*/\nclass V1alpha1Subject {\n static getAttributeTypeMap() {\n return V1alpha1Subject.attributeTypeMap;\n }\n}\nV1alpha1Subject.discriminator = undefined;\nV1alpha1Subject.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n }\n];\nexports.V1alpha1Subject = V1alpha1Subject;\n/**\n* VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. VolumeAttachment objects are non-namespaced.\n*/\nclass V1alpha1VolumeAttachment {\n static getAttributeTypeMap() {\n return V1alpha1VolumeAttachment.attributeTypeMap;\n }\n}\nV1alpha1VolumeAttachment.discriminator = undefined;\nV1alpha1VolumeAttachment.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1alpha1VolumeAttachmentSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1alpha1VolumeAttachmentStatus\"\n }\n];\nexports.V1alpha1VolumeAttachment = V1alpha1VolumeAttachment;\n/**\n* VolumeAttachmentList is a collection of VolumeAttachment objects.\n*/\nclass V1alpha1VolumeAttachmentList {\n static getAttributeTypeMap() {\n return V1alpha1VolumeAttachmentList.attributeTypeMap;\n }\n}\nV1alpha1VolumeAttachmentList.discriminator = undefined;\nV1alpha1VolumeAttachmentList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1alpha1VolumeAttachmentList = V1alpha1VolumeAttachmentList;\n/**\n* VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.\n*/\nclass V1alpha1VolumeAttachmentSource {\n static getAttributeTypeMap() {\n return V1alpha1VolumeAttachmentSource.attributeTypeMap;\n }\n}\nV1alpha1VolumeAttachmentSource.discriminator = undefined;\nV1alpha1VolumeAttachmentSource.attributeTypeMap = [\n {\n \"name\": \"persistentVolumeName\",\n \"baseName\": \"persistentVolumeName\",\n \"type\": \"string\"\n }\n];\nexports.V1alpha1VolumeAttachmentSource = V1alpha1VolumeAttachmentSource;\n/**\n* VolumeAttachmentSpec is the specification of a VolumeAttachment request.\n*/\nclass V1alpha1VolumeAttachmentSpec {\n static getAttributeTypeMap() {\n return V1alpha1VolumeAttachmentSpec.attributeTypeMap;\n }\n}\nV1alpha1VolumeAttachmentSpec.discriminator = undefined;\nV1alpha1VolumeAttachmentSpec.attributeTypeMap = [\n {\n \"name\": \"attacher\",\n \"baseName\": \"attacher\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nodeName\",\n \"baseName\": \"nodeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"source\",\n \"baseName\": \"source\",\n \"type\": \"V1alpha1VolumeAttachmentSource\"\n }\n];\nexports.V1alpha1VolumeAttachmentSpec = V1alpha1VolumeAttachmentSpec;\n/**\n* VolumeAttachmentStatus is the status of a VolumeAttachment request.\n*/\nclass V1alpha1VolumeAttachmentStatus {\n static getAttributeTypeMap() {\n return V1alpha1VolumeAttachmentStatus.attributeTypeMap;\n }\n}\nV1alpha1VolumeAttachmentStatus.discriminator = undefined;\nV1alpha1VolumeAttachmentStatus.attributeTypeMap = [\n {\n \"name\": \"attachError\",\n \"baseName\": \"attachError\",\n \"type\": \"V1alpha1VolumeError\"\n },\n {\n \"name\": \"attached\",\n \"baseName\": \"attached\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"attachmentMetadata\",\n \"baseName\": \"attachmentMetadata\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"detachError\",\n \"baseName\": \"detachError\",\n \"type\": \"V1alpha1VolumeError\"\n }\n];\nexports.V1alpha1VolumeAttachmentStatus = V1alpha1VolumeAttachmentStatus;\n/**\n* VolumeError captures an error encountered during a volume operation.\n*/\nclass V1alpha1VolumeError {\n static getAttributeTypeMap() {\n return V1alpha1VolumeError.attributeTypeMap;\n }\n}\nV1alpha1VolumeError.discriminator = undefined;\nV1alpha1VolumeError.attributeTypeMap = [\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"time\",\n \"baseName\": \"time\",\n \"type\": \"Date\"\n }\n];\nexports.V1alpha1VolumeError = V1alpha1VolumeError;\n/**\n* Webhook holds the configuration of the webhook\n*/\nclass V1alpha1Webhook {\n static getAttributeTypeMap() {\n return V1alpha1Webhook.attributeTypeMap;\n }\n}\nV1alpha1Webhook.discriminator = undefined;\nV1alpha1Webhook.attributeTypeMap = [\n {\n \"name\": \"clientConfig\",\n \"baseName\": \"clientConfig\",\n \"type\": \"V1alpha1WebhookClientConfig\"\n },\n {\n \"name\": \"throttle\",\n \"baseName\": \"throttle\",\n \"type\": \"V1alpha1WebhookThrottleConfig\"\n }\n];\nexports.V1alpha1Webhook = V1alpha1Webhook;\n/**\n* WebhookClientConfig contains the information to make a connection with the webhook\n*/\nclass V1alpha1WebhookClientConfig {\n static getAttributeTypeMap() {\n return V1alpha1WebhookClientConfig.attributeTypeMap;\n }\n}\nV1alpha1WebhookClientConfig.discriminator = undefined;\nV1alpha1WebhookClientConfig.attributeTypeMap = [\n {\n \"name\": \"caBundle\",\n \"baseName\": \"caBundle\",\n \"type\": \"string\"\n },\n {\n \"name\": \"service\",\n \"baseName\": \"service\",\n \"type\": \"V1alpha1ServiceReference\"\n },\n {\n \"name\": \"url\",\n \"baseName\": \"url\",\n \"type\": \"string\"\n }\n];\nexports.V1alpha1WebhookClientConfig = V1alpha1WebhookClientConfig;\n/**\n* WebhookThrottleConfig holds the configuration for throttling events\n*/\nclass V1alpha1WebhookThrottleConfig {\n static getAttributeTypeMap() {\n return V1alpha1WebhookThrottleConfig.attributeTypeMap;\n }\n}\nV1alpha1WebhookThrottleConfig.discriminator = undefined;\nV1alpha1WebhookThrottleConfig.attributeTypeMap = [\n {\n \"name\": \"burst\",\n \"baseName\": \"burst\",\n \"type\": \"number\"\n },\n {\n \"name\": \"qps\",\n \"baseName\": \"qps\",\n \"type\": \"number\"\n }\n];\nexports.V1alpha1WebhookThrottleConfig = V1alpha1WebhookThrottleConfig;\n/**\n* APIService represents a server for a particular GroupVersion. Name must be \\\"version.group\\\".\n*/\nclass V1beta1APIService {\n static getAttributeTypeMap() {\n return V1beta1APIService.attributeTypeMap;\n }\n}\nV1beta1APIService.discriminator = undefined;\nV1beta1APIService.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1APIServiceSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1APIServiceStatus\"\n }\n];\nexports.V1beta1APIService = V1beta1APIService;\nclass V1beta1APIServiceCondition {\n static getAttributeTypeMap() {\n return V1beta1APIServiceCondition.attributeTypeMap;\n }\n}\nV1beta1APIServiceCondition.discriminator = undefined;\nV1beta1APIServiceCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1APIServiceCondition = V1beta1APIServiceCondition;\n/**\n* APIServiceList is a list of APIService objects.\n*/\nclass V1beta1APIServiceList {\n static getAttributeTypeMap() {\n return V1beta1APIServiceList.attributeTypeMap;\n }\n}\nV1beta1APIServiceList.discriminator = undefined;\nV1beta1APIServiceList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1APIServiceList = V1beta1APIServiceList;\n/**\n* APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.\n*/\nclass V1beta1APIServiceSpec {\n static getAttributeTypeMap() {\n return V1beta1APIServiceSpec.attributeTypeMap;\n }\n}\nV1beta1APIServiceSpec.discriminator = undefined;\nV1beta1APIServiceSpec.attributeTypeMap = [\n {\n \"name\": \"caBundle\",\n \"baseName\": \"caBundle\",\n \"type\": \"string\"\n },\n {\n \"name\": \"group\",\n \"baseName\": \"group\",\n \"type\": \"string\"\n },\n {\n \"name\": \"groupPriorityMinimum\",\n \"baseName\": \"groupPriorityMinimum\",\n \"type\": \"number\"\n },\n {\n \"name\": \"insecureSkipTLSVerify\",\n \"baseName\": \"insecureSkipTLSVerify\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"service\",\n \"baseName\": \"service\",\n \"type\": \"ApiregistrationV1beta1ServiceReference\"\n },\n {\n \"name\": \"version\",\n \"baseName\": \"version\",\n \"type\": \"string\"\n },\n {\n \"name\": \"versionPriority\",\n \"baseName\": \"versionPriority\",\n \"type\": \"number\"\n }\n];\nexports.V1beta1APIServiceSpec = V1beta1APIServiceSpec;\n/**\n* APIServiceStatus contains derived information about an API server\n*/\nclass V1beta1APIServiceStatus {\n static getAttributeTypeMap() {\n return V1beta1APIServiceStatus.attributeTypeMap;\n }\n}\nV1beta1APIServiceStatus.discriminator = undefined;\nV1beta1APIServiceStatus.attributeTypeMap = [\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1APIServiceStatus = V1beta1APIServiceStatus;\n/**\n* AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole\n*/\nclass V1beta1AggregationRule {\n static getAttributeTypeMap() {\n return V1beta1AggregationRule.attributeTypeMap;\n }\n}\nV1beta1AggregationRule.discriminator = undefined;\nV1beta1AggregationRule.attributeTypeMap = [\n {\n \"name\": \"clusterRoleSelectors\",\n \"baseName\": \"clusterRoleSelectors\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1AggregationRule = V1beta1AggregationRule;\n/**\n* Describes a certificate signing request\n*/\nclass V1beta1CertificateSigningRequest {\n static getAttributeTypeMap() {\n return V1beta1CertificateSigningRequest.attributeTypeMap;\n }\n}\nV1beta1CertificateSigningRequest.discriminator = undefined;\nV1beta1CertificateSigningRequest.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1CertificateSigningRequestSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1CertificateSigningRequestStatus\"\n }\n];\nexports.V1beta1CertificateSigningRequest = V1beta1CertificateSigningRequest;\nclass V1beta1CertificateSigningRequestCondition {\n static getAttributeTypeMap() {\n return V1beta1CertificateSigningRequestCondition.attributeTypeMap;\n }\n}\nV1beta1CertificateSigningRequestCondition.discriminator = undefined;\nV1beta1CertificateSigningRequestCondition.attributeTypeMap = [\n {\n \"name\": \"lastUpdateTime\",\n \"baseName\": \"lastUpdateTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1CertificateSigningRequestCondition = V1beta1CertificateSigningRequestCondition;\nclass V1beta1CertificateSigningRequestList {\n static getAttributeTypeMap() {\n return V1beta1CertificateSigningRequestList.attributeTypeMap;\n }\n}\nV1beta1CertificateSigningRequestList.discriminator = undefined;\nV1beta1CertificateSigningRequestList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1CertificateSigningRequestList = V1beta1CertificateSigningRequestList;\n/**\n* This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.\n*/\nclass V1beta1CertificateSigningRequestSpec {\n static getAttributeTypeMap() {\n return V1beta1CertificateSigningRequestSpec.attributeTypeMap;\n }\n}\nV1beta1CertificateSigningRequestSpec.discriminator = undefined;\nV1beta1CertificateSigningRequestSpec.attributeTypeMap = [\n {\n \"name\": \"extra\",\n \"baseName\": \"extra\",\n \"type\": \"{ [key: string]: Array; }\"\n },\n {\n \"name\": \"groups\",\n \"baseName\": \"groups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"request\",\n \"baseName\": \"request\",\n \"type\": \"string\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n },\n {\n \"name\": \"usages\",\n \"baseName\": \"usages\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"username\",\n \"baseName\": \"username\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1CertificateSigningRequestSpec = V1beta1CertificateSigningRequestSpec;\nclass V1beta1CertificateSigningRequestStatus {\n static getAttributeTypeMap() {\n return V1beta1CertificateSigningRequestStatus.attributeTypeMap;\n }\n}\nV1beta1CertificateSigningRequestStatus.discriminator = undefined;\nV1beta1CertificateSigningRequestStatus.attributeTypeMap = [\n {\n \"name\": \"certificate\",\n \"baseName\": \"certificate\",\n \"type\": \"string\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1CertificateSigningRequestStatus = V1beta1CertificateSigningRequestStatus;\n/**\n* ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.\n*/\nclass V1beta1ClusterRole {\n static getAttributeTypeMap() {\n return V1beta1ClusterRole.attributeTypeMap;\n }\n}\nV1beta1ClusterRole.discriminator = undefined;\nV1beta1ClusterRole.attributeTypeMap = [\n {\n \"name\": \"aggregationRule\",\n \"baseName\": \"aggregationRule\",\n \"type\": \"V1beta1AggregationRule\"\n },\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"rules\",\n \"baseName\": \"rules\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1ClusterRole = V1beta1ClusterRole;\n/**\n* ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.\n*/\nclass V1beta1ClusterRoleBinding {\n static getAttributeTypeMap() {\n return V1beta1ClusterRoleBinding.attributeTypeMap;\n }\n}\nV1beta1ClusterRoleBinding.discriminator = undefined;\nV1beta1ClusterRoleBinding.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"roleRef\",\n \"baseName\": \"roleRef\",\n \"type\": \"V1beta1RoleRef\"\n },\n {\n \"name\": \"subjects\",\n \"baseName\": \"subjects\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1ClusterRoleBinding = V1beta1ClusterRoleBinding;\n/**\n* ClusterRoleBindingList is a collection of ClusterRoleBindings\n*/\nclass V1beta1ClusterRoleBindingList {\n static getAttributeTypeMap() {\n return V1beta1ClusterRoleBindingList.attributeTypeMap;\n }\n}\nV1beta1ClusterRoleBindingList.discriminator = undefined;\nV1beta1ClusterRoleBindingList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1ClusterRoleBindingList = V1beta1ClusterRoleBindingList;\n/**\n* ClusterRoleList is a collection of ClusterRoles\n*/\nclass V1beta1ClusterRoleList {\n static getAttributeTypeMap() {\n return V1beta1ClusterRoleList.attributeTypeMap;\n }\n}\nV1beta1ClusterRoleList.discriminator = undefined;\nV1beta1ClusterRoleList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1ClusterRoleList = V1beta1ClusterRoleList;\n/**\n* DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the release notes for more information. ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.\n*/\nclass V1beta1ControllerRevision {\n static getAttributeTypeMap() {\n return V1beta1ControllerRevision.attributeTypeMap;\n }\n}\nV1beta1ControllerRevision.discriminator = undefined;\nV1beta1ControllerRevision.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"data\",\n \"baseName\": \"data\",\n \"type\": \"RuntimeRawExtension\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"revision\",\n \"baseName\": \"revision\",\n \"type\": \"number\"\n }\n];\nexports.V1beta1ControllerRevision = V1beta1ControllerRevision;\n/**\n* ControllerRevisionList is a resource containing a list of ControllerRevision objects.\n*/\nclass V1beta1ControllerRevisionList {\n static getAttributeTypeMap() {\n return V1beta1ControllerRevisionList.attributeTypeMap;\n }\n}\nV1beta1ControllerRevisionList.discriminator = undefined;\nV1beta1ControllerRevisionList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1ControllerRevisionList = V1beta1ControllerRevisionList;\n/**\n* CronJob represents the configuration of a single cron job.\n*/\nclass V1beta1CronJob {\n static getAttributeTypeMap() {\n return V1beta1CronJob.attributeTypeMap;\n }\n}\nV1beta1CronJob.discriminator = undefined;\nV1beta1CronJob.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1CronJobSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1CronJobStatus\"\n }\n];\nexports.V1beta1CronJob = V1beta1CronJob;\n/**\n* CronJobList is a collection of cron jobs.\n*/\nclass V1beta1CronJobList {\n static getAttributeTypeMap() {\n return V1beta1CronJobList.attributeTypeMap;\n }\n}\nV1beta1CronJobList.discriminator = undefined;\nV1beta1CronJobList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1CronJobList = V1beta1CronJobList;\n/**\n* CronJobSpec describes how the job execution will look like and when it will actually run.\n*/\nclass V1beta1CronJobSpec {\n static getAttributeTypeMap() {\n return V1beta1CronJobSpec.attributeTypeMap;\n }\n}\nV1beta1CronJobSpec.discriminator = undefined;\nV1beta1CronJobSpec.attributeTypeMap = [\n {\n \"name\": \"concurrencyPolicy\",\n \"baseName\": \"concurrencyPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"failedJobsHistoryLimit\",\n \"baseName\": \"failedJobsHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"jobTemplate\",\n \"baseName\": \"jobTemplate\",\n \"type\": \"V1beta1JobTemplateSpec\"\n },\n {\n \"name\": \"schedule\",\n \"baseName\": \"schedule\",\n \"type\": \"string\"\n },\n {\n \"name\": \"startingDeadlineSeconds\",\n \"baseName\": \"startingDeadlineSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"successfulJobsHistoryLimit\",\n \"baseName\": \"successfulJobsHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"suspend\",\n \"baseName\": \"suspend\",\n \"type\": \"boolean\"\n }\n];\nexports.V1beta1CronJobSpec = V1beta1CronJobSpec;\n/**\n* CronJobStatus represents the current state of a cron job.\n*/\nclass V1beta1CronJobStatus {\n static getAttributeTypeMap() {\n return V1beta1CronJobStatus.attributeTypeMap;\n }\n}\nV1beta1CronJobStatus.discriminator = undefined;\nV1beta1CronJobStatus.attributeTypeMap = [\n {\n \"name\": \"active\",\n \"baseName\": \"active\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"lastScheduleTime\",\n \"baseName\": \"lastScheduleTime\",\n \"type\": \"Date\"\n }\n];\nexports.V1beta1CronJobStatus = V1beta1CronJobStatus;\n/**\n* CustomResourceColumnDefinition specifies a column for server side printing.\n*/\nclass V1beta1CustomResourceColumnDefinition {\n static getAttributeTypeMap() {\n return V1beta1CustomResourceColumnDefinition.attributeTypeMap;\n }\n}\nV1beta1CustomResourceColumnDefinition.discriminator = undefined;\nV1beta1CustomResourceColumnDefinition.attributeTypeMap = [\n {\n \"name\": \"jSONPath\",\n \"baseName\": \"JSONPath\",\n \"type\": \"string\"\n },\n {\n \"name\": \"description\",\n \"baseName\": \"description\",\n \"type\": \"string\"\n },\n {\n \"name\": \"format\",\n \"baseName\": \"format\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"priority\",\n \"baseName\": \"priority\",\n \"type\": \"number\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1CustomResourceColumnDefinition = V1beta1CustomResourceColumnDefinition;\n/**\n* CustomResourceConversion describes how to convert different versions of a CR.\n*/\nclass V1beta1CustomResourceConversion {\n static getAttributeTypeMap() {\n return V1beta1CustomResourceConversion.attributeTypeMap;\n }\n}\nV1beta1CustomResourceConversion.discriminator = undefined;\nV1beta1CustomResourceConversion.attributeTypeMap = [\n {\n \"name\": \"strategy\",\n \"baseName\": \"strategy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"webhookClientConfig\",\n \"baseName\": \"webhookClientConfig\",\n \"type\": \"ApiextensionsV1beta1WebhookClientConfig\"\n }\n];\nexports.V1beta1CustomResourceConversion = V1beta1CustomResourceConversion;\n/**\n* CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>.\n*/\nclass V1beta1CustomResourceDefinition {\n static getAttributeTypeMap() {\n return V1beta1CustomResourceDefinition.attributeTypeMap;\n }\n}\nV1beta1CustomResourceDefinition.discriminator = undefined;\nV1beta1CustomResourceDefinition.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1CustomResourceDefinitionSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1CustomResourceDefinitionStatus\"\n }\n];\nexports.V1beta1CustomResourceDefinition = V1beta1CustomResourceDefinition;\n/**\n* CustomResourceDefinitionCondition contains details for the current condition of this pod.\n*/\nclass V1beta1CustomResourceDefinitionCondition {\n static getAttributeTypeMap() {\n return V1beta1CustomResourceDefinitionCondition.attributeTypeMap;\n }\n}\nV1beta1CustomResourceDefinitionCondition.discriminator = undefined;\nV1beta1CustomResourceDefinitionCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1CustomResourceDefinitionCondition = V1beta1CustomResourceDefinitionCondition;\n/**\n* CustomResourceDefinitionList is a list of CustomResourceDefinition objects.\n*/\nclass V1beta1CustomResourceDefinitionList {\n static getAttributeTypeMap() {\n return V1beta1CustomResourceDefinitionList.attributeTypeMap;\n }\n}\nV1beta1CustomResourceDefinitionList.discriminator = undefined;\nV1beta1CustomResourceDefinitionList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1CustomResourceDefinitionList = V1beta1CustomResourceDefinitionList;\n/**\n* CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition\n*/\nclass V1beta1CustomResourceDefinitionNames {\n static getAttributeTypeMap() {\n return V1beta1CustomResourceDefinitionNames.attributeTypeMap;\n }\n}\nV1beta1CustomResourceDefinitionNames.discriminator = undefined;\nV1beta1CustomResourceDefinitionNames.attributeTypeMap = [\n {\n \"name\": \"categories\",\n \"baseName\": \"categories\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"listKind\",\n \"baseName\": \"listKind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"plural\",\n \"baseName\": \"plural\",\n \"type\": \"string\"\n },\n {\n \"name\": \"shortNames\",\n \"baseName\": \"shortNames\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"singular\",\n \"baseName\": \"singular\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1CustomResourceDefinitionNames = V1beta1CustomResourceDefinitionNames;\n/**\n* CustomResourceDefinitionSpec describes how a user wants their resource to appear\n*/\nclass V1beta1CustomResourceDefinitionSpec {\n static getAttributeTypeMap() {\n return V1beta1CustomResourceDefinitionSpec.attributeTypeMap;\n }\n}\nV1beta1CustomResourceDefinitionSpec.discriminator = undefined;\nV1beta1CustomResourceDefinitionSpec.attributeTypeMap = [\n {\n \"name\": \"additionalPrinterColumns\",\n \"baseName\": \"additionalPrinterColumns\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"conversion\",\n \"baseName\": \"conversion\",\n \"type\": \"V1beta1CustomResourceConversion\"\n },\n {\n \"name\": \"group\",\n \"baseName\": \"group\",\n \"type\": \"string\"\n },\n {\n \"name\": \"names\",\n \"baseName\": \"names\",\n \"type\": \"V1beta1CustomResourceDefinitionNames\"\n },\n {\n \"name\": \"scope\",\n \"baseName\": \"scope\",\n \"type\": \"string\"\n },\n {\n \"name\": \"subresources\",\n \"baseName\": \"subresources\",\n \"type\": \"V1beta1CustomResourceSubresources\"\n },\n {\n \"name\": \"validation\",\n \"baseName\": \"validation\",\n \"type\": \"V1beta1CustomResourceValidation\"\n },\n {\n \"name\": \"version\",\n \"baseName\": \"version\",\n \"type\": \"string\"\n },\n {\n \"name\": \"versions\",\n \"baseName\": \"versions\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1CustomResourceDefinitionSpec = V1beta1CustomResourceDefinitionSpec;\n/**\n* CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition\n*/\nclass V1beta1CustomResourceDefinitionStatus {\n static getAttributeTypeMap() {\n return V1beta1CustomResourceDefinitionStatus.attributeTypeMap;\n }\n}\nV1beta1CustomResourceDefinitionStatus.discriminator = undefined;\nV1beta1CustomResourceDefinitionStatus.attributeTypeMap = [\n {\n \"name\": \"acceptedNames\",\n \"baseName\": \"acceptedNames\",\n \"type\": \"V1beta1CustomResourceDefinitionNames\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"storedVersions\",\n \"baseName\": \"storedVersions\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1CustomResourceDefinitionStatus = V1beta1CustomResourceDefinitionStatus;\n/**\n* CustomResourceDefinitionVersion describes a version for CRD.\n*/\nclass V1beta1CustomResourceDefinitionVersion {\n static getAttributeTypeMap() {\n return V1beta1CustomResourceDefinitionVersion.attributeTypeMap;\n }\n}\nV1beta1CustomResourceDefinitionVersion.discriminator = undefined;\nV1beta1CustomResourceDefinitionVersion.attributeTypeMap = [\n {\n \"name\": \"additionalPrinterColumns\",\n \"baseName\": \"additionalPrinterColumns\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"schema\",\n \"baseName\": \"schema\",\n \"type\": \"V1beta1CustomResourceValidation\"\n },\n {\n \"name\": \"served\",\n \"baseName\": \"served\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"storage\",\n \"baseName\": \"storage\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"subresources\",\n \"baseName\": \"subresources\",\n \"type\": \"V1beta1CustomResourceSubresources\"\n }\n];\nexports.V1beta1CustomResourceDefinitionVersion = V1beta1CustomResourceDefinitionVersion;\n/**\n* CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.\n*/\nclass V1beta1CustomResourceSubresourceScale {\n static getAttributeTypeMap() {\n return V1beta1CustomResourceSubresourceScale.attributeTypeMap;\n }\n}\nV1beta1CustomResourceSubresourceScale.discriminator = undefined;\nV1beta1CustomResourceSubresourceScale.attributeTypeMap = [\n {\n \"name\": \"labelSelectorPath\",\n \"baseName\": \"labelSelectorPath\",\n \"type\": \"string\"\n },\n {\n \"name\": \"specReplicasPath\",\n \"baseName\": \"specReplicasPath\",\n \"type\": \"string\"\n },\n {\n \"name\": \"statusReplicasPath\",\n \"baseName\": \"statusReplicasPath\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1CustomResourceSubresourceScale = V1beta1CustomResourceSubresourceScale;\n/**\n* CustomResourceSubresources defines the status and scale subresources for CustomResources.\n*/\nclass V1beta1CustomResourceSubresources {\n static getAttributeTypeMap() {\n return V1beta1CustomResourceSubresources.attributeTypeMap;\n }\n}\nV1beta1CustomResourceSubresources.discriminator = undefined;\nV1beta1CustomResourceSubresources.attributeTypeMap = [\n {\n \"name\": \"scale\",\n \"baseName\": \"scale\",\n \"type\": \"V1beta1CustomResourceSubresourceScale\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"any\"\n }\n];\nexports.V1beta1CustomResourceSubresources = V1beta1CustomResourceSubresources;\n/**\n* CustomResourceValidation is a list of validation methods for CustomResources.\n*/\nclass V1beta1CustomResourceValidation {\n static getAttributeTypeMap() {\n return V1beta1CustomResourceValidation.attributeTypeMap;\n }\n}\nV1beta1CustomResourceValidation.discriminator = undefined;\nV1beta1CustomResourceValidation.attributeTypeMap = [\n {\n \"name\": \"openAPIV3Schema\",\n \"baseName\": \"openAPIV3Schema\",\n \"type\": \"V1beta1JSONSchemaProps\"\n }\n];\nexports.V1beta1CustomResourceValidation = V1beta1CustomResourceValidation;\n/**\n* DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set.\n*/\nclass V1beta1DaemonSet {\n static getAttributeTypeMap() {\n return V1beta1DaemonSet.attributeTypeMap;\n }\n}\nV1beta1DaemonSet.discriminator = undefined;\nV1beta1DaemonSet.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1DaemonSetSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1DaemonSetStatus\"\n }\n];\nexports.V1beta1DaemonSet = V1beta1DaemonSet;\n/**\n* DaemonSetCondition describes the state of a DaemonSet at a certain point.\n*/\nclass V1beta1DaemonSetCondition {\n static getAttributeTypeMap() {\n return V1beta1DaemonSetCondition.attributeTypeMap;\n }\n}\nV1beta1DaemonSetCondition.discriminator = undefined;\nV1beta1DaemonSetCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1DaemonSetCondition = V1beta1DaemonSetCondition;\n/**\n* DaemonSetList is a collection of daemon sets.\n*/\nclass V1beta1DaemonSetList {\n static getAttributeTypeMap() {\n return V1beta1DaemonSetList.attributeTypeMap;\n }\n}\nV1beta1DaemonSetList.discriminator = undefined;\nV1beta1DaemonSetList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1DaemonSetList = V1beta1DaemonSetList;\n/**\n* DaemonSetSpec is the specification of a daemon set.\n*/\nclass V1beta1DaemonSetSpec {\n static getAttributeTypeMap() {\n return V1beta1DaemonSetSpec.attributeTypeMap;\n }\n}\nV1beta1DaemonSetSpec.discriminator = undefined;\nV1beta1DaemonSetSpec.attributeTypeMap = [\n {\n \"name\": \"minReadySeconds\",\n \"baseName\": \"minReadySeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"revisionHistoryLimit\",\n \"baseName\": \"revisionHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n },\n {\n \"name\": \"templateGeneration\",\n \"baseName\": \"templateGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"updateStrategy\",\n \"baseName\": \"updateStrategy\",\n \"type\": \"V1beta1DaemonSetUpdateStrategy\"\n }\n];\nexports.V1beta1DaemonSetSpec = V1beta1DaemonSetSpec;\n/**\n* DaemonSetStatus represents the current status of a daemon set.\n*/\nclass V1beta1DaemonSetStatus {\n static getAttributeTypeMap() {\n return V1beta1DaemonSetStatus.attributeTypeMap;\n }\n}\nV1beta1DaemonSetStatus.discriminator = undefined;\nV1beta1DaemonSetStatus.attributeTypeMap = [\n {\n \"name\": \"collisionCount\",\n \"baseName\": \"collisionCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"currentNumberScheduled\",\n \"baseName\": \"currentNumberScheduled\",\n \"type\": \"number\"\n },\n {\n \"name\": \"desiredNumberScheduled\",\n \"baseName\": \"desiredNumberScheduled\",\n \"type\": \"number\"\n },\n {\n \"name\": \"numberAvailable\",\n \"baseName\": \"numberAvailable\",\n \"type\": \"number\"\n },\n {\n \"name\": \"numberMisscheduled\",\n \"baseName\": \"numberMisscheduled\",\n \"type\": \"number\"\n },\n {\n \"name\": \"numberReady\",\n \"baseName\": \"numberReady\",\n \"type\": \"number\"\n },\n {\n \"name\": \"numberUnavailable\",\n \"baseName\": \"numberUnavailable\",\n \"type\": \"number\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"updatedNumberScheduled\",\n \"baseName\": \"updatedNumberScheduled\",\n \"type\": \"number\"\n }\n];\nexports.V1beta1DaemonSetStatus = V1beta1DaemonSetStatus;\nclass V1beta1DaemonSetUpdateStrategy {\n static getAttributeTypeMap() {\n return V1beta1DaemonSetUpdateStrategy.attributeTypeMap;\n }\n}\nV1beta1DaemonSetUpdateStrategy.discriminator = undefined;\nV1beta1DaemonSetUpdateStrategy.attributeTypeMap = [\n {\n \"name\": \"rollingUpdate\",\n \"baseName\": \"rollingUpdate\",\n \"type\": \"V1beta1RollingUpdateDaemonSet\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1DaemonSetUpdateStrategy = V1beta1DaemonSetUpdateStrategy;\n/**\n* Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.\n*/\nclass V1beta1Event {\n static getAttributeTypeMap() {\n return V1beta1Event.attributeTypeMap;\n }\n}\nV1beta1Event.discriminator = undefined;\nV1beta1Event.attributeTypeMap = [\n {\n \"name\": \"action\",\n \"baseName\": \"action\",\n \"type\": \"string\"\n },\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"deprecatedCount\",\n \"baseName\": \"deprecatedCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"deprecatedFirstTimestamp\",\n \"baseName\": \"deprecatedFirstTimestamp\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"deprecatedLastTimestamp\",\n \"baseName\": \"deprecatedLastTimestamp\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"deprecatedSource\",\n \"baseName\": \"deprecatedSource\",\n \"type\": \"V1EventSource\"\n },\n {\n \"name\": \"eventTime\",\n \"baseName\": \"eventTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"note\",\n \"baseName\": \"note\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"regarding\",\n \"baseName\": \"regarding\",\n \"type\": \"V1ObjectReference\"\n },\n {\n \"name\": \"related\",\n \"baseName\": \"related\",\n \"type\": \"V1ObjectReference\"\n },\n {\n \"name\": \"reportingController\",\n \"baseName\": \"reportingController\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reportingInstance\",\n \"baseName\": \"reportingInstance\",\n \"type\": \"string\"\n },\n {\n \"name\": \"series\",\n \"baseName\": \"series\",\n \"type\": \"V1beta1EventSeries\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1Event = V1beta1Event;\n/**\n* EventList is a list of Event objects.\n*/\nclass V1beta1EventList {\n static getAttributeTypeMap() {\n return V1beta1EventList.attributeTypeMap;\n }\n}\nV1beta1EventList.discriminator = undefined;\nV1beta1EventList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1EventList = V1beta1EventList;\n/**\n* EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.\n*/\nclass V1beta1EventSeries {\n static getAttributeTypeMap() {\n return V1beta1EventSeries.attributeTypeMap;\n }\n}\nV1beta1EventSeries.discriminator = undefined;\nV1beta1EventSeries.attributeTypeMap = [\n {\n \"name\": \"count\",\n \"baseName\": \"count\",\n \"type\": \"number\"\n },\n {\n \"name\": \"lastObservedTime\",\n \"baseName\": \"lastObservedTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"state\",\n \"baseName\": \"state\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1EventSeries = V1beta1EventSeries;\n/**\n* Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.\n*/\nclass V1beta1Eviction {\n static getAttributeTypeMap() {\n return V1beta1Eviction.attributeTypeMap;\n }\n}\nV1beta1Eviction.discriminator = undefined;\nV1beta1Eviction.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"deleteOptions\",\n \"baseName\": \"deleteOptions\",\n \"type\": \"V1DeleteOptions\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n }\n];\nexports.V1beta1Eviction = V1beta1Eviction;\n/**\n* ExternalDocumentation allows referencing an external resource for extended documentation.\n*/\nclass V1beta1ExternalDocumentation {\n static getAttributeTypeMap() {\n return V1beta1ExternalDocumentation.attributeTypeMap;\n }\n}\nV1beta1ExternalDocumentation.discriminator = undefined;\nV1beta1ExternalDocumentation.attributeTypeMap = [\n {\n \"name\": \"description\",\n \"baseName\": \"description\",\n \"type\": \"string\"\n },\n {\n \"name\": \"url\",\n \"baseName\": \"url\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1ExternalDocumentation = V1beta1ExternalDocumentation;\n/**\n* HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend.\n*/\nclass V1beta1HTTPIngressPath {\n static getAttributeTypeMap() {\n return V1beta1HTTPIngressPath.attributeTypeMap;\n }\n}\nV1beta1HTTPIngressPath.discriminator = undefined;\nV1beta1HTTPIngressPath.attributeTypeMap = [\n {\n \"name\": \"backend\",\n \"baseName\": \"backend\",\n \"type\": \"V1beta1IngressBackend\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1HTTPIngressPath = V1beta1HTTPIngressPath;\n/**\n* HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.\n*/\nclass V1beta1HTTPIngressRuleValue {\n static getAttributeTypeMap() {\n return V1beta1HTTPIngressRuleValue.attributeTypeMap;\n }\n}\nV1beta1HTTPIngressRuleValue.discriminator = undefined;\nV1beta1HTTPIngressRuleValue.attributeTypeMap = [\n {\n \"name\": \"paths\",\n \"baseName\": \"paths\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1HTTPIngressRuleValue = V1beta1HTTPIngressRuleValue;\n/**\n* DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. IPBlock describes a particular CIDR (Ex. \\\"192.168.1.1/24\\\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.\n*/\nclass V1beta1IPBlock {\n static getAttributeTypeMap() {\n return V1beta1IPBlock.attributeTypeMap;\n }\n}\nV1beta1IPBlock.discriminator = undefined;\nV1beta1IPBlock.attributeTypeMap = [\n {\n \"name\": \"cidr\",\n \"baseName\": \"cidr\",\n \"type\": \"string\"\n },\n {\n \"name\": \"except\",\n \"baseName\": \"except\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1IPBlock = V1beta1IPBlock;\n/**\n* Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.\n*/\nclass V1beta1Ingress {\n static getAttributeTypeMap() {\n return V1beta1Ingress.attributeTypeMap;\n }\n}\nV1beta1Ingress.discriminator = undefined;\nV1beta1Ingress.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1IngressSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1IngressStatus\"\n }\n];\nexports.V1beta1Ingress = V1beta1Ingress;\n/**\n* IngressBackend describes all endpoints for a given service and port.\n*/\nclass V1beta1IngressBackend {\n static getAttributeTypeMap() {\n return V1beta1IngressBackend.attributeTypeMap;\n }\n}\nV1beta1IngressBackend.discriminator = undefined;\nV1beta1IngressBackend.attributeTypeMap = [\n {\n \"name\": \"serviceName\",\n \"baseName\": \"serviceName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"servicePort\",\n \"baseName\": \"servicePort\",\n \"type\": \"any\"\n }\n];\nexports.V1beta1IngressBackend = V1beta1IngressBackend;\n/**\n* IngressList is a collection of Ingress.\n*/\nclass V1beta1IngressList {\n static getAttributeTypeMap() {\n return V1beta1IngressList.attributeTypeMap;\n }\n}\nV1beta1IngressList.discriminator = undefined;\nV1beta1IngressList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1IngressList = V1beta1IngressList;\n/**\n* IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.\n*/\nclass V1beta1IngressRule {\n static getAttributeTypeMap() {\n return V1beta1IngressRule.attributeTypeMap;\n }\n}\nV1beta1IngressRule.discriminator = undefined;\nV1beta1IngressRule.attributeTypeMap = [\n {\n \"name\": \"host\",\n \"baseName\": \"host\",\n \"type\": \"string\"\n },\n {\n \"name\": \"http\",\n \"baseName\": \"http\",\n \"type\": \"V1beta1HTTPIngressRuleValue\"\n }\n];\nexports.V1beta1IngressRule = V1beta1IngressRule;\n/**\n* IngressSpec describes the Ingress the user wishes to exist.\n*/\nclass V1beta1IngressSpec {\n static getAttributeTypeMap() {\n return V1beta1IngressSpec.attributeTypeMap;\n }\n}\nV1beta1IngressSpec.discriminator = undefined;\nV1beta1IngressSpec.attributeTypeMap = [\n {\n \"name\": \"backend\",\n \"baseName\": \"backend\",\n \"type\": \"V1beta1IngressBackend\"\n },\n {\n \"name\": \"rules\",\n \"baseName\": \"rules\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"tls\",\n \"baseName\": \"tls\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1IngressSpec = V1beta1IngressSpec;\n/**\n* IngressStatus describe the current state of the Ingress.\n*/\nclass V1beta1IngressStatus {\n static getAttributeTypeMap() {\n return V1beta1IngressStatus.attributeTypeMap;\n }\n}\nV1beta1IngressStatus.discriminator = undefined;\nV1beta1IngressStatus.attributeTypeMap = [\n {\n \"name\": \"loadBalancer\",\n \"baseName\": \"loadBalancer\",\n \"type\": \"V1LoadBalancerStatus\"\n }\n];\nexports.V1beta1IngressStatus = V1beta1IngressStatus;\n/**\n* IngressTLS describes the transport layer security associated with an Ingress.\n*/\nclass V1beta1IngressTLS {\n static getAttributeTypeMap() {\n return V1beta1IngressTLS.attributeTypeMap;\n }\n}\nV1beta1IngressTLS.discriminator = undefined;\nV1beta1IngressTLS.attributeTypeMap = [\n {\n \"name\": \"hosts\",\n \"baseName\": \"hosts\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"secretName\",\n \"baseName\": \"secretName\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1IngressTLS = V1beta1IngressTLS;\n/**\n* JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).\n*/\nclass V1beta1JSONSchemaProps {\n static getAttributeTypeMap() {\n return V1beta1JSONSchemaProps.attributeTypeMap;\n }\n}\nV1beta1JSONSchemaProps.discriminator = undefined;\nV1beta1JSONSchemaProps.attributeTypeMap = [\n {\n \"name\": \"ref\",\n \"baseName\": \"$ref\",\n \"type\": \"string\"\n },\n {\n \"name\": \"schema\",\n \"baseName\": \"$schema\",\n \"type\": \"string\"\n },\n {\n \"name\": \"additionalItems\",\n \"baseName\": \"additionalItems\",\n \"type\": \"any\"\n },\n {\n \"name\": \"additionalProperties\",\n \"baseName\": \"additionalProperties\",\n \"type\": \"any\"\n },\n {\n \"name\": \"allOf\",\n \"baseName\": \"allOf\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"anyOf\",\n \"baseName\": \"anyOf\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"_default\",\n \"baseName\": \"default\",\n \"type\": \"any\"\n },\n {\n \"name\": \"definitions\",\n \"baseName\": \"definitions\",\n \"type\": \"{ [key: string]: V1beta1JSONSchemaProps; }\"\n },\n {\n \"name\": \"dependencies\",\n \"baseName\": \"dependencies\",\n \"type\": \"{ [key: string]: any; }\"\n },\n {\n \"name\": \"description\",\n \"baseName\": \"description\",\n \"type\": \"string\"\n },\n {\n \"name\": \"_enum\",\n \"baseName\": \"enum\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"example\",\n \"baseName\": \"example\",\n \"type\": \"any\"\n },\n {\n \"name\": \"exclusiveMaximum\",\n \"baseName\": \"exclusiveMaximum\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"exclusiveMinimum\",\n \"baseName\": \"exclusiveMinimum\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"externalDocs\",\n \"baseName\": \"externalDocs\",\n \"type\": \"V1beta1ExternalDocumentation\"\n },\n {\n \"name\": \"format\",\n \"baseName\": \"format\",\n \"type\": \"string\"\n },\n {\n \"name\": \"id\",\n \"baseName\": \"id\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"any\"\n },\n {\n \"name\": \"maxItems\",\n \"baseName\": \"maxItems\",\n \"type\": \"number\"\n },\n {\n \"name\": \"maxLength\",\n \"baseName\": \"maxLength\",\n \"type\": \"number\"\n },\n {\n \"name\": \"maxProperties\",\n \"baseName\": \"maxProperties\",\n \"type\": \"number\"\n },\n {\n \"name\": \"maximum\",\n \"baseName\": \"maximum\",\n \"type\": \"number\"\n },\n {\n \"name\": \"minItems\",\n \"baseName\": \"minItems\",\n \"type\": \"number\"\n },\n {\n \"name\": \"minLength\",\n \"baseName\": \"minLength\",\n \"type\": \"number\"\n },\n {\n \"name\": \"minProperties\",\n \"baseName\": \"minProperties\",\n \"type\": \"number\"\n },\n {\n \"name\": \"minimum\",\n \"baseName\": \"minimum\",\n \"type\": \"number\"\n },\n {\n \"name\": \"multipleOf\",\n \"baseName\": \"multipleOf\",\n \"type\": \"number\"\n },\n {\n \"name\": \"not\",\n \"baseName\": \"not\",\n \"type\": \"V1beta1JSONSchemaProps\"\n },\n {\n \"name\": \"oneOf\",\n \"baseName\": \"oneOf\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"pattern\",\n \"baseName\": \"pattern\",\n \"type\": \"string\"\n },\n {\n \"name\": \"patternProperties\",\n \"baseName\": \"patternProperties\",\n \"type\": \"{ [key: string]: V1beta1JSONSchemaProps; }\"\n },\n {\n \"name\": \"properties\",\n \"baseName\": \"properties\",\n \"type\": \"{ [key: string]: V1beta1JSONSchemaProps; }\"\n },\n {\n \"name\": \"required\",\n \"baseName\": \"required\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"title\",\n \"baseName\": \"title\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n },\n {\n \"name\": \"uniqueItems\",\n \"baseName\": \"uniqueItems\",\n \"type\": \"boolean\"\n }\n];\nexports.V1beta1JSONSchemaProps = V1beta1JSONSchemaProps;\n/**\n* JobTemplateSpec describes the data a Job should have when created from a template\n*/\nclass V1beta1JobTemplateSpec {\n static getAttributeTypeMap() {\n return V1beta1JobTemplateSpec.attributeTypeMap;\n }\n}\nV1beta1JobTemplateSpec.discriminator = undefined;\nV1beta1JobTemplateSpec.attributeTypeMap = [\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1JobSpec\"\n }\n];\nexports.V1beta1JobTemplateSpec = V1beta1JobTemplateSpec;\n/**\n* Lease defines a lease concept.\n*/\nclass V1beta1Lease {\n static getAttributeTypeMap() {\n return V1beta1Lease.attributeTypeMap;\n }\n}\nV1beta1Lease.discriminator = undefined;\nV1beta1Lease.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1LeaseSpec\"\n }\n];\nexports.V1beta1Lease = V1beta1Lease;\n/**\n* LeaseList is a list of Lease objects.\n*/\nclass V1beta1LeaseList {\n static getAttributeTypeMap() {\n return V1beta1LeaseList.attributeTypeMap;\n }\n}\nV1beta1LeaseList.discriminator = undefined;\nV1beta1LeaseList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1LeaseList = V1beta1LeaseList;\n/**\n* LeaseSpec is a specification of a Lease.\n*/\nclass V1beta1LeaseSpec {\n static getAttributeTypeMap() {\n return V1beta1LeaseSpec.attributeTypeMap;\n }\n}\nV1beta1LeaseSpec.discriminator = undefined;\nV1beta1LeaseSpec.attributeTypeMap = [\n {\n \"name\": \"acquireTime\",\n \"baseName\": \"acquireTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"holderIdentity\",\n \"baseName\": \"holderIdentity\",\n \"type\": \"string\"\n },\n {\n \"name\": \"leaseDurationSeconds\",\n \"baseName\": \"leaseDurationSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"leaseTransitions\",\n \"baseName\": \"leaseTransitions\",\n \"type\": \"number\"\n },\n {\n \"name\": \"renewTime\",\n \"baseName\": \"renewTime\",\n \"type\": \"Date\"\n }\n];\nexports.V1beta1LeaseSpec = V1beta1LeaseSpec;\n/**\n* LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.\n*/\nclass V1beta1LocalSubjectAccessReview {\n static getAttributeTypeMap() {\n return V1beta1LocalSubjectAccessReview.attributeTypeMap;\n }\n}\nV1beta1LocalSubjectAccessReview.discriminator = undefined;\nV1beta1LocalSubjectAccessReview.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1SubjectAccessReviewSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1SubjectAccessReviewStatus\"\n }\n];\nexports.V1beta1LocalSubjectAccessReview = V1beta1LocalSubjectAccessReview;\n/**\n* MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.\n*/\nclass V1beta1MutatingWebhookConfiguration {\n static getAttributeTypeMap() {\n return V1beta1MutatingWebhookConfiguration.attributeTypeMap;\n }\n}\nV1beta1MutatingWebhookConfiguration.discriminator = undefined;\nV1beta1MutatingWebhookConfiguration.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"webhooks\",\n \"baseName\": \"webhooks\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1MutatingWebhookConfiguration = V1beta1MutatingWebhookConfiguration;\n/**\n* MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.\n*/\nclass V1beta1MutatingWebhookConfigurationList {\n static getAttributeTypeMap() {\n return V1beta1MutatingWebhookConfigurationList.attributeTypeMap;\n }\n}\nV1beta1MutatingWebhookConfigurationList.discriminator = undefined;\nV1beta1MutatingWebhookConfigurationList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1MutatingWebhookConfigurationList = V1beta1MutatingWebhookConfigurationList;\n/**\n* DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy. NetworkPolicy describes what network traffic is allowed for a set of Pods\n*/\nclass V1beta1NetworkPolicy {\n static getAttributeTypeMap() {\n return V1beta1NetworkPolicy.attributeTypeMap;\n }\n}\nV1beta1NetworkPolicy.discriminator = undefined;\nV1beta1NetworkPolicy.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1NetworkPolicySpec\"\n }\n];\nexports.V1beta1NetworkPolicy = V1beta1NetworkPolicy;\n/**\n* DEPRECATED 1.9 - This group version of NetworkPolicyEgressRule is deprecated by networking/v1/NetworkPolicyEgressRule. NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8\n*/\nclass V1beta1NetworkPolicyEgressRule {\n static getAttributeTypeMap() {\n return V1beta1NetworkPolicyEgressRule.attributeTypeMap;\n }\n}\nV1beta1NetworkPolicyEgressRule.discriminator = undefined;\nV1beta1NetworkPolicyEgressRule.attributeTypeMap = [\n {\n \"name\": \"ports\",\n \"baseName\": \"ports\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"to\",\n \"baseName\": \"to\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1NetworkPolicyEgressRule = V1beta1NetworkPolicyEgressRule;\n/**\n* DEPRECATED 1.9 - This group version of NetworkPolicyIngressRule is deprecated by networking/v1/NetworkPolicyIngressRule. This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.\n*/\nclass V1beta1NetworkPolicyIngressRule {\n static getAttributeTypeMap() {\n return V1beta1NetworkPolicyIngressRule.attributeTypeMap;\n }\n}\nV1beta1NetworkPolicyIngressRule.discriminator = undefined;\nV1beta1NetworkPolicyIngressRule.attributeTypeMap = [\n {\n \"name\": \"from\",\n \"baseName\": \"from\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"ports\",\n \"baseName\": \"ports\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1NetworkPolicyIngressRule = V1beta1NetworkPolicyIngressRule;\n/**\n* DEPRECATED 1.9 - This group version of NetworkPolicyList is deprecated by networking/v1/NetworkPolicyList. Network Policy List is a list of NetworkPolicy objects.\n*/\nclass V1beta1NetworkPolicyList {\n static getAttributeTypeMap() {\n return V1beta1NetworkPolicyList.attributeTypeMap;\n }\n}\nV1beta1NetworkPolicyList.discriminator = undefined;\nV1beta1NetworkPolicyList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1NetworkPolicyList = V1beta1NetworkPolicyList;\n/**\n* DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer.\n*/\nclass V1beta1NetworkPolicyPeer {\n static getAttributeTypeMap() {\n return V1beta1NetworkPolicyPeer.attributeTypeMap;\n }\n}\nV1beta1NetworkPolicyPeer.discriminator = undefined;\nV1beta1NetworkPolicyPeer.attributeTypeMap = [\n {\n \"name\": \"ipBlock\",\n \"baseName\": \"ipBlock\",\n \"type\": \"V1beta1IPBlock\"\n },\n {\n \"name\": \"namespaceSelector\",\n \"baseName\": \"namespaceSelector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"podSelector\",\n \"baseName\": \"podSelector\",\n \"type\": \"V1LabelSelector\"\n }\n];\nexports.V1beta1NetworkPolicyPeer = V1beta1NetworkPolicyPeer;\n/**\n* DEPRECATED 1.9 - This group version of NetworkPolicyPort is deprecated by networking/v1/NetworkPolicyPort.\n*/\nclass V1beta1NetworkPolicyPort {\n static getAttributeTypeMap() {\n return V1beta1NetworkPolicyPort.attributeTypeMap;\n }\n}\nV1beta1NetworkPolicyPort.discriminator = undefined;\nV1beta1NetworkPolicyPort.attributeTypeMap = [\n {\n \"name\": \"port\",\n \"baseName\": \"port\",\n \"type\": \"any\"\n },\n {\n \"name\": \"protocol\",\n \"baseName\": \"protocol\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1NetworkPolicyPort = V1beta1NetworkPolicyPort;\n/**\n* DEPRECATED 1.9 - This group version of NetworkPolicySpec is deprecated by networking/v1/NetworkPolicySpec.\n*/\nclass V1beta1NetworkPolicySpec {\n static getAttributeTypeMap() {\n return V1beta1NetworkPolicySpec.attributeTypeMap;\n }\n}\nV1beta1NetworkPolicySpec.discriminator = undefined;\nV1beta1NetworkPolicySpec.attributeTypeMap = [\n {\n \"name\": \"egress\",\n \"baseName\": \"egress\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"ingress\",\n \"baseName\": \"ingress\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"podSelector\",\n \"baseName\": \"podSelector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"policyTypes\",\n \"baseName\": \"policyTypes\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1NetworkPolicySpec = V1beta1NetworkPolicySpec;\n/**\n* NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface\n*/\nclass V1beta1NonResourceAttributes {\n static getAttributeTypeMap() {\n return V1beta1NonResourceAttributes.attributeTypeMap;\n }\n}\nV1beta1NonResourceAttributes.discriminator = undefined;\nV1beta1NonResourceAttributes.attributeTypeMap = [\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"verb\",\n \"baseName\": \"verb\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1NonResourceAttributes = V1beta1NonResourceAttributes;\n/**\n* NonResourceRule holds information that describes a rule for the non-resource\n*/\nclass V1beta1NonResourceRule {\n static getAttributeTypeMap() {\n return V1beta1NonResourceRule.attributeTypeMap;\n }\n}\nV1beta1NonResourceRule.discriminator = undefined;\nV1beta1NonResourceRule.attributeTypeMap = [\n {\n \"name\": \"nonResourceURLs\",\n \"baseName\": \"nonResourceURLs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"verbs\",\n \"baseName\": \"verbs\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1NonResourceRule = V1beta1NonResourceRule;\n/**\n* PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods\n*/\nclass V1beta1PodDisruptionBudget {\n static getAttributeTypeMap() {\n return V1beta1PodDisruptionBudget.attributeTypeMap;\n }\n}\nV1beta1PodDisruptionBudget.discriminator = undefined;\nV1beta1PodDisruptionBudget.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1PodDisruptionBudgetSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1PodDisruptionBudgetStatus\"\n }\n];\nexports.V1beta1PodDisruptionBudget = V1beta1PodDisruptionBudget;\n/**\n* PodDisruptionBudgetList is a collection of PodDisruptionBudgets.\n*/\nclass V1beta1PodDisruptionBudgetList {\n static getAttributeTypeMap() {\n return V1beta1PodDisruptionBudgetList.attributeTypeMap;\n }\n}\nV1beta1PodDisruptionBudgetList.discriminator = undefined;\nV1beta1PodDisruptionBudgetList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1PodDisruptionBudgetList = V1beta1PodDisruptionBudgetList;\n/**\n* PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.\n*/\nclass V1beta1PodDisruptionBudgetSpec {\n static getAttributeTypeMap() {\n return V1beta1PodDisruptionBudgetSpec.attributeTypeMap;\n }\n}\nV1beta1PodDisruptionBudgetSpec.discriminator = undefined;\nV1beta1PodDisruptionBudgetSpec.attributeTypeMap = [\n {\n \"name\": \"maxUnavailable\",\n \"baseName\": \"maxUnavailable\",\n \"type\": \"any\"\n },\n {\n \"name\": \"minAvailable\",\n \"baseName\": \"minAvailable\",\n \"type\": \"any\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n }\n];\nexports.V1beta1PodDisruptionBudgetSpec = V1beta1PodDisruptionBudgetSpec;\n/**\n* PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.\n*/\nclass V1beta1PodDisruptionBudgetStatus {\n static getAttributeTypeMap() {\n return V1beta1PodDisruptionBudgetStatus.attributeTypeMap;\n }\n}\nV1beta1PodDisruptionBudgetStatus.discriminator = undefined;\nV1beta1PodDisruptionBudgetStatus.attributeTypeMap = [\n {\n \"name\": \"currentHealthy\",\n \"baseName\": \"currentHealthy\",\n \"type\": \"number\"\n },\n {\n \"name\": \"desiredHealthy\",\n \"baseName\": \"desiredHealthy\",\n \"type\": \"number\"\n },\n {\n \"name\": \"disruptedPods\",\n \"baseName\": \"disruptedPods\",\n \"type\": \"{ [key: string]: Date; }\"\n },\n {\n \"name\": \"disruptionsAllowed\",\n \"baseName\": \"disruptionsAllowed\",\n \"type\": \"number\"\n },\n {\n \"name\": \"expectedPods\",\n \"baseName\": \"expectedPods\",\n \"type\": \"number\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n }\n];\nexports.V1beta1PodDisruptionBudgetStatus = V1beta1PodDisruptionBudgetStatus;\n/**\n* PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.\n*/\nclass V1beta1PolicyRule {\n static getAttributeTypeMap() {\n return V1beta1PolicyRule.attributeTypeMap;\n }\n}\nV1beta1PolicyRule.discriminator = undefined;\nV1beta1PolicyRule.attributeTypeMap = [\n {\n \"name\": \"apiGroups\",\n \"baseName\": \"apiGroups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"nonResourceURLs\",\n \"baseName\": \"nonResourceURLs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resourceNames\",\n \"baseName\": \"resourceNames\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"verbs\",\n \"baseName\": \"verbs\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1PolicyRule = V1beta1PolicyRule;\n/**\n* PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.\n*/\nclass V1beta1PriorityClass {\n static getAttributeTypeMap() {\n return V1beta1PriorityClass.attributeTypeMap;\n }\n}\nV1beta1PriorityClass.discriminator = undefined;\nV1beta1PriorityClass.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"description\",\n \"baseName\": \"description\",\n \"type\": \"string\"\n },\n {\n \"name\": \"globalDefault\",\n \"baseName\": \"globalDefault\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"number\"\n }\n];\nexports.V1beta1PriorityClass = V1beta1PriorityClass;\n/**\n* PriorityClassList is a collection of priority classes.\n*/\nclass V1beta1PriorityClassList {\n static getAttributeTypeMap() {\n return V1beta1PriorityClassList.attributeTypeMap;\n }\n}\nV1beta1PriorityClassList.discriminator = undefined;\nV1beta1PriorityClassList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1PriorityClassList = V1beta1PriorityClassList;\n/**\n* DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for more information. ReplicaSet ensures that a specified number of pod replicas are running at any given time.\n*/\nclass V1beta1ReplicaSet {\n static getAttributeTypeMap() {\n return V1beta1ReplicaSet.attributeTypeMap;\n }\n}\nV1beta1ReplicaSet.discriminator = undefined;\nV1beta1ReplicaSet.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1ReplicaSetSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1ReplicaSetStatus\"\n }\n];\nexports.V1beta1ReplicaSet = V1beta1ReplicaSet;\n/**\n* ReplicaSetCondition describes the state of a replica set at a certain point.\n*/\nclass V1beta1ReplicaSetCondition {\n static getAttributeTypeMap() {\n return V1beta1ReplicaSetCondition.attributeTypeMap;\n }\n}\nV1beta1ReplicaSetCondition.discriminator = undefined;\nV1beta1ReplicaSetCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1ReplicaSetCondition = V1beta1ReplicaSetCondition;\n/**\n* ReplicaSetList is a collection of ReplicaSets.\n*/\nclass V1beta1ReplicaSetList {\n static getAttributeTypeMap() {\n return V1beta1ReplicaSetList.attributeTypeMap;\n }\n}\nV1beta1ReplicaSetList.discriminator = undefined;\nV1beta1ReplicaSetList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1ReplicaSetList = V1beta1ReplicaSetList;\n/**\n* ReplicaSetSpec is the specification of a ReplicaSet.\n*/\nclass V1beta1ReplicaSetSpec {\n static getAttributeTypeMap() {\n return V1beta1ReplicaSetSpec.attributeTypeMap;\n }\n}\nV1beta1ReplicaSetSpec.discriminator = undefined;\nV1beta1ReplicaSetSpec.attributeTypeMap = [\n {\n \"name\": \"minReadySeconds\",\n \"baseName\": \"minReadySeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n }\n];\nexports.V1beta1ReplicaSetSpec = V1beta1ReplicaSetSpec;\n/**\n* ReplicaSetStatus represents the current status of a ReplicaSet.\n*/\nclass V1beta1ReplicaSetStatus {\n static getAttributeTypeMap() {\n return V1beta1ReplicaSetStatus.attributeTypeMap;\n }\n}\nV1beta1ReplicaSetStatus.discriminator = undefined;\nV1beta1ReplicaSetStatus.attributeTypeMap = [\n {\n \"name\": \"availableReplicas\",\n \"baseName\": \"availableReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"fullyLabeledReplicas\",\n \"baseName\": \"fullyLabeledReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readyReplicas\",\n \"baseName\": \"readyReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n }\n];\nexports.V1beta1ReplicaSetStatus = V1beta1ReplicaSetStatus;\n/**\n* ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface\n*/\nclass V1beta1ResourceAttributes {\n static getAttributeTypeMap() {\n return V1beta1ResourceAttributes.attributeTypeMap;\n }\n}\nV1beta1ResourceAttributes.discriminator = undefined;\nV1beta1ResourceAttributes.attributeTypeMap = [\n {\n \"name\": \"group\",\n \"baseName\": \"group\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"resource\",\n \"baseName\": \"resource\",\n \"type\": \"string\"\n },\n {\n \"name\": \"subresource\",\n \"baseName\": \"subresource\",\n \"type\": \"string\"\n },\n {\n \"name\": \"verb\",\n \"baseName\": \"verb\",\n \"type\": \"string\"\n },\n {\n \"name\": \"version\",\n \"baseName\": \"version\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1ResourceAttributes = V1beta1ResourceAttributes;\n/**\n* ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.\n*/\nclass V1beta1ResourceRule {\n static getAttributeTypeMap() {\n return V1beta1ResourceRule.attributeTypeMap;\n }\n}\nV1beta1ResourceRule.discriminator = undefined;\nV1beta1ResourceRule.attributeTypeMap = [\n {\n \"name\": \"apiGroups\",\n \"baseName\": \"apiGroups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resourceNames\",\n \"baseName\": \"resourceNames\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"verbs\",\n \"baseName\": \"verbs\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1ResourceRule = V1beta1ResourceRule;\n/**\n* Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.\n*/\nclass V1beta1Role {\n static getAttributeTypeMap() {\n return V1beta1Role.attributeTypeMap;\n }\n}\nV1beta1Role.discriminator = undefined;\nV1beta1Role.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"rules\",\n \"baseName\": \"rules\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1Role = V1beta1Role;\n/**\n* RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.\n*/\nclass V1beta1RoleBinding {\n static getAttributeTypeMap() {\n return V1beta1RoleBinding.attributeTypeMap;\n }\n}\nV1beta1RoleBinding.discriminator = undefined;\nV1beta1RoleBinding.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"roleRef\",\n \"baseName\": \"roleRef\",\n \"type\": \"V1beta1RoleRef\"\n },\n {\n \"name\": \"subjects\",\n \"baseName\": \"subjects\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1RoleBinding = V1beta1RoleBinding;\n/**\n* RoleBindingList is a collection of RoleBindings\n*/\nclass V1beta1RoleBindingList {\n static getAttributeTypeMap() {\n return V1beta1RoleBindingList.attributeTypeMap;\n }\n}\nV1beta1RoleBindingList.discriminator = undefined;\nV1beta1RoleBindingList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1RoleBindingList = V1beta1RoleBindingList;\n/**\n* RoleList is a collection of Roles\n*/\nclass V1beta1RoleList {\n static getAttributeTypeMap() {\n return V1beta1RoleList.attributeTypeMap;\n }\n}\nV1beta1RoleList.discriminator = undefined;\nV1beta1RoleList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1RoleList = V1beta1RoleList;\n/**\n* RoleRef contains information that points to the role being used\n*/\nclass V1beta1RoleRef {\n static getAttributeTypeMap() {\n return V1beta1RoleRef.attributeTypeMap;\n }\n}\nV1beta1RoleRef.discriminator = undefined;\nV1beta1RoleRef.attributeTypeMap = [\n {\n \"name\": \"apiGroup\",\n \"baseName\": \"apiGroup\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1RoleRef = V1beta1RoleRef;\n/**\n* Spec to control the desired behavior of daemon set rolling update.\n*/\nclass V1beta1RollingUpdateDaemonSet {\n static getAttributeTypeMap() {\n return V1beta1RollingUpdateDaemonSet.attributeTypeMap;\n }\n}\nV1beta1RollingUpdateDaemonSet.discriminator = undefined;\nV1beta1RollingUpdateDaemonSet.attributeTypeMap = [\n {\n \"name\": \"maxUnavailable\",\n \"baseName\": \"maxUnavailable\",\n \"type\": \"any\"\n }\n];\nexports.V1beta1RollingUpdateDaemonSet = V1beta1RollingUpdateDaemonSet;\n/**\n* RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.\n*/\nclass V1beta1RollingUpdateStatefulSetStrategy {\n static getAttributeTypeMap() {\n return V1beta1RollingUpdateStatefulSetStrategy.attributeTypeMap;\n }\n}\nV1beta1RollingUpdateStatefulSetStrategy.discriminator = undefined;\nV1beta1RollingUpdateStatefulSetStrategy.attributeTypeMap = [\n {\n \"name\": \"partition\",\n \"baseName\": \"partition\",\n \"type\": \"number\"\n }\n];\nexports.V1beta1RollingUpdateStatefulSetStrategy = V1beta1RollingUpdateStatefulSetStrategy;\n/**\n* RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.\n*/\nclass V1beta1RuleWithOperations {\n static getAttributeTypeMap() {\n return V1beta1RuleWithOperations.attributeTypeMap;\n }\n}\nV1beta1RuleWithOperations.discriminator = undefined;\nV1beta1RuleWithOperations.attributeTypeMap = [\n {\n \"name\": \"apiGroups\",\n \"baseName\": \"apiGroups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"apiVersions\",\n \"baseName\": \"apiVersions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"operations\",\n \"baseName\": \"operations\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1RuleWithOperations = V1beta1RuleWithOperations;\n/**\n* SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \\\"in all namespaces\\\". Self is a special case, because users should always be able to check whether they can perform an action\n*/\nclass V1beta1SelfSubjectAccessReview {\n static getAttributeTypeMap() {\n return V1beta1SelfSubjectAccessReview.attributeTypeMap;\n }\n}\nV1beta1SelfSubjectAccessReview.discriminator = undefined;\nV1beta1SelfSubjectAccessReview.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1SelfSubjectAccessReviewSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1SubjectAccessReviewStatus\"\n }\n];\nexports.V1beta1SelfSubjectAccessReview = V1beta1SelfSubjectAccessReview;\n/**\n* SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set\n*/\nclass V1beta1SelfSubjectAccessReviewSpec {\n static getAttributeTypeMap() {\n return V1beta1SelfSubjectAccessReviewSpec.attributeTypeMap;\n }\n}\nV1beta1SelfSubjectAccessReviewSpec.discriminator = undefined;\nV1beta1SelfSubjectAccessReviewSpec.attributeTypeMap = [\n {\n \"name\": \"nonResourceAttributes\",\n \"baseName\": \"nonResourceAttributes\",\n \"type\": \"V1beta1NonResourceAttributes\"\n },\n {\n \"name\": \"resourceAttributes\",\n \"baseName\": \"resourceAttributes\",\n \"type\": \"V1beta1ResourceAttributes\"\n }\n];\nexports.V1beta1SelfSubjectAccessReviewSpec = V1beta1SelfSubjectAccessReviewSpec;\n/**\n* SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.\n*/\nclass V1beta1SelfSubjectRulesReview {\n static getAttributeTypeMap() {\n return V1beta1SelfSubjectRulesReview.attributeTypeMap;\n }\n}\nV1beta1SelfSubjectRulesReview.discriminator = undefined;\nV1beta1SelfSubjectRulesReview.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1SelfSubjectRulesReviewSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1SubjectRulesReviewStatus\"\n }\n];\nexports.V1beta1SelfSubjectRulesReview = V1beta1SelfSubjectRulesReview;\nclass V1beta1SelfSubjectRulesReviewSpec {\n static getAttributeTypeMap() {\n return V1beta1SelfSubjectRulesReviewSpec.attributeTypeMap;\n }\n}\nV1beta1SelfSubjectRulesReviewSpec.discriminator = undefined;\nV1beta1SelfSubjectRulesReviewSpec.attributeTypeMap = [\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1SelfSubjectRulesReviewSpec = V1beta1SelfSubjectRulesReviewSpec;\n/**\n* DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for more information. StatefulSet represents a set of pods with consistent identities. Identities are defined as: - Network: A single stable DNS and hostname. - Storage: As many VolumeClaims as requested. The StatefulSet guarantees that a given network identity will always map to the same storage identity.\n*/\nclass V1beta1StatefulSet {\n static getAttributeTypeMap() {\n return V1beta1StatefulSet.attributeTypeMap;\n }\n}\nV1beta1StatefulSet.discriminator = undefined;\nV1beta1StatefulSet.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1StatefulSetSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1StatefulSetStatus\"\n }\n];\nexports.V1beta1StatefulSet = V1beta1StatefulSet;\n/**\n* StatefulSetCondition describes the state of a statefulset at a certain point.\n*/\nclass V1beta1StatefulSetCondition {\n static getAttributeTypeMap() {\n return V1beta1StatefulSetCondition.attributeTypeMap;\n }\n}\nV1beta1StatefulSetCondition.discriminator = undefined;\nV1beta1StatefulSetCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1StatefulSetCondition = V1beta1StatefulSetCondition;\n/**\n* StatefulSetList is a collection of StatefulSets.\n*/\nclass V1beta1StatefulSetList {\n static getAttributeTypeMap() {\n return V1beta1StatefulSetList.attributeTypeMap;\n }\n}\nV1beta1StatefulSetList.discriminator = undefined;\nV1beta1StatefulSetList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1StatefulSetList = V1beta1StatefulSetList;\n/**\n* A StatefulSetSpec is the specification of a StatefulSet.\n*/\nclass V1beta1StatefulSetSpec {\n static getAttributeTypeMap() {\n return V1beta1StatefulSetSpec.attributeTypeMap;\n }\n}\nV1beta1StatefulSetSpec.discriminator = undefined;\nV1beta1StatefulSetSpec.attributeTypeMap = [\n {\n \"name\": \"podManagementPolicy\",\n \"baseName\": \"podManagementPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"revisionHistoryLimit\",\n \"baseName\": \"revisionHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"serviceName\",\n \"baseName\": \"serviceName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n },\n {\n \"name\": \"updateStrategy\",\n \"baseName\": \"updateStrategy\",\n \"type\": \"V1beta1StatefulSetUpdateStrategy\"\n },\n {\n \"name\": \"volumeClaimTemplates\",\n \"baseName\": \"volumeClaimTemplates\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1StatefulSetSpec = V1beta1StatefulSetSpec;\n/**\n* StatefulSetStatus represents the current state of a StatefulSet.\n*/\nclass V1beta1StatefulSetStatus {\n static getAttributeTypeMap() {\n return V1beta1StatefulSetStatus.attributeTypeMap;\n }\n}\nV1beta1StatefulSetStatus.discriminator = undefined;\nV1beta1StatefulSetStatus.attributeTypeMap = [\n {\n \"name\": \"collisionCount\",\n \"baseName\": \"collisionCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"currentReplicas\",\n \"baseName\": \"currentReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"currentRevision\",\n \"baseName\": \"currentRevision\",\n \"type\": \"string\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readyReplicas\",\n \"baseName\": \"readyReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"updateRevision\",\n \"baseName\": \"updateRevision\",\n \"type\": \"string\"\n },\n {\n \"name\": \"updatedReplicas\",\n \"baseName\": \"updatedReplicas\",\n \"type\": \"number\"\n }\n];\nexports.V1beta1StatefulSetStatus = V1beta1StatefulSetStatus;\n/**\n* StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.\n*/\nclass V1beta1StatefulSetUpdateStrategy {\n static getAttributeTypeMap() {\n return V1beta1StatefulSetUpdateStrategy.attributeTypeMap;\n }\n}\nV1beta1StatefulSetUpdateStrategy.discriminator = undefined;\nV1beta1StatefulSetUpdateStrategy.attributeTypeMap = [\n {\n \"name\": \"rollingUpdate\",\n \"baseName\": \"rollingUpdate\",\n \"type\": \"V1beta1RollingUpdateStatefulSetStrategy\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1StatefulSetUpdateStrategy = V1beta1StatefulSetUpdateStrategy;\n/**\n* StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned. StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.\n*/\nclass V1beta1StorageClass {\n static getAttributeTypeMap() {\n return V1beta1StorageClass.attributeTypeMap;\n }\n}\nV1beta1StorageClass.discriminator = undefined;\nV1beta1StorageClass.attributeTypeMap = [\n {\n \"name\": \"allowVolumeExpansion\",\n \"baseName\": \"allowVolumeExpansion\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"allowedTopologies\",\n \"baseName\": \"allowedTopologies\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"mountOptions\",\n \"baseName\": \"mountOptions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"parameters\",\n \"baseName\": \"parameters\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"provisioner\",\n \"baseName\": \"provisioner\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reclaimPolicy\",\n \"baseName\": \"reclaimPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumeBindingMode\",\n \"baseName\": \"volumeBindingMode\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1StorageClass = V1beta1StorageClass;\n/**\n* StorageClassList is a collection of storage classes.\n*/\nclass V1beta1StorageClassList {\n static getAttributeTypeMap() {\n return V1beta1StorageClassList.attributeTypeMap;\n }\n}\nV1beta1StorageClassList.discriminator = undefined;\nV1beta1StorageClassList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1StorageClassList = V1beta1StorageClassList;\n/**\n* Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.\n*/\nclass V1beta1Subject {\n static getAttributeTypeMap() {\n return V1beta1Subject.attributeTypeMap;\n }\n}\nV1beta1Subject.discriminator = undefined;\nV1beta1Subject.attributeTypeMap = [\n {\n \"name\": \"apiGroup\",\n \"baseName\": \"apiGroup\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1Subject = V1beta1Subject;\n/**\n* SubjectAccessReview checks whether or not a user or group can perform an action.\n*/\nclass V1beta1SubjectAccessReview {\n static getAttributeTypeMap() {\n return V1beta1SubjectAccessReview.attributeTypeMap;\n }\n}\nV1beta1SubjectAccessReview.discriminator = undefined;\nV1beta1SubjectAccessReview.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1SubjectAccessReviewSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1SubjectAccessReviewStatus\"\n }\n];\nexports.V1beta1SubjectAccessReview = V1beta1SubjectAccessReview;\n/**\n* SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set\n*/\nclass V1beta1SubjectAccessReviewSpec {\n static getAttributeTypeMap() {\n return V1beta1SubjectAccessReviewSpec.attributeTypeMap;\n }\n}\nV1beta1SubjectAccessReviewSpec.discriminator = undefined;\nV1beta1SubjectAccessReviewSpec.attributeTypeMap = [\n {\n \"name\": \"extra\",\n \"baseName\": \"extra\",\n \"type\": \"{ [key: string]: Array; }\"\n },\n {\n \"name\": \"group\",\n \"baseName\": \"group\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"nonResourceAttributes\",\n \"baseName\": \"nonResourceAttributes\",\n \"type\": \"V1beta1NonResourceAttributes\"\n },\n {\n \"name\": \"resourceAttributes\",\n \"baseName\": \"resourceAttributes\",\n \"type\": \"V1beta1ResourceAttributes\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1SubjectAccessReviewSpec = V1beta1SubjectAccessReviewSpec;\n/**\n* SubjectAccessReviewStatus\n*/\nclass V1beta1SubjectAccessReviewStatus {\n static getAttributeTypeMap() {\n return V1beta1SubjectAccessReviewStatus.attributeTypeMap;\n }\n}\nV1beta1SubjectAccessReviewStatus.discriminator = undefined;\nV1beta1SubjectAccessReviewStatus.attributeTypeMap = [\n {\n \"name\": \"allowed\",\n \"baseName\": \"allowed\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"denied\",\n \"baseName\": \"denied\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"evaluationError\",\n \"baseName\": \"evaluationError\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1SubjectAccessReviewStatus = V1beta1SubjectAccessReviewStatus;\n/**\n* SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete.\n*/\nclass V1beta1SubjectRulesReviewStatus {\n static getAttributeTypeMap() {\n return V1beta1SubjectRulesReviewStatus.attributeTypeMap;\n }\n}\nV1beta1SubjectRulesReviewStatus.discriminator = undefined;\nV1beta1SubjectRulesReviewStatus.attributeTypeMap = [\n {\n \"name\": \"evaluationError\",\n \"baseName\": \"evaluationError\",\n \"type\": \"string\"\n },\n {\n \"name\": \"incomplete\",\n \"baseName\": \"incomplete\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"nonResourceRules\",\n \"baseName\": \"nonResourceRules\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resourceRules\",\n \"baseName\": \"resourceRules\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1SubjectRulesReviewStatus = V1beta1SubjectRulesReviewStatus;\n/**\n* TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.\n*/\nclass V1beta1TokenReview {\n static getAttributeTypeMap() {\n return V1beta1TokenReview.attributeTypeMap;\n }\n}\nV1beta1TokenReview.discriminator = undefined;\nV1beta1TokenReview.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1TokenReviewSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1TokenReviewStatus\"\n }\n];\nexports.V1beta1TokenReview = V1beta1TokenReview;\n/**\n* TokenReviewSpec is a description of the token authentication request.\n*/\nclass V1beta1TokenReviewSpec {\n static getAttributeTypeMap() {\n return V1beta1TokenReviewSpec.attributeTypeMap;\n }\n}\nV1beta1TokenReviewSpec.discriminator = undefined;\nV1beta1TokenReviewSpec.attributeTypeMap = [\n {\n \"name\": \"audiences\",\n \"baseName\": \"audiences\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"token\",\n \"baseName\": \"token\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1TokenReviewSpec = V1beta1TokenReviewSpec;\n/**\n* TokenReviewStatus is the result of the token authentication request.\n*/\nclass V1beta1TokenReviewStatus {\n static getAttributeTypeMap() {\n return V1beta1TokenReviewStatus.attributeTypeMap;\n }\n}\nV1beta1TokenReviewStatus.discriminator = undefined;\nV1beta1TokenReviewStatus.attributeTypeMap = [\n {\n \"name\": \"audiences\",\n \"baseName\": \"audiences\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"authenticated\",\n \"baseName\": \"authenticated\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"error\",\n \"baseName\": \"error\",\n \"type\": \"string\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"V1beta1UserInfo\"\n }\n];\nexports.V1beta1TokenReviewStatus = V1beta1TokenReviewStatus;\n/**\n* UserInfo holds the information about the user needed to implement the user.Info interface.\n*/\nclass V1beta1UserInfo {\n static getAttributeTypeMap() {\n return V1beta1UserInfo.attributeTypeMap;\n }\n}\nV1beta1UserInfo.discriminator = undefined;\nV1beta1UserInfo.attributeTypeMap = [\n {\n \"name\": \"extra\",\n \"baseName\": \"extra\",\n \"type\": \"{ [key: string]: Array; }\"\n },\n {\n \"name\": \"groups\",\n \"baseName\": \"groups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n },\n {\n \"name\": \"username\",\n \"baseName\": \"username\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1UserInfo = V1beta1UserInfo;\n/**\n* ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.\n*/\nclass V1beta1ValidatingWebhookConfiguration {\n static getAttributeTypeMap() {\n return V1beta1ValidatingWebhookConfiguration.attributeTypeMap;\n }\n}\nV1beta1ValidatingWebhookConfiguration.discriminator = undefined;\nV1beta1ValidatingWebhookConfiguration.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"webhooks\",\n \"baseName\": \"webhooks\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta1ValidatingWebhookConfiguration = V1beta1ValidatingWebhookConfiguration;\n/**\n* ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.\n*/\nclass V1beta1ValidatingWebhookConfigurationList {\n static getAttributeTypeMap() {\n return V1beta1ValidatingWebhookConfigurationList.attributeTypeMap;\n }\n}\nV1beta1ValidatingWebhookConfigurationList.discriminator = undefined;\nV1beta1ValidatingWebhookConfigurationList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1ValidatingWebhookConfigurationList = V1beta1ValidatingWebhookConfigurationList;\n/**\n* VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. VolumeAttachment objects are non-namespaced.\n*/\nclass V1beta1VolumeAttachment {\n static getAttributeTypeMap() {\n return V1beta1VolumeAttachment.attributeTypeMap;\n }\n}\nV1beta1VolumeAttachment.discriminator = undefined;\nV1beta1VolumeAttachment.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1VolumeAttachmentSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1VolumeAttachmentStatus\"\n }\n];\nexports.V1beta1VolumeAttachment = V1beta1VolumeAttachment;\n/**\n* VolumeAttachmentList is a collection of VolumeAttachment objects.\n*/\nclass V1beta1VolumeAttachmentList {\n static getAttributeTypeMap() {\n return V1beta1VolumeAttachmentList.attributeTypeMap;\n }\n}\nV1beta1VolumeAttachmentList.discriminator = undefined;\nV1beta1VolumeAttachmentList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta1VolumeAttachmentList = V1beta1VolumeAttachmentList;\n/**\n* VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.\n*/\nclass V1beta1VolumeAttachmentSource {\n static getAttributeTypeMap() {\n return V1beta1VolumeAttachmentSource.attributeTypeMap;\n }\n}\nV1beta1VolumeAttachmentSource.discriminator = undefined;\nV1beta1VolumeAttachmentSource.attributeTypeMap = [\n {\n \"name\": \"persistentVolumeName\",\n \"baseName\": \"persistentVolumeName\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1VolumeAttachmentSource = V1beta1VolumeAttachmentSource;\n/**\n* VolumeAttachmentSpec is the specification of a VolumeAttachment request.\n*/\nclass V1beta1VolumeAttachmentSpec {\n static getAttributeTypeMap() {\n return V1beta1VolumeAttachmentSpec.attributeTypeMap;\n }\n}\nV1beta1VolumeAttachmentSpec.discriminator = undefined;\nV1beta1VolumeAttachmentSpec.attributeTypeMap = [\n {\n \"name\": \"attacher\",\n \"baseName\": \"attacher\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nodeName\",\n \"baseName\": \"nodeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"source\",\n \"baseName\": \"source\",\n \"type\": \"V1beta1VolumeAttachmentSource\"\n }\n];\nexports.V1beta1VolumeAttachmentSpec = V1beta1VolumeAttachmentSpec;\n/**\n* VolumeAttachmentStatus is the status of a VolumeAttachment request.\n*/\nclass V1beta1VolumeAttachmentStatus {\n static getAttributeTypeMap() {\n return V1beta1VolumeAttachmentStatus.attributeTypeMap;\n }\n}\nV1beta1VolumeAttachmentStatus.discriminator = undefined;\nV1beta1VolumeAttachmentStatus.attributeTypeMap = [\n {\n \"name\": \"attachError\",\n \"baseName\": \"attachError\",\n \"type\": \"V1beta1VolumeError\"\n },\n {\n \"name\": \"attached\",\n \"baseName\": \"attached\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"attachmentMetadata\",\n \"baseName\": \"attachmentMetadata\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"detachError\",\n \"baseName\": \"detachError\",\n \"type\": \"V1beta1VolumeError\"\n }\n];\nexports.V1beta1VolumeAttachmentStatus = V1beta1VolumeAttachmentStatus;\n/**\n* VolumeError captures an error encountered during a volume operation.\n*/\nclass V1beta1VolumeError {\n static getAttributeTypeMap() {\n return V1beta1VolumeError.attributeTypeMap;\n }\n}\nV1beta1VolumeError.discriminator = undefined;\nV1beta1VolumeError.attributeTypeMap = [\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"time\",\n \"baseName\": \"time\",\n \"type\": \"Date\"\n }\n];\nexports.V1beta1VolumeError = V1beta1VolumeError;\n/**\n* Webhook describes an admission webhook and the resources and operations it applies to.\n*/\nclass V1beta1Webhook {\n static getAttributeTypeMap() {\n return V1beta1Webhook.attributeTypeMap;\n }\n}\nV1beta1Webhook.discriminator = undefined;\nV1beta1Webhook.attributeTypeMap = [\n {\n \"name\": \"clientConfig\",\n \"baseName\": \"clientConfig\",\n \"type\": \"AdmissionregistrationV1beta1WebhookClientConfig\"\n },\n {\n \"name\": \"failurePolicy\",\n \"baseName\": \"failurePolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespaceSelector\",\n \"baseName\": \"namespaceSelector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"rules\",\n \"baseName\": \"rules\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"sideEffects\",\n \"baseName\": \"sideEffects\",\n \"type\": \"string\"\n }\n];\nexports.V1beta1Webhook = V1beta1Webhook;\n/**\n* DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the release notes for more information. ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.\n*/\nclass V1beta2ControllerRevision {\n static getAttributeTypeMap() {\n return V1beta2ControllerRevision.attributeTypeMap;\n }\n}\nV1beta2ControllerRevision.discriminator = undefined;\nV1beta2ControllerRevision.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"data\",\n \"baseName\": \"data\",\n \"type\": \"RuntimeRawExtension\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"revision\",\n \"baseName\": \"revision\",\n \"type\": \"number\"\n }\n];\nexports.V1beta2ControllerRevision = V1beta2ControllerRevision;\n/**\n* ControllerRevisionList is a resource containing a list of ControllerRevision objects.\n*/\nclass V1beta2ControllerRevisionList {\n static getAttributeTypeMap() {\n return V1beta2ControllerRevisionList.attributeTypeMap;\n }\n}\nV1beta2ControllerRevisionList.discriminator = undefined;\nV1beta2ControllerRevisionList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta2ControllerRevisionList = V1beta2ControllerRevisionList;\n/**\n* DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set.\n*/\nclass V1beta2DaemonSet {\n static getAttributeTypeMap() {\n return V1beta2DaemonSet.attributeTypeMap;\n }\n}\nV1beta2DaemonSet.discriminator = undefined;\nV1beta2DaemonSet.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta2DaemonSetSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta2DaemonSetStatus\"\n }\n];\nexports.V1beta2DaemonSet = V1beta2DaemonSet;\n/**\n* DaemonSetCondition describes the state of a DaemonSet at a certain point.\n*/\nclass V1beta2DaemonSetCondition {\n static getAttributeTypeMap() {\n return V1beta2DaemonSetCondition.attributeTypeMap;\n }\n}\nV1beta2DaemonSetCondition.discriminator = undefined;\nV1beta2DaemonSetCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1beta2DaemonSetCondition = V1beta2DaemonSetCondition;\n/**\n* DaemonSetList is a collection of daemon sets.\n*/\nclass V1beta2DaemonSetList {\n static getAttributeTypeMap() {\n return V1beta2DaemonSetList.attributeTypeMap;\n }\n}\nV1beta2DaemonSetList.discriminator = undefined;\nV1beta2DaemonSetList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta2DaemonSetList = V1beta2DaemonSetList;\n/**\n* DaemonSetSpec is the specification of a daemon set.\n*/\nclass V1beta2DaemonSetSpec {\n static getAttributeTypeMap() {\n return V1beta2DaemonSetSpec.attributeTypeMap;\n }\n}\nV1beta2DaemonSetSpec.discriminator = undefined;\nV1beta2DaemonSetSpec.attributeTypeMap = [\n {\n \"name\": \"minReadySeconds\",\n \"baseName\": \"minReadySeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"revisionHistoryLimit\",\n \"baseName\": \"revisionHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n },\n {\n \"name\": \"updateStrategy\",\n \"baseName\": \"updateStrategy\",\n \"type\": \"V1beta2DaemonSetUpdateStrategy\"\n }\n];\nexports.V1beta2DaemonSetSpec = V1beta2DaemonSetSpec;\n/**\n* DaemonSetStatus represents the current status of a daemon set.\n*/\nclass V1beta2DaemonSetStatus {\n static getAttributeTypeMap() {\n return V1beta2DaemonSetStatus.attributeTypeMap;\n }\n}\nV1beta2DaemonSetStatus.discriminator = undefined;\nV1beta2DaemonSetStatus.attributeTypeMap = [\n {\n \"name\": \"collisionCount\",\n \"baseName\": \"collisionCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"currentNumberScheduled\",\n \"baseName\": \"currentNumberScheduled\",\n \"type\": \"number\"\n },\n {\n \"name\": \"desiredNumberScheduled\",\n \"baseName\": \"desiredNumberScheduled\",\n \"type\": \"number\"\n },\n {\n \"name\": \"numberAvailable\",\n \"baseName\": \"numberAvailable\",\n \"type\": \"number\"\n },\n {\n \"name\": \"numberMisscheduled\",\n \"baseName\": \"numberMisscheduled\",\n \"type\": \"number\"\n },\n {\n \"name\": \"numberReady\",\n \"baseName\": \"numberReady\",\n \"type\": \"number\"\n },\n {\n \"name\": \"numberUnavailable\",\n \"baseName\": \"numberUnavailable\",\n \"type\": \"number\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"updatedNumberScheduled\",\n \"baseName\": \"updatedNumberScheduled\",\n \"type\": \"number\"\n }\n];\nexports.V1beta2DaemonSetStatus = V1beta2DaemonSetStatus;\n/**\n* DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.\n*/\nclass V1beta2DaemonSetUpdateStrategy {\n static getAttributeTypeMap() {\n return V1beta2DaemonSetUpdateStrategy.attributeTypeMap;\n }\n}\nV1beta2DaemonSetUpdateStrategy.discriminator = undefined;\nV1beta2DaemonSetUpdateStrategy.attributeTypeMap = [\n {\n \"name\": \"rollingUpdate\",\n \"baseName\": \"rollingUpdate\",\n \"type\": \"V1beta2RollingUpdateDaemonSet\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1beta2DaemonSetUpdateStrategy = V1beta2DaemonSetUpdateStrategy;\n/**\n* DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.\n*/\nclass V1beta2Deployment {\n static getAttributeTypeMap() {\n return V1beta2Deployment.attributeTypeMap;\n }\n}\nV1beta2Deployment.discriminator = undefined;\nV1beta2Deployment.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta2DeploymentSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta2DeploymentStatus\"\n }\n];\nexports.V1beta2Deployment = V1beta2Deployment;\n/**\n* DeploymentCondition describes the state of a deployment at a certain point.\n*/\nclass V1beta2DeploymentCondition {\n static getAttributeTypeMap() {\n return V1beta2DeploymentCondition.attributeTypeMap;\n }\n}\nV1beta2DeploymentCondition.discriminator = undefined;\nV1beta2DeploymentCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"lastUpdateTime\",\n \"baseName\": \"lastUpdateTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1beta2DeploymentCondition = V1beta2DeploymentCondition;\n/**\n* DeploymentList is a list of Deployments.\n*/\nclass V1beta2DeploymentList {\n static getAttributeTypeMap() {\n return V1beta2DeploymentList.attributeTypeMap;\n }\n}\nV1beta2DeploymentList.discriminator = undefined;\nV1beta2DeploymentList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta2DeploymentList = V1beta2DeploymentList;\n/**\n* DeploymentSpec is the specification of the desired behavior of the Deployment.\n*/\nclass V1beta2DeploymentSpec {\n static getAttributeTypeMap() {\n return V1beta2DeploymentSpec.attributeTypeMap;\n }\n}\nV1beta2DeploymentSpec.discriminator = undefined;\nV1beta2DeploymentSpec.attributeTypeMap = [\n {\n \"name\": \"minReadySeconds\",\n \"baseName\": \"minReadySeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"paused\",\n \"baseName\": \"paused\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"progressDeadlineSeconds\",\n \"baseName\": \"progressDeadlineSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"revisionHistoryLimit\",\n \"baseName\": \"revisionHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"strategy\",\n \"baseName\": \"strategy\",\n \"type\": \"V1beta2DeploymentStrategy\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n }\n];\nexports.V1beta2DeploymentSpec = V1beta2DeploymentSpec;\n/**\n* DeploymentStatus is the most recently observed status of the Deployment.\n*/\nclass V1beta2DeploymentStatus {\n static getAttributeTypeMap() {\n return V1beta2DeploymentStatus.attributeTypeMap;\n }\n}\nV1beta2DeploymentStatus.discriminator = undefined;\nV1beta2DeploymentStatus.attributeTypeMap = [\n {\n \"name\": \"availableReplicas\",\n \"baseName\": \"availableReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"collisionCount\",\n \"baseName\": \"collisionCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readyReplicas\",\n \"baseName\": \"readyReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"unavailableReplicas\",\n \"baseName\": \"unavailableReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"updatedReplicas\",\n \"baseName\": \"updatedReplicas\",\n \"type\": \"number\"\n }\n];\nexports.V1beta2DeploymentStatus = V1beta2DeploymentStatus;\n/**\n* DeploymentStrategy describes how to replace existing pods with new ones.\n*/\nclass V1beta2DeploymentStrategy {\n static getAttributeTypeMap() {\n return V1beta2DeploymentStrategy.attributeTypeMap;\n }\n}\nV1beta2DeploymentStrategy.discriminator = undefined;\nV1beta2DeploymentStrategy.attributeTypeMap = [\n {\n \"name\": \"rollingUpdate\",\n \"baseName\": \"rollingUpdate\",\n \"type\": \"V1beta2RollingUpdateDeployment\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1beta2DeploymentStrategy = V1beta2DeploymentStrategy;\n/**\n* DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for more information. ReplicaSet ensures that a specified number of pod replicas are running at any given time.\n*/\nclass V1beta2ReplicaSet {\n static getAttributeTypeMap() {\n return V1beta2ReplicaSet.attributeTypeMap;\n }\n}\nV1beta2ReplicaSet.discriminator = undefined;\nV1beta2ReplicaSet.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta2ReplicaSetSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta2ReplicaSetStatus\"\n }\n];\nexports.V1beta2ReplicaSet = V1beta2ReplicaSet;\n/**\n* ReplicaSetCondition describes the state of a replica set at a certain point.\n*/\nclass V1beta2ReplicaSetCondition {\n static getAttributeTypeMap() {\n return V1beta2ReplicaSetCondition.attributeTypeMap;\n }\n}\nV1beta2ReplicaSetCondition.discriminator = undefined;\nV1beta2ReplicaSetCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1beta2ReplicaSetCondition = V1beta2ReplicaSetCondition;\n/**\n* ReplicaSetList is a collection of ReplicaSets.\n*/\nclass V1beta2ReplicaSetList {\n static getAttributeTypeMap() {\n return V1beta2ReplicaSetList.attributeTypeMap;\n }\n}\nV1beta2ReplicaSetList.discriminator = undefined;\nV1beta2ReplicaSetList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta2ReplicaSetList = V1beta2ReplicaSetList;\n/**\n* ReplicaSetSpec is the specification of a ReplicaSet.\n*/\nclass V1beta2ReplicaSetSpec {\n static getAttributeTypeMap() {\n return V1beta2ReplicaSetSpec.attributeTypeMap;\n }\n}\nV1beta2ReplicaSetSpec.discriminator = undefined;\nV1beta2ReplicaSetSpec.attributeTypeMap = [\n {\n \"name\": \"minReadySeconds\",\n \"baseName\": \"minReadySeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n }\n];\nexports.V1beta2ReplicaSetSpec = V1beta2ReplicaSetSpec;\n/**\n* ReplicaSetStatus represents the current status of a ReplicaSet.\n*/\nclass V1beta2ReplicaSetStatus {\n static getAttributeTypeMap() {\n return V1beta2ReplicaSetStatus.attributeTypeMap;\n }\n}\nV1beta2ReplicaSetStatus.discriminator = undefined;\nV1beta2ReplicaSetStatus.attributeTypeMap = [\n {\n \"name\": \"availableReplicas\",\n \"baseName\": \"availableReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"fullyLabeledReplicas\",\n \"baseName\": \"fullyLabeledReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readyReplicas\",\n \"baseName\": \"readyReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n }\n];\nexports.V1beta2ReplicaSetStatus = V1beta2ReplicaSetStatus;\n/**\n* Spec to control the desired behavior of daemon set rolling update.\n*/\nclass V1beta2RollingUpdateDaemonSet {\n static getAttributeTypeMap() {\n return V1beta2RollingUpdateDaemonSet.attributeTypeMap;\n }\n}\nV1beta2RollingUpdateDaemonSet.discriminator = undefined;\nV1beta2RollingUpdateDaemonSet.attributeTypeMap = [\n {\n \"name\": \"maxUnavailable\",\n \"baseName\": \"maxUnavailable\",\n \"type\": \"any\"\n }\n];\nexports.V1beta2RollingUpdateDaemonSet = V1beta2RollingUpdateDaemonSet;\n/**\n* Spec to control the desired behavior of rolling update.\n*/\nclass V1beta2RollingUpdateDeployment {\n static getAttributeTypeMap() {\n return V1beta2RollingUpdateDeployment.attributeTypeMap;\n }\n}\nV1beta2RollingUpdateDeployment.discriminator = undefined;\nV1beta2RollingUpdateDeployment.attributeTypeMap = [\n {\n \"name\": \"maxSurge\",\n \"baseName\": \"maxSurge\",\n \"type\": \"any\"\n },\n {\n \"name\": \"maxUnavailable\",\n \"baseName\": \"maxUnavailable\",\n \"type\": \"any\"\n }\n];\nexports.V1beta2RollingUpdateDeployment = V1beta2RollingUpdateDeployment;\n/**\n* RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.\n*/\nclass V1beta2RollingUpdateStatefulSetStrategy {\n static getAttributeTypeMap() {\n return V1beta2RollingUpdateStatefulSetStrategy.attributeTypeMap;\n }\n}\nV1beta2RollingUpdateStatefulSetStrategy.discriminator = undefined;\nV1beta2RollingUpdateStatefulSetStrategy.attributeTypeMap = [\n {\n \"name\": \"partition\",\n \"baseName\": \"partition\",\n \"type\": \"number\"\n }\n];\nexports.V1beta2RollingUpdateStatefulSetStrategy = V1beta2RollingUpdateStatefulSetStrategy;\n/**\n* Scale represents a scaling request for a resource.\n*/\nclass V1beta2Scale {\n static getAttributeTypeMap() {\n return V1beta2Scale.attributeTypeMap;\n }\n}\nV1beta2Scale.discriminator = undefined;\nV1beta2Scale.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta2ScaleSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta2ScaleStatus\"\n }\n];\nexports.V1beta2Scale = V1beta2Scale;\n/**\n* ScaleSpec describes the attributes of a scale subresource\n*/\nclass V1beta2ScaleSpec {\n static getAttributeTypeMap() {\n return V1beta2ScaleSpec.attributeTypeMap;\n }\n}\nV1beta2ScaleSpec.discriminator = undefined;\nV1beta2ScaleSpec.attributeTypeMap = [\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n }\n];\nexports.V1beta2ScaleSpec = V1beta2ScaleSpec;\n/**\n* ScaleStatus represents the current status of a scale subresource.\n*/\nclass V1beta2ScaleStatus {\n static getAttributeTypeMap() {\n return V1beta2ScaleStatus.attributeTypeMap;\n }\n}\nV1beta2ScaleStatus.discriminator = undefined;\nV1beta2ScaleStatus.attributeTypeMap = [\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"targetSelector\",\n \"baseName\": \"targetSelector\",\n \"type\": \"string\"\n }\n];\nexports.V1beta2ScaleStatus = V1beta2ScaleStatus;\n/**\n* DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for more information. StatefulSet represents a set of pods with consistent identities. Identities are defined as: - Network: A single stable DNS and hostname. - Storage: As many VolumeClaims as requested. The StatefulSet guarantees that a given network identity will always map to the same storage identity.\n*/\nclass V1beta2StatefulSet {\n static getAttributeTypeMap() {\n return V1beta2StatefulSet.attributeTypeMap;\n }\n}\nV1beta2StatefulSet.discriminator = undefined;\nV1beta2StatefulSet.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta2StatefulSetSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta2StatefulSetStatus\"\n }\n];\nexports.V1beta2StatefulSet = V1beta2StatefulSet;\n/**\n* StatefulSetCondition describes the state of a statefulset at a certain point.\n*/\nclass V1beta2StatefulSetCondition {\n static getAttributeTypeMap() {\n return V1beta2StatefulSetCondition.attributeTypeMap;\n }\n}\nV1beta2StatefulSetCondition.discriminator = undefined;\nV1beta2StatefulSetCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1beta2StatefulSetCondition = V1beta2StatefulSetCondition;\n/**\n* StatefulSetList is a collection of StatefulSets.\n*/\nclass V1beta2StatefulSetList {\n static getAttributeTypeMap() {\n return V1beta2StatefulSetList.attributeTypeMap;\n }\n}\nV1beta2StatefulSetList.discriminator = undefined;\nV1beta2StatefulSetList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V1beta2StatefulSetList = V1beta2StatefulSetList;\n/**\n* A StatefulSetSpec is the specification of a StatefulSet.\n*/\nclass V1beta2StatefulSetSpec {\n static getAttributeTypeMap() {\n return V1beta2StatefulSetSpec.attributeTypeMap;\n }\n}\nV1beta2StatefulSetSpec.discriminator = undefined;\nV1beta2StatefulSetSpec.attributeTypeMap = [\n {\n \"name\": \"podManagementPolicy\",\n \"baseName\": \"podManagementPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"revisionHistoryLimit\",\n \"baseName\": \"revisionHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"serviceName\",\n \"baseName\": \"serviceName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n },\n {\n \"name\": \"updateStrategy\",\n \"baseName\": \"updateStrategy\",\n \"type\": \"V1beta2StatefulSetUpdateStrategy\"\n },\n {\n \"name\": \"volumeClaimTemplates\",\n \"baseName\": \"volumeClaimTemplates\",\n \"type\": \"Array\"\n }\n];\nexports.V1beta2StatefulSetSpec = V1beta2StatefulSetSpec;\n/**\n* StatefulSetStatus represents the current state of a StatefulSet.\n*/\nclass V1beta2StatefulSetStatus {\n static getAttributeTypeMap() {\n return V1beta2StatefulSetStatus.attributeTypeMap;\n }\n}\nV1beta2StatefulSetStatus.discriminator = undefined;\nV1beta2StatefulSetStatus.attributeTypeMap = [\n {\n \"name\": \"collisionCount\",\n \"baseName\": \"collisionCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"currentReplicas\",\n \"baseName\": \"currentReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"currentRevision\",\n \"baseName\": \"currentRevision\",\n \"type\": \"string\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readyReplicas\",\n \"baseName\": \"readyReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"updateRevision\",\n \"baseName\": \"updateRevision\",\n \"type\": \"string\"\n },\n {\n \"name\": \"updatedReplicas\",\n \"baseName\": \"updatedReplicas\",\n \"type\": \"number\"\n }\n];\nexports.V1beta2StatefulSetStatus = V1beta2StatefulSetStatus;\n/**\n* StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.\n*/\nclass V1beta2StatefulSetUpdateStrategy {\n static getAttributeTypeMap() {\n return V1beta2StatefulSetUpdateStrategy.attributeTypeMap;\n }\n}\nV1beta2StatefulSetUpdateStrategy.discriminator = undefined;\nV1beta2StatefulSetUpdateStrategy.attributeTypeMap = [\n {\n \"name\": \"rollingUpdate\",\n \"baseName\": \"rollingUpdate\",\n \"type\": \"V1beta2RollingUpdateStatefulSetStrategy\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V1beta2StatefulSetUpdateStrategy = V1beta2StatefulSetUpdateStrategy;\n/**\n* CronJob represents the configuration of a single cron job.\n*/\nclass V2alpha1CronJob {\n static getAttributeTypeMap() {\n return V2alpha1CronJob.attributeTypeMap;\n }\n}\nV2alpha1CronJob.discriminator = undefined;\nV2alpha1CronJob.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V2alpha1CronJobSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V2alpha1CronJobStatus\"\n }\n];\nexports.V2alpha1CronJob = V2alpha1CronJob;\n/**\n* CronJobList is a collection of cron jobs.\n*/\nclass V2alpha1CronJobList {\n static getAttributeTypeMap() {\n return V2alpha1CronJobList.attributeTypeMap;\n }\n}\nV2alpha1CronJobList.discriminator = undefined;\nV2alpha1CronJobList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V2alpha1CronJobList = V2alpha1CronJobList;\n/**\n* CronJobSpec describes how the job execution will look like and when it will actually run.\n*/\nclass V2alpha1CronJobSpec {\n static getAttributeTypeMap() {\n return V2alpha1CronJobSpec.attributeTypeMap;\n }\n}\nV2alpha1CronJobSpec.discriminator = undefined;\nV2alpha1CronJobSpec.attributeTypeMap = [\n {\n \"name\": \"concurrencyPolicy\",\n \"baseName\": \"concurrencyPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"failedJobsHistoryLimit\",\n \"baseName\": \"failedJobsHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"jobTemplate\",\n \"baseName\": \"jobTemplate\",\n \"type\": \"V2alpha1JobTemplateSpec\"\n },\n {\n \"name\": \"schedule\",\n \"baseName\": \"schedule\",\n \"type\": \"string\"\n },\n {\n \"name\": \"startingDeadlineSeconds\",\n \"baseName\": \"startingDeadlineSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"successfulJobsHistoryLimit\",\n \"baseName\": \"successfulJobsHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"suspend\",\n \"baseName\": \"suspend\",\n \"type\": \"boolean\"\n }\n];\nexports.V2alpha1CronJobSpec = V2alpha1CronJobSpec;\n/**\n* CronJobStatus represents the current state of a cron job.\n*/\nclass V2alpha1CronJobStatus {\n static getAttributeTypeMap() {\n return V2alpha1CronJobStatus.attributeTypeMap;\n }\n}\nV2alpha1CronJobStatus.discriminator = undefined;\nV2alpha1CronJobStatus.attributeTypeMap = [\n {\n \"name\": \"active\",\n \"baseName\": \"active\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"lastScheduleTime\",\n \"baseName\": \"lastScheduleTime\",\n \"type\": \"Date\"\n }\n];\nexports.V2alpha1CronJobStatus = V2alpha1CronJobStatus;\n/**\n* JobTemplateSpec describes the data a Job should have when created from a template\n*/\nclass V2alpha1JobTemplateSpec {\n static getAttributeTypeMap() {\n return V2alpha1JobTemplateSpec.attributeTypeMap;\n }\n}\nV2alpha1JobTemplateSpec.discriminator = undefined;\nV2alpha1JobTemplateSpec.attributeTypeMap = [\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1JobSpec\"\n }\n];\nexports.V2alpha1JobTemplateSpec = V2alpha1JobTemplateSpec;\n/**\n* CrossVersionObjectReference contains enough information to let you identify the referred resource.\n*/\nclass V2beta1CrossVersionObjectReference {\n static getAttributeTypeMap() {\n return V2beta1CrossVersionObjectReference.attributeTypeMap;\n }\n}\nV2beta1CrossVersionObjectReference.discriminator = undefined;\nV2beta1CrossVersionObjectReference.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\nexports.V2beta1CrossVersionObjectReference = V2beta1CrossVersionObjectReference;\n/**\n* ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). Exactly one \\\"target\\\" type should be set.\n*/\nclass V2beta1ExternalMetricSource {\n static getAttributeTypeMap() {\n return V2beta1ExternalMetricSource.attributeTypeMap;\n }\n}\nV2beta1ExternalMetricSource.discriminator = undefined;\nV2beta1ExternalMetricSource.attributeTypeMap = [\n {\n \"name\": \"metricName\",\n \"baseName\": \"metricName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metricSelector\",\n \"baseName\": \"metricSelector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"targetAverageValue\",\n \"baseName\": \"targetAverageValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"targetValue\",\n \"baseName\": \"targetValue\",\n \"type\": \"string\"\n }\n];\nexports.V2beta1ExternalMetricSource = V2beta1ExternalMetricSource;\n/**\n* ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.\n*/\nclass V2beta1ExternalMetricStatus {\n static getAttributeTypeMap() {\n return V2beta1ExternalMetricStatus.attributeTypeMap;\n }\n}\nV2beta1ExternalMetricStatus.discriminator = undefined;\nV2beta1ExternalMetricStatus.attributeTypeMap = [\n {\n \"name\": \"currentAverageValue\",\n \"baseName\": \"currentAverageValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"currentValue\",\n \"baseName\": \"currentValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metricName\",\n \"baseName\": \"metricName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metricSelector\",\n \"baseName\": \"metricSelector\",\n \"type\": \"V1LabelSelector\"\n }\n];\nexports.V2beta1ExternalMetricStatus = V2beta1ExternalMetricStatus;\n/**\n* HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.\n*/\nclass V2beta1HorizontalPodAutoscaler {\n static getAttributeTypeMap() {\n return V2beta1HorizontalPodAutoscaler.attributeTypeMap;\n }\n}\nV2beta1HorizontalPodAutoscaler.discriminator = undefined;\nV2beta1HorizontalPodAutoscaler.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V2beta1HorizontalPodAutoscalerSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V2beta1HorizontalPodAutoscalerStatus\"\n }\n];\nexports.V2beta1HorizontalPodAutoscaler = V2beta1HorizontalPodAutoscaler;\n/**\n* HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.\n*/\nclass V2beta1HorizontalPodAutoscalerCondition {\n static getAttributeTypeMap() {\n return V2beta1HorizontalPodAutoscalerCondition.attributeTypeMap;\n }\n}\nV2beta1HorizontalPodAutoscalerCondition.discriminator = undefined;\nV2beta1HorizontalPodAutoscalerCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V2beta1HorizontalPodAutoscalerCondition = V2beta1HorizontalPodAutoscalerCondition;\n/**\n* HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.\n*/\nclass V2beta1HorizontalPodAutoscalerList {\n static getAttributeTypeMap() {\n return V2beta1HorizontalPodAutoscalerList.attributeTypeMap;\n }\n}\nV2beta1HorizontalPodAutoscalerList.discriminator = undefined;\nV2beta1HorizontalPodAutoscalerList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V2beta1HorizontalPodAutoscalerList = V2beta1HorizontalPodAutoscalerList;\n/**\n* HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.\n*/\nclass V2beta1HorizontalPodAutoscalerSpec {\n static getAttributeTypeMap() {\n return V2beta1HorizontalPodAutoscalerSpec.attributeTypeMap;\n }\n}\nV2beta1HorizontalPodAutoscalerSpec.discriminator = undefined;\nV2beta1HorizontalPodAutoscalerSpec.attributeTypeMap = [\n {\n \"name\": \"maxReplicas\",\n \"baseName\": \"maxReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"metrics\",\n \"baseName\": \"metrics\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"minReplicas\",\n \"baseName\": \"minReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"scaleTargetRef\",\n \"baseName\": \"scaleTargetRef\",\n \"type\": \"V2beta1CrossVersionObjectReference\"\n }\n];\nexports.V2beta1HorizontalPodAutoscalerSpec = V2beta1HorizontalPodAutoscalerSpec;\n/**\n* HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.\n*/\nclass V2beta1HorizontalPodAutoscalerStatus {\n static getAttributeTypeMap() {\n return V2beta1HorizontalPodAutoscalerStatus.attributeTypeMap;\n }\n}\nV2beta1HorizontalPodAutoscalerStatus.discriminator = undefined;\nV2beta1HorizontalPodAutoscalerStatus.attributeTypeMap = [\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"currentMetrics\",\n \"baseName\": \"currentMetrics\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"currentReplicas\",\n \"baseName\": \"currentReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"desiredReplicas\",\n \"baseName\": \"desiredReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"lastScaleTime\",\n \"baseName\": \"lastScaleTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n }\n];\nexports.V2beta1HorizontalPodAutoscalerStatus = V2beta1HorizontalPodAutoscalerStatus;\n/**\n* MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).\n*/\nclass V2beta1MetricSpec {\n static getAttributeTypeMap() {\n return V2beta1MetricSpec.attributeTypeMap;\n }\n}\nV2beta1MetricSpec.discriminator = undefined;\nV2beta1MetricSpec.attributeTypeMap = [\n {\n \"name\": \"external\",\n \"baseName\": \"external\",\n \"type\": \"V2beta1ExternalMetricSource\"\n },\n {\n \"name\": \"object\",\n \"baseName\": \"object\",\n \"type\": \"V2beta1ObjectMetricSource\"\n },\n {\n \"name\": \"pods\",\n \"baseName\": \"pods\",\n \"type\": \"V2beta1PodsMetricSource\"\n },\n {\n \"name\": \"resource\",\n \"baseName\": \"resource\",\n \"type\": \"V2beta1ResourceMetricSource\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V2beta1MetricSpec = V2beta1MetricSpec;\n/**\n* MetricStatus describes the last-read state of a single metric.\n*/\nclass V2beta1MetricStatus {\n static getAttributeTypeMap() {\n return V2beta1MetricStatus.attributeTypeMap;\n }\n}\nV2beta1MetricStatus.discriminator = undefined;\nV2beta1MetricStatus.attributeTypeMap = [\n {\n \"name\": \"external\",\n \"baseName\": \"external\",\n \"type\": \"V2beta1ExternalMetricStatus\"\n },\n {\n \"name\": \"object\",\n \"baseName\": \"object\",\n \"type\": \"V2beta1ObjectMetricStatus\"\n },\n {\n \"name\": \"pods\",\n \"baseName\": \"pods\",\n \"type\": \"V2beta1PodsMetricStatus\"\n },\n {\n \"name\": \"resource\",\n \"baseName\": \"resource\",\n \"type\": \"V2beta1ResourceMetricStatus\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V2beta1MetricStatus = V2beta1MetricStatus;\n/**\n* ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\n*/\nclass V2beta1ObjectMetricSource {\n static getAttributeTypeMap() {\n return V2beta1ObjectMetricSource.attributeTypeMap;\n }\n}\nV2beta1ObjectMetricSource.discriminator = undefined;\nV2beta1ObjectMetricSource.attributeTypeMap = [\n {\n \"name\": \"averageValue\",\n \"baseName\": \"averageValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metricName\",\n \"baseName\": \"metricName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"target\",\n \"baseName\": \"target\",\n \"type\": \"V2beta1CrossVersionObjectReference\"\n },\n {\n \"name\": \"targetValue\",\n \"baseName\": \"targetValue\",\n \"type\": \"string\"\n }\n];\nexports.V2beta1ObjectMetricSource = V2beta1ObjectMetricSource;\n/**\n* ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\n*/\nclass V2beta1ObjectMetricStatus {\n static getAttributeTypeMap() {\n return V2beta1ObjectMetricStatus.attributeTypeMap;\n }\n}\nV2beta1ObjectMetricStatus.discriminator = undefined;\nV2beta1ObjectMetricStatus.attributeTypeMap = [\n {\n \"name\": \"averageValue\",\n \"baseName\": \"averageValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"currentValue\",\n \"baseName\": \"currentValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metricName\",\n \"baseName\": \"metricName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"target\",\n \"baseName\": \"target\",\n \"type\": \"V2beta1CrossVersionObjectReference\"\n }\n];\nexports.V2beta1ObjectMetricStatus = V2beta1ObjectMetricStatus;\n/**\n* PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\n*/\nclass V2beta1PodsMetricSource {\n static getAttributeTypeMap() {\n return V2beta1PodsMetricSource.attributeTypeMap;\n }\n}\nV2beta1PodsMetricSource.discriminator = undefined;\nV2beta1PodsMetricSource.attributeTypeMap = [\n {\n \"name\": \"metricName\",\n \"baseName\": \"metricName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"targetAverageValue\",\n \"baseName\": \"targetAverageValue\",\n \"type\": \"string\"\n }\n];\nexports.V2beta1PodsMetricSource = V2beta1PodsMetricSource;\n/**\n* PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).\n*/\nclass V2beta1PodsMetricStatus {\n static getAttributeTypeMap() {\n return V2beta1PodsMetricStatus.attributeTypeMap;\n }\n}\nV2beta1PodsMetricStatus.discriminator = undefined;\nV2beta1PodsMetricStatus.attributeTypeMap = [\n {\n \"name\": \"currentAverageValue\",\n \"baseName\": \"currentAverageValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metricName\",\n \"baseName\": \"metricName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n }\n];\nexports.V2beta1PodsMetricStatus = V2beta1PodsMetricStatus;\n/**\n* ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \\\"pods\\\" source. Only one \\\"target\\\" type should be set.\n*/\nclass V2beta1ResourceMetricSource {\n static getAttributeTypeMap() {\n return V2beta1ResourceMetricSource.attributeTypeMap;\n }\n}\nV2beta1ResourceMetricSource.discriminator = undefined;\nV2beta1ResourceMetricSource.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"targetAverageUtilization\",\n \"baseName\": \"targetAverageUtilization\",\n \"type\": \"number\"\n },\n {\n \"name\": \"targetAverageValue\",\n \"baseName\": \"targetAverageValue\",\n \"type\": \"string\"\n }\n];\nexports.V2beta1ResourceMetricSource = V2beta1ResourceMetricSource;\n/**\n* ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \\\"pods\\\" source.\n*/\nclass V2beta1ResourceMetricStatus {\n static getAttributeTypeMap() {\n return V2beta1ResourceMetricStatus.attributeTypeMap;\n }\n}\nV2beta1ResourceMetricStatus.discriminator = undefined;\nV2beta1ResourceMetricStatus.attributeTypeMap = [\n {\n \"name\": \"currentAverageUtilization\",\n \"baseName\": \"currentAverageUtilization\",\n \"type\": \"number\"\n },\n {\n \"name\": \"currentAverageValue\",\n \"baseName\": \"currentAverageValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\nexports.V2beta1ResourceMetricStatus = V2beta1ResourceMetricStatus;\n/**\n* CrossVersionObjectReference contains enough information to let you identify the referred resource.\n*/\nclass V2beta2CrossVersionObjectReference {\n static getAttributeTypeMap() {\n return V2beta2CrossVersionObjectReference.attributeTypeMap;\n }\n}\nV2beta2CrossVersionObjectReference.discriminator = undefined;\nV2beta2CrossVersionObjectReference.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\nexports.V2beta2CrossVersionObjectReference = V2beta2CrossVersionObjectReference;\n/**\n* ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).\n*/\nclass V2beta2ExternalMetricSource {\n static getAttributeTypeMap() {\n return V2beta2ExternalMetricSource.attributeTypeMap;\n }\n}\nV2beta2ExternalMetricSource.discriminator = undefined;\nV2beta2ExternalMetricSource.attributeTypeMap = [\n {\n \"name\": \"metric\",\n \"baseName\": \"metric\",\n \"type\": \"V2beta2MetricIdentifier\"\n },\n {\n \"name\": \"target\",\n \"baseName\": \"target\",\n \"type\": \"V2beta2MetricTarget\"\n }\n];\nexports.V2beta2ExternalMetricSource = V2beta2ExternalMetricSource;\n/**\n* ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.\n*/\nclass V2beta2ExternalMetricStatus {\n static getAttributeTypeMap() {\n return V2beta2ExternalMetricStatus.attributeTypeMap;\n }\n}\nV2beta2ExternalMetricStatus.discriminator = undefined;\nV2beta2ExternalMetricStatus.attributeTypeMap = [\n {\n \"name\": \"current\",\n \"baseName\": \"current\",\n \"type\": \"V2beta2MetricValueStatus\"\n },\n {\n \"name\": \"metric\",\n \"baseName\": \"metric\",\n \"type\": \"V2beta2MetricIdentifier\"\n }\n];\nexports.V2beta2ExternalMetricStatus = V2beta2ExternalMetricStatus;\n/**\n* HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.\n*/\nclass V2beta2HorizontalPodAutoscaler {\n static getAttributeTypeMap() {\n return V2beta2HorizontalPodAutoscaler.attributeTypeMap;\n }\n}\nV2beta2HorizontalPodAutoscaler.discriminator = undefined;\nV2beta2HorizontalPodAutoscaler.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V2beta2HorizontalPodAutoscalerSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V2beta2HorizontalPodAutoscalerStatus\"\n }\n];\nexports.V2beta2HorizontalPodAutoscaler = V2beta2HorizontalPodAutoscaler;\n/**\n* HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.\n*/\nclass V2beta2HorizontalPodAutoscalerCondition {\n static getAttributeTypeMap() {\n return V2beta2HorizontalPodAutoscalerCondition.attributeTypeMap;\n }\n}\nV2beta2HorizontalPodAutoscalerCondition.discriminator = undefined;\nV2beta2HorizontalPodAutoscalerCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V2beta2HorizontalPodAutoscalerCondition = V2beta2HorizontalPodAutoscalerCondition;\n/**\n* HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.\n*/\nclass V2beta2HorizontalPodAutoscalerList {\n static getAttributeTypeMap() {\n return V2beta2HorizontalPodAutoscalerList.attributeTypeMap;\n }\n}\nV2beta2HorizontalPodAutoscalerList.discriminator = undefined;\nV2beta2HorizontalPodAutoscalerList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\nexports.V2beta2HorizontalPodAutoscalerList = V2beta2HorizontalPodAutoscalerList;\n/**\n* HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.\n*/\nclass V2beta2HorizontalPodAutoscalerSpec {\n static getAttributeTypeMap() {\n return V2beta2HorizontalPodAutoscalerSpec.attributeTypeMap;\n }\n}\nV2beta2HorizontalPodAutoscalerSpec.discriminator = undefined;\nV2beta2HorizontalPodAutoscalerSpec.attributeTypeMap = [\n {\n \"name\": \"maxReplicas\",\n \"baseName\": \"maxReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"metrics\",\n \"baseName\": \"metrics\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"minReplicas\",\n \"baseName\": \"minReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"scaleTargetRef\",\n \"baseName\": \"scaleTargetRef\",\n \"type\": \"V2beta2CrossVersionObjectReference\"\n }\n];\nexports.V2beta2HorizontalPodAutoscalerSpec = V2beta2HorizontalPodAutoscalerSpec;\n/**\n* HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.\n*/\nclass V2beta2HorizontalPodAutoscalerStatus {\n static getAttributeTypeMap() {\n return V2beta2HorizontalPodAutoscalerStatus.attributeTypeMap;\n }\n}\nV2beta2HorizontalPodAutoscalerStatus.discriminator = undefined;\nV2beta2HorizontalPodAutoscalerStatus.attributeTypeMap = [\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"currentMetrics\",\n \"baseName\": \"currentMetrics\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"currentReplicas\",\n \"baseName\": \"currentReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"desiredReplicas\",\n \"baseName\": \"desiredReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"lastScaleTime\",\n \"baseName\": \"lastScaleTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n }\n];\nexports.V2beta2HorizontalPodAutoscalerStatus = V2beta2HorizontalPodAutoscalerStatus;\n/**\n* MetricIdentifier defines the name and optionally selector for a metric\n*/\nclass V2beta2MetricIdentifier {\n static getAttributeTypeMap() {\n return V2beta2MetricIdentifier.attributeTypeMap;\n }\n}\nV2beta2MetricIdentifier.discriminator = undefined;\nV2beta2MetricIdentifier.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n }\n];\nexports.V2beta2MetricIdentifier = V2beta2MetricIdentifier;\n/**\n* MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).\n*/\nclass V2beta2MetricSpec {\n static getAttributeTypeMap() {\n return V2beta2MetricSpec.attributeTypeMap;\n }\n}\nV2beta2MetricSpec.discriminator = undefined;\nV2beta2MetricSpec.attributeTypeMap = [\n {\n \"name\": \"external\",\n \"baseName\": \"external\",\n \"type\": \"V2beta2ExternalMetricSource\"\n },\n {\n \"name\": \"object\",\n \"baseName\": \"object\",\n \"type\": \"V2beta2ObjectMetricSource\"\n },\n {\n \"name\": \"pods\",\n \"baseName\": \"pods\",\n \"type\": \"V2beta2PodsMetricSource\"\n },\n {\n \"name\": \"resource\",\n \"baseName\": \"resource\",\n \"type\": \"V2beta2ResourceMetricSource\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V2beta2MetricSpec = V2beta2MetricSpec;\n/**\n* MetricStatus describes the last-read state of a single metric.\n*/\nclass V2beta2MetricStatus {\n static getAttributeTypeMap() {\n return V2beta2MetricStatus.attributeTypeMap;\n }\n}\nV2beta2MetricStatus.discriminator = undefined;\nV2beta2MetricStatus.attributeTypeMap = [\n {\n \"name\": \"external\",\n \"baseName\": \"external\",\n \"type\": \"V2beta2ExternalMetricStatus\"\n },\n {\n \"name\": \"object\",\n \"baseName\": \"object\",\n \"type\": \"V2beta2ObjectMetricStatus\"\n },\n {\n \"name\": \"pods\",\n \"baseName\": \"pods\",\n \"type\": \"V2beta2PodsMetricStatus\"\n },\n {\n \"name\": \"resource\",\n \"baseName\": \"resource\",\n \"type\": \"V2beta2ResourceMetricStatus\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\nexports.V2beta2MetricStatus = V2beta2MetricStatus;\n/**\n* MetricTarget defines the target value, average value, or average utilization of a specific metric\n*/\nclass V2beta2MetricTarget {\n static getAttributeTypeMap() {\n return V2beta2MetricTarget.attributeTypeMap;\n }\n}\nV2beta2MetricTarget.discriminator = undefined;\nV2beta2MetricTarget.attributeTypeMap = [\n {\n \"name\": \"averageUtilization\",\n \"baseName\": \"averageUtilization\",\n \"type\": \"number\"\n },\n {\n \"name\": \"averageValue\",\n \"baseName\": \"averageValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"string\"\n }\n];\nexports.V2beta2MetricTarget = V2beta2MetricTarget;\n/**\n* MetricValueStatus holds the current value for a metric\n*/\nclass V2beta2MetricValueStatus {\n static getAttributeTypeMap() {\n return V2beta2MetricValueStatus.attributeTypeMap;\n }\n}\nV2beta2MetricValueStatus.discriminator = undefined;\nV2beta2MetricValueStatus.attributeTypeMap = [\n {\n \"name\": \"averageUtilization\",\n \"baseName\": \"averageUtilization\",\n \"type\": \"number\"\n },\n {\n \"name\": \"averageValue\",\n \"baseName\": \"averageValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"string\"\n }\n];\nexports.V2beta2MetricValueStatus = V2beta2MetricValueStatus;\n/**\n* ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\n*/\nclass V2beta2ObjectMetricSource {\n static getAttributeTypeMap() {\n return V2beta2ObjectMetricSource.attributeTypeMap;\n }\n}\nV2beta2ObjectMetricSource.discriminator = undefined;\nV2beta2ObjectMetricSource.attributeTypeMap = [\n {\n \"name\": \"describedObject\",\n \"baseName\": \"describedObject\",\n \"type\": \"V2beta2CrossVersionObjectReference\"\n },\n {\n \"name\": \"metric\",\n \"baseName\": \"metric\",\n \"type\": \"V2beta2MetricIdentifier\"\n },\n {\n \"name\": \"target\",\n \"baseName\": \"target\",\n \"type\": \"V2beta2MetricTarget\"\n }\n];\nexports.V2beta2ObjectMetricSource = V2beta2ObjectMetricSource;\n/**\n* ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\n*/\nclass V2beta2ObjectMetricStatus {\n static getAttributeTypeMap() {\n return V2beta2ObjectMetricStatus.attributeTypeMap;\n }\n}\nV2beta2ObjectMetricStatus.discriminator = undefined;\nV2beta2ObjectMetricStatus.attributeTypeMap = [\n {\n \"name\": \"current\",\n \"baseName\": \"current\",\n \"type\": \"V2beta2MetricValueStatus\"\n },\n {\n \"name\": \"describedObject\",\n \"baseName\": \"describedObject\",\n \"type\": \"V2beta2CrossVersionObjectReference\"\n },\n {\n \"name\": \"metric\",\n \"baseName\": \"metric\",\n \"type\": \"V2beta2MetricIdentifier\"\n }\n];\nexports.V2beta2ObjectMetricStatus = V2beta2ObjectMetricStatus;\n/**\n* PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\n*/\nclass V2beta2PodsMetricSource {\n static getAttributeTypeMap() {\n return V2beta2PodsMetricSource.attributeTypeMap;\n }\n}\nV2beta2PodsMetricSource.discriminator = undefined;\nV2beta2PodsMetricSource.attributeTypeMap = [\n {\n \"name\": \"metric\",\n \"baseName\": \"metric\",\n \"type\": \"V2beta2MetricIdentifier\"\n },\n {\n \"name\": \"target\",\n \"baseName\": \"target\",\n \"type\": \"V2beta2MetricTarget\"\n }\n];\nexports.V2beta2PodsMetricSource = V2beta2PodsMetricSource;\n/**\n* PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).\n*/\nclass V2beta2PodsMetricStatus {\n static getAttributeTypeMap() {\n return V2beta2PodsMetricStatus.attributeTypeMap;\n }\n}\nV2beta2PodsMetricStatus.discriminator = undefined;\nV2beta2PodsMetricStatus.attributeTypeMap = [\n {\n \"name\": \"current\",\n \"baseName\": \"current\",\n \"type\": \"V2beta2MetricValueStatus\"\n },\n {\n \"name\": \"metric\",\n \"baseName\": \"metric\",\n \"type\": \"V2beta2MetricIdentifier\"\n }\n];\nexports.V2beta2PodsMetricStatus = V2beta2PodsMetricStatus;\n/**\n* ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \\\"pods\\\" source. Only one \\\"target\\\" type should be set.\n*/\nclass V2beta2ResourceMetricSource {\n static getAttributeTypeMap() {\n return V2beta2ResourceMetricSource.attributeTypeMap;\n }\n}\nV2beta2ResourceMetricSource.discriminator = undefined;\nV2beta2ResourceMetricSource.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"target\",\n \"baseName\": \"target\",\n \"type\": \"V2beta2MetricTarget\"\n }\n];\nexports.V2beta2ResourceMetricSource = V2beta2ResourceMetricSource;\n/**\n* ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \\\"pods\\\" source.\n*/\nclass V2beta2ResourceMetricStatus {\n static getAttributeTypeMap() {\n return V2beta2ResourceMetricStatus.attributeTypeMap;\n }\n}\nV2beta2ResourceMetricStatus.discriminator = undefined;\nV2beta2ResourceMetricStatus.attributeTypeMap = [\n {\n \"name\": \"current\",\n \"baseName\": \"current\",\n \"type\": \"V2beta2MetricValueStatus\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\nexports.V2beta2ResourceMetricStatus = V2beta2ResourceMetricStatus;\n/**\n* Info contains versioning information. how we'll want to distribute that information.\n*/\nclass VersionInfo {\n static getAttributeTypeMap() {\n return VersionInfo.attributeTypeMap;\n }\n}\nVersionInfo.discriminator = undefined;\nVersionInfo.attributeTypeMap = [\n {\n \"name\": \"buildDate\",\n \"baseName\": \"buildDate\",\n \"type\": \"string\"\n },\n {\n \"name\": \"compiler\",\n \"baseName\": \"compiler\",\n \"type\": \"string\"\n },\n {\n \"name\": \"gitCommit\",\n \"baseName\": \"gitCommit\",\n \"type\": \"string\"\n },\n {\n \"name\": \"gitTreeState\",\n \"baseName\": \"gitTreeState\",\n \"type\": \"string\"\n },\n {\n \"name\": \"gitVersion\",\n \"baseName\": \"gitVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"goVersion\",\n \"baseName\": \"goVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"major\",\n \"baseName\": \"major\",\n \"type\": \"string\"\n },\n {\n \"name\": \"minor\",\n \"baseName\": \"minor\",\n \"type\": \"string\"\n },\n {\n \"name\": \"platform\",\n \"baseName\": \"platform\",\n \"type\": \"string\"\n }\n];\nexports.VersionInfo = VersionInfo;\nlet enumsMap = {};\nlet typeMap = {\n \"AdmissionregistrationV1beta1ServiceReference\": AdmissionregistrationV1beta1ServiceReference,\n \"AdmissionregistrationV1beta1WebhookClientConfig\": AdmissionregistrationV1beta1WebhookClientConfig,\n \"ApiextensionsV1beta1ServiceReference\": ApiextensionsV1beta1ServiceReference,\n \"ApiextensionsV1beta1WebhookClientConfig\": ApiextensionsV1beta1WebhookClientConfig,\n \"ApiregistrationV1beta1ServiceReference\": ApiregistrationV1beta1ServiceReference,\n \"AppsV1beta1Deployment\": AppsV1beta1Deployment,\n \"AppsV1beta1DeploymentCondition\": AppsV1beta1DeploymentCondition,\n \"AppsV1beta1DeploymentList\": AppsV1beta1DeploymentList,\n \"AppsV1beta1DeploymentRollback\": AppsV1beta1DeploymentRollback,\n \"AppsV1beta1DeploymentSpec\": AppsV1beta1DeploymentSpec,\n \"AppsV1beta1DeploymentStatus\": AppsV1beta1DeploymentStatus,\n \"AppsV1beta1DeploymentStrategy\": AppsV1beta1DeploymentStrategy,\n \"AppsV1beta1RollbackConfig\": AppsV1beta1RollbackConfig,\n \"AppsV1beta1RollingUpdateDeployment\": AppsV1beta1RollingUpdateDeployment,\n \"AppsV1beta1Scale\": AppsV1beta1Scale,\n \"AppsV1beta1ScaleSpec\": AppsV1beta1ScaleSpec,\n \"AppsV1beta1ScaleStatus\": AppsV1beta1ScaleStatus,\n \"ExtensionsV1beta1AllowedFlexVolume\": ExtensionsV1beta1AllowedFlexVolume,\n \"ExtensionsV1beta1AllowedHostPath\": ExtensionsV1beta1AllowedHostPath,\n \"ExtensionsV1beta1Deployment\": ExtensionsV1beta1Deployment,\n \"ExtensionsV1beta1DeploymentCondition\": ExtensionsV1beta1DeploymentCondition,\n \"ExtensionsV1beta1DeploymentList\": ExtensionsV1beta1DeploymentList,\n \"ExtensionsV1beta1DeploymentRollback\": ExtensionsV1beta1DeploymentRollback,\n \"ExtensionsV1beta1DeploymentSpec\": ExtensionsV1beta1DeploymentSpec,\n \"ExtensionsV1beta1DeploymentStatus\": ExtensionsV1beta1DeploymentStatus,\n \"ExtensionsV1beta1DeploymentStrategy\": ExtensionsV1beta1DeploymentStrategy,\n \"ExtensionsV1beta1FSGroupStrategyOptions\": ExtensionsV1beta1FSGroupStrategyOptions,\n \"ExtensionsV1beta1HostPortRange\": ExtensionsV1beta1HostPortRange,\n \"ExtensionsV1beta1IDRange\": ExtensionsV1beta1IDRange,\n \"ExtensionsV1beta1PodSecurityPolicy\": ExtensionsV1beta1PodSecurityPolicy,\n \"ExtensionsV1beta1PodSecurityPolicyList\": ExtensionsV1beta1PodSecurityPolicyList,\n \"ExtensionsV1beta1PodSecurityPolicySpec\": ExtensionsV1beta1PodSecurityPolicySpec,\n \"ExtensionsV1beta1RollbackConfig\": ExtensionsV1beta1RollbackConfig,\n \"ExtensionsV1beta1RollingUpdateDeployment\": ExtensionsV1beta1RollingUpdateDeployment,\n \"ExtensionsV1beta1RunAsGroupStrategyOptions\": ExtensionsV1beta1RunAsGroupStrategyOptions,\n \"ExtensionsV1beta1RunAsUserStrategyOptions\": ExtensionsV1beta1RunAsUserStrategyOptions,\n \"ExtensionsV1beta1SELinuxStrategyOptions\": ExtensionsV1beta1SELinuxStrategyOptions,\n \"ExtensionsV1beta1Scale\": ExtensionsV1beta1Scale,\n \"ExtensionsV1beta1ScaleSpec\": ExtensionsV1beta1ScaleSpec,\n \"ExtensionsV1beta1ScaleStatus\": ExtensionsV1beta1ScaleStatus,\n \"ExtensionsV1beta1SupplementalGroupsStrategyOptions\": ExtensionsV1beta1SupplementalGroupsStrategyOptions,\n \"PolicyV1beta1AllowedFlexVolume\": PolicyV1beta1AllowedFlexVolume,\n \"PolicyV1beta1AllowedHostPath\": PolicyV1beta1AllowedHostPath,\n \"PolicyV1beta1FSGroupStrategyOptions\": PolicyV1beta1FSGroupStrategyOptions,\n \"PolicyV1beta1HostPortRange\": PolicyV1beta1HostPortRange,\n \"PolicyV1beta1IDRange\": PolicyV1beta1IDRange,\n \"PolicyV1beta1PodSecurityPolicy\": PolicyV1beta1PodSecurityPolicy,\n \"PolicyV1beta1PodSecurityPolicyList\": PolicyV1beta1PodSecurityPolicyList,\n \"PolicyV1beta1PodSecurityPolicySpec\": PolicyV1beta1PodSecurityPolicySpec,\n \"PolicyV1beta1RunAsGroupStrategyOptions\": PolicyV1beta1RunAsGroupStrategyOptions,\n \"PolicyV1beta1RunAsUserStrategyOptions\": PolicyV1beta1RunAsUserStrategyOptions,\n \"PolicyV1beta1SELinuxStrategyOptions\": PolicyV1beta1SELinuxStrategyOptions,\n \"PolicyV1beta1SupplementalGroupsStrategyOptions\": PolicyV1beta1SupplementalGroupsStrategyOptions,\n \"RuntimeRawExtension\": RuntimeRawExtension,\n \"V1APIGroup\": V1APIGroup,\n \"V1APIGroupList\": V1APIGroupList,\n \"V1APIResource\": V1APIResource,\n \"V1APIResourceList\": V1APIResourceList,\n \"V1APIService\": V1APIService,\n \"V1APIServiceCondition\": V1APIServiceCondition,\n \"V1APIServiceList\": V1APIServiceList,\n \"V1APIServiceSpec\": V1APIServiceSpec,\n \"V1APIServiceStatus\": V1APIServiceStatus,\n \"V1APIVersions\": V1APIVersions,\n \"V1AWSElasticBlockStoreVolumeSource\": V1AWSElasticBlockStoreVolumeSource,\n \"V1Affinity\": V1Affinity,\n \"V1AggregationRule\": V1AggregationRule,\n \"V1AttachedVolume\": V1AttachedVolume,\n \"V1AzureDiskVolumeSource\": V1AzureDiskVolumeSource,\n \"V1AzureFilePersistentVolumeSource\": V1AzureFilePersistentVolumeSource,\n \"V1AzureFileVolumeSource\": V1AzureFileVolumeSource,\n \"V1Binding\": V1Binding,\n \"V1CSIPersistentVolumeSource\": V1CSIPersistentVolumeSource,\n \"V1Capabilities\": V1Capabilities,\n \"V1CephFSPersistentVolumeSource\": V1CephFSPersistentVolumeSource,\n \"V1CephFSVolumeSource\": V1CephFSVolumeSource,\n \"V1CinderPersistentVolumeSource\": V1CinderPersistentVolumeSource,\n \"V1CinderVolumeSource\": V1CinderVolumeSource,\n \"V1ClientIPConfig\": V1ClientIPConfig,\n \"V1ClusterRole\": V1ClusterRole,\n \"V1ClusterRoleBinding\": V1ClusterRoleBinding,\n \"V1ClusterRoleBindingList\": V1ClusterRoleBindingList,\n \"V1ClusterRoleList\": V1ClusterRoleList,\n \"V1ComponentCondition\": V1ComponentCondition,\n \"V1ComponentStatus\": V1ComponentStatus,\n \"V1ComponentStatusList\": V1ComponentStatusList,\n \"V1ConfigMap\": V1ConfigMap,\n \"V1ConfigMapEnvSource\": V1ConfigMapEnvSource,\n \"V1ConfigMapKeySelector\": V1ConfigMapKeySelector,\n \"V1ConfigMapList\": V1ConfigMapList,\n \"V1ConfigMapNodeConfigSource\": V1ConfigMapNodeConfigSource,\n \"V1ConfigMapProjection\": V1ConfigMapProjection,\n \"V1ConfigMapVolumeSource\": V1ConfigMapVolumeSource,\n \"V1Container\": V1Container,\n \"V1ContainerImage\": V1ContainerImage,\n \"V1ContainerPort\": V1ContainerPort,\n \"V1ContainerState\": V1ContainerState,\n \"V1ContainerStateRunning\": V1ContainerStateRunning,\n \"V1ContainerStateTerminated\": V1ContainerStateTerminated,\n \"V1ContainerStateWaiting\": V1ContainerStateWaiting,\n \"V1ContainerStatus\": V1ContainerStatus,\n \"V1ControllerRevision\": V1ControllerRevision,\n \"V1ControllerRevisionList\": V1ControllerRevisionList,\n \"V1CrossVersionObjectReference\": V1CrossVersionObjectReference,\n \"V1DaemonEndpoint\": V1DaemonEndpoint,\n \"V1DaemonSet\": V1DaemonSet,\n \"V1DaemonSetCondition\": V1DaemonSetCondition,\n \"V1DaemonSetList\": V1DaemonSetList,\n \"V1DaemonSetSpec\": V1DaemonSetSpec,\n \"V1DaemonSetStatus\": V1DaemonSetStatus,\n \"V1DaemonSetUpdateStrategy\": V1DaemonSetUpdateStrategy,\n \"V1DeleteOptions\": V1DeleteOptions,\n \"V1Deployment\": V1Deployment,\n \"V1DeploymentCondition\": V1DeploymentCondition,\n \"V1DeploymentList\": V1DeploymentList,\n \"V1DeploymentSpec\": V1DeploymentSpec,\n \"V1DeploymentStatus\": V1DeploymentStatus,\n \"V1DeploymentStrategy\": V1DeploymentStrategy,\n \"V1DownwardAPIProjection\": V1DownwardAPIProjection,\n \"V1DownwardAPIVolumeFile\": V1DownwardAPIVolumeFile,\n \"V1DownwardAPIVolumeSource\": V1DownwardAPIVolumeSource,\n \"V1EmptyDirVolumeSource\": V1EmptyDirVolumeSource,\n \"V1EndpointAddress\": V1EndpointAddress,\n \"V1EndpointPort\": V1EndpointPort,\n \"V1EndpointSubset\": V1EndpointSubset,\n \"V1Endpoints\": V1Endpoints,\n \"V1EndpointsList\": V1EndpointsList,\n \"V1EnvFromSource\": V1EnvFromSource,\n \"V1EnvVar\": V1EnvVar,\n \"V1EnvVarSource\": V1EnvVarSource,\n \"V1Event\": V1Event,\n \"V1EventList\": V1EventList,\n \"V1EventSeries\": V1EventSeries,\n \"V1EventSource\": V1EventSource,\n \"V1ExecAction\": V1ExecAction,\n \"V1FCVolumeSource\": V1FCVolumeSource,\n \"V1FlexPersistentVolumeSource\": V1FlexPersistentVolumeSource,\n \"V1FlexVolumeSource\": V1FlexVolumeSource,\n \"V1FlockerVolumeSource\": V1FlockerVolumeSource,\n \"V1GCEPersistentDiskVolumeSource\": V1GCEPersistentDiskVolumeSource,\n \"V1GitRepoVolumeSource\": V1GitRepoVolumeSource,\n \"V1GlusterfsPersistentVolumeSource\": V1GlusterfsPersistentVolumeSource,\n \"V1GlusterfsVolumeSource\": V1GlusterfsVolumeSource,\n \"V1GroupVersionForDiscovery\": V1GroupVersionForDiscovery,\n \"V1HTTPGetAction\": V1HTTPGetAction,\n \"V1HTTPHeader\": V1HTTPHeader,\n \"V1Handler\": V1Handler,\n \"V1HorizontalPodAutoscaler\": V1HorizontalPodAutoscaler,\n \"V1HorizontalPodAutoscalerList\": V1HorizontalPodAutoscalerList,\n \"V1HorizontalPodAutoscalerSpec\": V1HorizontalPodAutoscalerSpec,\n \"V1HorizontalPodAutoscalerStatus\": V1HorizontalPodAutoscalerStatus,\n \"V1HostAlias\": V1HostAlias,\n \"V1HostPathVolumeSource\": V1HostPathVolumeSource,\n \"V1IPBlock\": V1IPBlock,\n \"V1ISCSIPersistentVolumeSource\": V1ISCSIPersistentVolumeSource,\n \"V1ISCSIVolumeSource\": V1ISCSIVolumeSource,\n \"V1Initializer\": V1Initializer,\n \"V1Initializers\": V1Initializers,\n \"V1Job\": V1Job,\n \"V1JobCondition\": V1JobCondition,\n \"V1JobList\": V1JobList,\n \"V1JobSpec\": V1JobSpec,\n \"V1JobStatus\": V1JobStatus,\n \"V1KeyToPath\": V1KeyToPath,\n \"V1LabelSelector\": V1LabelSelector,\n \"V1LabelSelectorRequirement\": V1LabelSelectorRequirement,\n \"V1Lifecycle\": V1Lifecycle,\n \"V1LimitRange\": V1LimitRange,\n \"V1LimitRangeItem\": V1LimitRangeItem,\n \"V1LimitRangeList\": V1LimitRangeList,\n \"V1LimitRangeSpec\": V1LimitRangeSpec,\n \"V1ListMeta\": V1ListMeta,\n \"V1LoadBalancerIngress\": V1LoadBalancerIngress,\n \"V1LoadBalancerStatus\": V1LoadBalancerStatus,\n \"V1LocalObjectReference\": V1LocalObjectReference,\n \"V1LocalSubjectAccessReview\": V1LocalSubjectAccessReview,\n \"V1LocalVolumeSource\": V1LocalVolumeSource,\n \"V1NFSVolumeSource\": V1NFSVolumeSource,\n \"V1Namespace\": V1Namespace,\n \"V1NamespaceList\": V1NamespaceList,\n \"V1NamespaceSpec\": V1NamespaceSpec,\n \"V1NamespaceStatus\": V1NamespaceStatus,\n \"V1NetworkPolicy\": V1NetworkPolicy,\n \"V1NetworkPolicyEgressRule\": V1NetworkPolicyEgressRule,\n \"V1NetworkPolicyIngressRule\": V1NetworkPolicyIngressRule,\n \"V1NetworkPolicyList\": V1NetworkPolicyList,\n \"V1NetworkPolicyPeer\": V1NetworkPolicyPeer,\n \"V1NetworkPolicyPort\": V1NetworkPolicyPort,\n \"V1NetworkPolicySpec\": V1NetworkPolicySpec,\n \"V1Node\": V1Node,\n \"V1NodeAddress\": V1NodeAddress,\n \"V1NodeAffinity\": V1NodeAffinity,\n \"V1NodeCondition\": V1NodeCondition,\n \"V1NodeConfigSource\": V1NodeConfigSource,\n \"V1NodeConfigStatus\": V1NodeConfigStatus,\n \"V1NodeDaemonEndpoints\": V1NodeDaemonEndpoints,\n \"V1NodeList\": V1NodeList,\n \"V1NodeSelector\": V1NodeSelector,\n \"V1NodeSelectorRequirement\": V1NodeSelectorRequirement,\n \"V1NodeSelectorTerm\": V1NodeSelectorTerm,\n \"V1NodeSpec\": V1NodeSpec,\n \"V1NodeStatus\": V1NodeStatus,\n \"V1NodeSystemInfo\": V1NodeSystemInfo,\n \"V1NonResourceAttributes\": V1NonResourceAttributes,\n \"V1NonResourceRule\": V1NonResourceRule,\n \"V1ObjectFieldSelector\": V1ObjectFieldSelector,\n \"V1ObjectMeta\": V1ObjectMeta,\n \"V1ObjectReference\": V1ObjectReference,\n \"V1OwnerReference\": V1OwnerReference,\n \"V1PersistentVolume\": V1PersistentVolume,\n \"V1PersistentVolumeClaim\": V1PersistentVolumeClaim,\n \"V1PersistentVolumeClaimCondition\": V1PersistentVolumeClaimCondition,\n \"V1PersistentVolumeClaimList\": V1PersistentVolumeClaimList,\n \"V1PersistentVolumeClaimSpec\": V1PersistentVolumeClaimSpec,\n \"V1PersistentVolumeClaimStatus\": V1PersistentVolumeClaimStatus,\n \"V1PersistentVolumeClaimVolumeSource\": V1PersistentVolumeClaimVolumeSource,\n \"V1PersistentVolumeList\": V1PersistentVolumeList,\n \"V1PersistentVolumeSpec\": V1PersistentVolumeSpec,\n \"V1PersistentVolumeStatus\": V1PersistentVolumeStatus,\n \"V1PhotonPersistentDiskVolumeSource\": V1PhotonPersistentDiskVolumeSource,\n \"V1Pod\": V1Pod,\n \"V1PodAffinity\": V1PodAffinity,\n \"V1PodAffinityTerm\": V1PodAffinityTerm,\n \"V1PodAntiAffinity\": V1PodAntiAffinity,\n \"V1PodCondition\": V1PodCondition,\n \"V1PodDNSConfig\": V1PodDNSConfig,\n \"V1PodDNSConfigOption\": V1PodDNSConfigOption,\n \"V1PodList\": V1PodList,\n \"V1PodReadinessGate\": V1PodReadinessGate,\n \"V1PodSecurityContext\": V1PodSecurityContext,\n \"V1PodSpec\": V1PodSpec,\n \"V1PodStatus\": V1PodStatus,\n \"V1PodTemplate\": V1PodTemplate,\n \"V1PodTemplateList\": V1PodTemplateList,\n \"V1PodTemplateSpec\": V1PodTemplateSpec,\n \"V1PolicyRule\": V1PolicyRule,\n \"V1PortworxVolumeSource\": V1PortworxVolumeSource,\n \"V1Preconditions\": V1Preconditions,\n \"V1PreferredSchedulingTerm\": V1PreferredSchedulingTerm,\n \"V1Probe\": V1Probe,\n \"V1ProjectedVolumeSource\": V1ProjectedVolumeSource,\n \"V1QuobyteVolumeSource\": V1QuobyteVolumeSource,\n \"V1RBDPersistentVolumeSource\": V1RBDPersistentVolumeSource,\n \"V1RBDVolumeSource\": V1RBDVolumeSource,\n \"V1ReplicaSet\": V1ReplicaSet,\n \"V1ReplicaSetCondition\": V1ReplicaSetCondition,\n \"V1ReplicaSetList\": V1ReplicaSetList,\n \"V1ReplicaSetSpec\": V1ReplicaSetSpec,\n \"V1ReplicaSetStatus\": V1ReplicaSetStatus,\n \"V1ReplicationController\": V1ReplicationController,\n \"V1ReplicationControllerCondition\": V1ReplicationControllerCondition,\n \"V1ReplicationControllerList\": V1ReplicationControllerList,\n \"V1ReplicationControllerSpec\": V1ReplicationControllerSpec,\n \"V1ReplicationControllerStatus\": V1ReplicationControllerStatus,\n \"V1ResourceAttributes\": V1ResourceAttributes,\n \"V1ResourceFieldSelector\": V1ResourceFieldSelector,\n \"V1ResourceQuota\": V1ResourceQuota,\n \"V1ResourceQuotaList\": V1ResourceQuotaList,\n \"V1ResourceQuotaSpec\": V1ResourceQuotaSpec,\n \"V1ResourceQuotaStatus\": V1ResourceQuotaStatus,\n \"V1ResourceRequirements\": V1ResourceRequirements,\n \"V1ResourceRule\": V1ResourceRule,\n \"V1Role\": V1Role,\n \"V1RoleBinding\": V1RoleBinding,\n \"V1RoleBindingList\": V1RoleBindingList,\n \"V1RoleList\": V1RoleList,\n \"V1RoleRef\": V1RoleRef,\n \"V1RollingUpdateDaemonSet\": V1RollingUpdateDaemonSet,\n \"V1RollingUpdateDeployment\": V1RollingUpdateDeployment,\n \"V1RollingUpdateStatefulSetStrategy\": V1RollingUpdateStatefulSetStrategy,\n \"V1SELinuxOptions\": V1SELinuxOptions,\n \"V1Scale\": V1Scale,\n \"V1ScaleIOPersistentVolumeSource\": V1ScaleIOPersistentVolumeSource,\n \"V1ScaleIOVolumeSource\": V1ScaleIOVolumeSource,\n \"V1ScaleSpec\": V1ScaleSpec,\n \"V1ScaleStatus\": V1ScaleStatus,\n \"V1ScopeSelector\": V1ScopeSelector,\n \"V1ScopedResourceSelectorRequirement\": V1ScopedResourceSelectorRequirement,\n \"V1Secret\": V1Secret,\n \"V1SecretEnvSource\": V1SecretEnvSource,\n \"V1SecretKeySelector\": V1SecretKeySelector,\n \"V1SecretList\": V1SecretList,\n \"V1SecretProjection\": V1SecretProjection,\n \"V1SecretReference\": V1SecretReference,\n \"V1SecretVolumeSource\": V1SecretVolumeSource,\n \"V1SecurityContext\": V1SecurityContext,\n \"V1SelfSubjectAccessReview\": V1SelfSubjectAccessReview,\n \"V1SelfSubjectAccessReviewSpec\": V1SelfSubjectAccessReviewSpec,\n \"V1SelfSubjectRulesReview\": V1SelfSubjectRulesReview,\n \"V1SelfSubjectRulesReviewSpec\": V1SelfSubjectRulesReviewSpec,\n \"V1ServerAddressByClientCIDR\": V1ServerAddressByClientCIDR,\n \"V1Service\": V1Service,\n \"V1ServiceAccount\": V1ServiceAccount,\n \"V1ServiceAccountList\": V1ServiceAccountList,\n \"V1ServiceAccountTokenProjection\": V1ServiceAccountTokenProjection,\n \"V1ServiceList\": V1ServiceList,\n \"V1ServicePort\": V1ServicePort,\n \"V1ServiceReference\": V1ServiceReference,\n \"V1ServiceSpec\": V1ServiceSpec,\n \"V1ServiceStatus\": V1ServiceStatus,\n \"V1SessionAffinityConfig\": V1SessionAffinityConfig,\n \"V1StatefulSet\": V1StatefulSet,\n \"V1StatefulSetCondition\": V1StatefulSetCondition,\n \"V1StatefulSetList\": V1StatefulSetList,\n \"V1StatefulSetSpec\": V1StatefulSetSpec,\n \"V1StatefulSetStatus\": V1StatefulSetStatus,\n \"V1StatefulSetUpdateStrategy\": V1StatefulSetUpdateStrategy,\n \"V1Status\": V1Status,\n \"V1StatusCause\": V1StatusCause,\n \"V1StatusDetails\": V1StatusDetails,\n \"V1StorageClass\": V1StorageClass,\n \"V1StorageClassList\": V1StorageClassList,\n \"V1StorageOSPersistentVolumeSource\": V1StorageOSPersistentVolumeSource,\n \"V1StorageOSVolumeSource\": V1StorageOSVolumeSource,\n \"V1Subject\": V1Subject,\n \"V1SubjectAccessReview\": V1SubjectAccessReview,\n \"V1SubjectAccessReviewSpec\": V1SubjectAccessReviewSpec,\n \"V1SubjectAccessReviewStatus\": V1SubjectAccessReviewStatus,\n \"V1SubjectRulesReviewStatus\": V1SubjectRulesReviewStatus,\n \"V1Sysctl\": V1Sysctl,\n \"V1TCPSocketAction\": V1TCPSocketAction,\n \"V1Taint\": V1Taint,\n \"V1TokenReview\": V1TokenReview,\n \"V1TokenReviewSpec\": V1TokenReviewSpec,\n \"V1TokenReviewStatus\": V1TokenReviewStatus,\n \"V1Toleration\": V1Toleration,\n \"V1TopologySelectorLabelRequirement\": V1TopologySelectorLabelRequirement,\n \"V1TopologySelectorTerm\": V1TopologySelectorTerm,\n \"V1TypedLocalObjectReference\": V1TypedLocalObjectReference,\n \"V1UserInfo\": V1UserInfo,\n \"V1Volume\": V1Volume,\n \"V1VolumeAttachment\": V1VolumeAttachment,\n \"V1VolumeAttachmentList\": V1VolumeAttachmentList,\n \"V1VolumeAttachmentSource\": V1VolumeAttachmentSource,\n \"V1VolumeAttachmentSpec\": V1VolumeAttachmentSpec,\n \"V1VolumeAttachmentStatus\": V1VolumeAttachmentStatus,\n \"V1VolumeDevice\": V1VolumeDevice,\n \"V1VolumeError\": V1VolumeError,\n \"V1VolumeMount\": V1VolumeMount,\n \"V1VolumeNodeAffinity\": V1VolumeNodeAffinity,\n \"V1VolumeProjection\": V1VolumeProjection,\n \"V1VsphereVirtualDiskVolumeSource\": V1VsphereVirtualDiskVolumeSource,\n \"V1WatchEvent\": V1WatchEvent,\n \"V1WeightedPodAffinityTerm\": V1WeightedPodAffinityTerm,\n \"V1alpha1AggregationRule\": V1alpha1AggregationRule,\n \"V1alpha1AuditSink\": V1alpha1AuditSink,\n \"V1alpha1AuditSinkList\": V1alpha1AuditSinkList,\n \"V1alpha1AuditSinkSpec\": V1alpha1AuditSinkSpec,\n \"V1alpha1ClusterRole\": V1alpha1ClusterRole,\n \"V1alpha1ClusterRoleBinding\": V1alpha1ClusterRoleBinding,\n \"V1alpha1ClusterRoleBindingList\": V1alpha1ClusterRoleBindingList,\n \"V1alpha1ClusterRoleList\": V1alpha1ClusterRoleList,\n \"V1alpha1Initializer\": V1alpha1Initializer,\n \"V1alpha1InitializerConfiguration\": V1alpha1InitializerConfiguration,\n \"V1alpha1InitializerConfigurationList\": V1alpha1InitializerConfigurationList,\n \"V1alpha1PodPreset\": V1alpha1PodPreset,\n \"V1alpha1PodPresetList\": V1alpha1PodPresetList,\n \"V1alpha1PodPresetSpec\": V1alpha1PodPresetSpec,\n \"V1alpha1Policy\": V1alpha1Policy,\n \"V1alpha1PolicyRule\": V1alpha1PolicyRule,\n \"V1alpha1PriorityClass\": V1alpha1PriorityClass,\n \"V1alpha1PriorityClassList\": V1alpha1PriorityClassList,\n \"V1alpha1Role\": V1alpha1Role,\n \"V1alpha1RoleBinding\": V1alpha1RoleBinding,\n \"V1alpha1RoleBindingList\": V1alpha1RoleBindingList,\n \"V1alpha1RoleList\": V1alpha1RoleList,\n \"V1alpha1RoleRef\": V1alpha1RoleRef,\n \"V1alpha1Rule\": V1alpha1Rule,\n \"V1alpha1ServiceReference\": V1alpha1ServiceReference,\n \"V1alpha1Subject\": V1alpha1Subject,\n \"V1alpha1VolumeAttachment\": V1alpha1VolumeAttachment,\n \"V1alpha1VolumeAttachmentList\": V1alpha1VolumeAttachmentList,\n \"V1alpha1VolumeAttachmentSource\": V1alpha1VolumeAttachmentSource,\n \"V1alpha1VolumeAttachmentSpec\": V1alpha1VolumeAttachmentSpec,\n \"V1alpha1VolumeAttachmentStatus\": V1alpha1VolumeAttachmentStatus,\n \"V1alpha1VolumeError\": V1alpha1VolumeError,\n \"V1alpha1Webhook\": V1alpha1Webhook,\n \"V1alpha1WebhookClientConfig\": V1alpha1WebhookClientConfig,\n \"V1alpha1WebhookThrottleConfig\": V1alpha1WebhookThrottleConfig,\n \"V1beta1APIService\": V1beta1APIService,\n \"V1beta1APIServiceCondition\": V1beta1APIServiceCondition,\n \"V1beta1APIServiceList\": V1beta1APIServiceList,\n \"V1beta1APIServiceSpec\": V1beta1APIServiceSpec,\n \"V1beta1APIServiceStatus\": V1beta1APIServiceStatus,\n \"V1beta1AggregationRule\": V1beta1AggregationRule,\n \"V1beta1CertificateSigningRequest\": V1beta1CertificateSigningRequest,\n \"V1beta1CertificateSigningRequestCondition\": V1beta1CertificateSigningRequestCondition,\n \"V1beta1CertificateSigningRequestList\": V1beta1CertificateSigningRequestList,\n \"V1beta1CertificateSigningRequestSpec\": V1beta1CertificateSigningRequestSpec,\n \"V1beta1CertificateSigningRequestStatus\": V1beta1CertificateSigningRequestStatus,\n \"V1beta1ClusterRole\": V1beta1ClusterRole,\n \"V1beta1ClusterRoleBinding\": V1beta1ClusterRoleBinding,\n \"V1beta1ClusterRoleBindingList\": V1beta1ClusterRoleBindingList,\n \"V1beta1ClusterRoleList\": V1beta1ClusterRoleList,\n \"V1beta1ControllerRevision\": V1beta1ControllerRevision,\n \"V1beta1ControllerRevisionList\": V1beta1ControllerRevisionList,\n \"V1beta1CronJob\": V1beta1CronJob,\n \"V1beta1CronJobList\": V1beta1CronJobList,\n \"V1beta1CronJobSpec\": V1beta1CronJobSpec,\n \"V1beta1CronJobStatus\": V1beta1CronJobStatus,\n \"V1beta1CustomResourceColumnDefinition\": V1beta1CustomResourceColumnDefinition,\n \"V1beta1CustomResourceConversion\": V1beta1CustomResourceConversion,\n \"V1beta1CustomResourceDefinition\": V1beta1CustomResourceDefinition,\n \"V1beta1CustomResourceDefinitionCondition\": V1beta1CustomResourceDefinitionCondition,\n \"V1beta1CustomResourceDefinitionList\": V1beta1CustomResourceDefinitionList,\n \"V1beta1CustomResourceDefinitionNames\": V1beta1CustomResourceDefinitionNames,\n \"V1beta1CustomResourceDefinitionSpec\": V1beta1CustomResourceDefinitionSpec,\n \"V1beta1CustomResourceDefinitionStatus\": V1beta1CustomResourceDefinitionStatus,\n \"V1beta1CustomResourceDefinitionVersion\": V1beta1CustomResourceDefinitionVersion,\n \"V1beta1CustomResourceSubresourceScale\": V1beta1CustomResourceSubresourceScale,\n \"V1beta1CustomResourceSubresources\": V1beta1CustomResourceSubresources,\n \"V1beta1CustomResourceValidation\": V1beta1CustomResourceValidation,\n \"V1beta1DaemonSet\": V1beta1DaemonSet,\n \"V1beta1DaemonSetCondition\": V1beta1DaemonSetCondition,\n \"V1beta1DaemonSetList\": V1beta1DaemonSetList,\n \"V1beta1DaemonSetSpec\": V1beta1DaemonSetSpec,\n \"V1beta1DaemonSetStatus\": V1beta1DaemonSetStatus,\n \"V1beta1DaemonSetUpdateStrategy\": V1beta1DaemonSetUpdateStrategy,\n \"V1beta1Event\": V1beta1Event,\n \"V1beta1EventList\": V1beta1EventList,\n \"V1beta1EventSeries\": V1beta1EventSeries,\n \"V1beta1Eviction\": V1beta1Eviction,\n \"V1beta1ExternalDocumentation\": V1beta1ExternalDocumentation,\n \"V1beta1HTTPIngressPath\": V1beta1HTTPIngressPath,\n \"V1beta1HTTPIngressRuleValue\": V1beta1HTTPIngressRuleValue,\n \"V1beta1IPBlock\": V1beta1IPBlock,\n \"V1beta1Ingress\": V1beta1Ingress,\n \"V1beta1IngressBackend\": V1beta1IngressBackend,\n \"V1beta1IngressList\": V1beta1IngressList,\n \"V1beta1IngressRule\": V1beta1IngressRule,\n \"V1beta1IngressSpec\": V1beta1IngressSpec,\n \"V1beta1IngressStatus\": V1beta1IngressStatus,\n \"V1beta1IngressTLS\": V1beta1IngressTLS,\n \"V1beta1JSONSchemaProps\": V1beta1JSONSchemaProps,\n \"V1beta1JobTemplateSpec\": V1beta1JobTemplateSpec,\n \"V1beta1Lease\": V1beta1Lease,\n \"V1beta1LeaseList\": V1beta1LeaseList,\n \"V1beta1LeaseSpec\": V1beta1LeaseSpec,\n \"V1beta1LocalSubjectAccessReview\": V1beta1LocalSubjectAccessReview,\n \"V1beta1MutatingWebhookConfiguration\": V1beta1MutatingWebhookConfiguration,\n \"V1beta1MutatingWebhookConfigurationList\": V1beta1MutatingWebhookConfigurationList,\n \"V1beta1NetworkPolicy\": V1beta1NetworkPolicy,\n \"V1beta1NetworkPolicyEgressRule\": V1beta1NetworkPolicyEgressRule,\n \"V1beta1NetworkPolicyIngressRule\": V1beta1NetworkPolicyIngressRule,\n \"V1beta1NetworkPolicyList\": V1beta1NetworkPolicyList,\n \"V1beta1NetworkPolicyPeer\": V1beta1NetworkPolicyPeer,\n \"V1beta1NetworkPolicyPort\": V1beta1NetworkPolicyPort,\n \"V1beta1NetworkPolicySpec\": V1beta1NetworkPolicySpec,\n \"V1beta1NonResourceAttributes\": V1beta1NonResourceAttributes,\n \"V1beta1NonResourceRule\": V1beta1NonResourceRule,\n \"V1beta1PodDisruptionBudget\": V1beta1PodDisruptionBudget,\n \"V1beta1PodDisruptionBudgetList\": V1beta1PodDisruptionBudgetList,\n \"V1beta1PodDisruptionBudgetSpec\": V1beta1PodDisruptionBudgetSpec,\n \"V1beta1PodDisruptionBudgetStatus\": V1beta1PodDisruptionBudgetStatus,\n \"V1beta1PolicyRule\": V1beta1PolicyRule,\n \"V1beta1PriorityClass\": V1beta1PriorityClass,\n \"V1beta1PriorityClassList\": V1beta1PriorityClassList,\n \"V1beta1ReplicaSet\": V1beta1ReplicaSet,\n \"V1beta1ReplicaSetCondition\": V1beta1ReplicaSetCondition,\n \"V1beta1ReplicaSetList\": V1beta1ReplicaSetList,\n \"V1beta1ReplicaSetSpec\": V1beta1ReplicaSetSpec,\n \"V1beta1ReplicaSetStatus\": V1beta1ReplicaSetStatus,\n \"V1beta1ResourceAttributes\": V1beta1ResourceAttributes,\n \"V1beta1ResourceRule\": V1beta1ResourceRule,\n \"V1beta1Role\": V1beta1Role,\n \"V1beta1RoleBinding\": V1beta1RoleBinding,\n \"V1beta1RoleBindingList\": V1beta1RoleBindingList,\n \"V1beta1RoleList\": V1beta1RoleList,\n \"V1beta1RoleRef\": V1beta1RoleRef,\n \"V1beta1RollingUpdateDaemonSet\": V1beta1RollingUpdateDaemonSet,\n \"V1beta1RollingUpdateStatefulSetStrategy\": V1beta1RollingUpdateStatefulSetStrategy,\n \"V1beta1RuleWithOperations\": V1beta1RuleWithOperations,\n \"V1beta1SelfSubjectAccessReview\": V1beta1SelfSubjectAccessReview,\n \"V1beta1SelfSubjectAccessReviewSpec\": V1beta1SelfSubjectAccessReviewSpec,\n \"V1beta1SelfSubjectRulesReview\": V1beta1SelfSubjectRulesReview,\n \"V1beta1SelfSubjectRulesReviewSpec\": V1beta1SelfSubjectRulesReviewSpec,\n \"V1beta1StatefulSet\": V1beta1StatefulSet,\n \"V1beta1StatefulSetCondition\": V1beta1StatefulSetCondition,\n \"V1beta1StatefulSetList\": V1beta1StatefulSetList,\n \"V1beta1StatefulSetSpec\": V1beta1StatefulSetSpec,\n \"V1beta1StatefulSetStatus\": V1beta1StatefulSetStatus,\n \"V1beta1StatefulSetUpdateStrategy\": V1beta1StatefulSetUpdateStrategy,\n \"V1beta1StorageClass\": V1beta1StorageClass,\n \"V1beta1StorageClassList\": V1beta1StorageClassList,\n \"V1beta1Subject\": V1beta1Subject,\n \"V1beta1SubjectAccessReview\": V1beta1SubjectAccessReview,\n \"V1beta1SubjectAccessReviewSpec\": V1beta1SubjectAccessReviewSpec,\n \"V1beta1SubjectAccessReviewStatus\": V1beta1SubjectAccessReviewStatus,\n \"V1beta1SubjectRulesReviewStatus\": V1beta1SubjectRulesReviewStatus,\n \"V1beta1TokenReview\": V1beta1TokenReview,\n \"V1beta1TokenReviewSpec\": V1beta1TokenReviewSpec,\n \"V1beta1TokenReviewStatus\": V1beta1TokenReviewStatus,\n \"V1beta1UserInfo\": V1beta1UserInfo,\n \"V1beta1ValidatingWebhookConfiguration\": V1beta1ValidatingWebhookConfiguration,\n \"V1beta1ValidatingWebhookConfigurationList\": V1beta1ValidatingWebhookConfigurationList,\n \"V1beta1VolumeAttachment\": V1beta1VolumeAttachment,\n \"V1beta1VolumeAttachmentList\": V1beta1VolumeAttachmentList,\n \"V1beta1VolumeAttachmentSource\": V1beta1VolumeAttachmentSource,\n \"V1beta1VolumeAttachmentSpec\": V1beta1VolumeAttachmentSpec,\n \"V1beta1VolumeAttachmentStatus\": V1beta1VolumeAttachmentStatus,\n \"V1beta1VolumeError\": V1beta1VolumeError,\n \"V1beta1Webhook\": V1beta1Webhook,\n \"V1beta2ControllerRevision\": V1beta2ControllerRevision,\n \"V1beta2ControllerRevisionList\": V1beta2ControllerRevisionList,\n \"V1beta2DaemonSet\": V1beta2DaemonSet,\n \"V1beta2DaemonSetCondition\": V1beta2DaemonSetCondition,\n \"V1beta2DaemonSetList\": V1beta2DaemonSetList,\n \"V1beta2DaemonSetSpec\": V1beta2DaemonSetSpec,\n \"V1beta2DaemonSetStatus\": V1beta2DaemonSetStatus,\n \"V1beta2DaemonSetUpdateStrategy\": V1beta2DaemonSetUpdateStrategy,\n \"V1beta2Deployment\": V1beta2Deployment,\n \"V1beta2DeploymentCondition\": V1beta2DeploymentCondition,\n \"V1beta2DeploymentList\": V1beta2DeploymentList,\n \"V1beta2DeploymentSpec\": V1beta2DeploymentSpec,\n \"V1beta2DeploymentStatus\": V1beta2DeploymentStatus,\n \"V1beta2DeploymentStrategy\": V1beta2DeploymentStrategy,\n \"V1beta2ReplicaSet\": V1beta2ReplicaSet,\n \"V1beta2ReplicaSetCondition\": V1beta2ReplicaSetCondition,\n \"V1beta2ReplicaSetList\": V1beta2ReplicaSetList,\n \"V1beta2ReplicaSetSpec\": V1beta2ReplicaSetSpec,\n \"V1beta2ReplicaSetStatus\": V1beta2ReplicaSetStatus,\n \"V1beta2RollingUpdateDaemonSet\": V1beta2RollingUpdateDaemonSet,\n \"V1beta2RollingUpdateDeployment\": V1beta2RollingUpdateDeployment,\n \"V1beta2RollingUpdateStatefulSetStrategy\": V1beta2RollingUpdateStatefulSetStrategy,\n \"V1beta2Scale\": V1beta2Scale,\n \"V1beta2ScaleSpec\": V1beta2ScaleSpec,\n \"V1beta2ScaleStatus\": V1beta2ScaleStatus,\n \"V1beta2StatefulSet\": V1beta2StatefulSet,\n \"V1beta2StatefulSetCondition\": V1beta2StatefulSetCondition,\n \"V1beta2StatefulSetList\": V1beta2StatefulSetList,\n \"V1beta2StatefulSetSpec\": V1beta2StatefulSetSpec,\n \"V1beta2StatefulSetStatus\": V1beta2StatefulSetStatus,\n \"V1beta2StatefulSetUpdateStrategy\": V1beta2StatefulSetUpdateStrategy,\n \"V2alpha1CronJob\": V2alpha1CronJob,\n \"V2alpha1CronJobList\": V2alpha1CronJobList,\n \"V2alpha1CronJobSpec\": V2alpha1CronJobSpec,\n \"V2alpha1CronJobStatus\": V2alpha1CronJobStatus,\n \"V2alpha1JobTemplateSpec\": V2alpha1JobTemplateSpec,\n \"V2beta1CrossVersionObjectReference\": V2beta1CrossVersionObjectReference,\n \"V2beta1ExternalMetricSource\": V2beta1ExternalMetricSource,\n \"V2beta1ExternalMetricStatus\": V2beta1ExternalMetricStatus,\n \"V2beta1HorizontalPodAutoscaler\": V2beta1HorizontalPodAutoscaler,\n \"V2beta1HorizontalPodAutoscalerCondition\": V2beta1HorizontalPodAutoscalerCondition,\n \"V2beta1HorizontalPodAutoscalerList\": V2beta1HorizontalPodAutoscalerList,\n \"V2beta1HorizontalPodAutoscalerSpec\": V2beta1HorizontalPodAutoscalerSpec,\n \"V2beta1HorizontalPodAutoscalerStatus\": V2beta1HorizontalPodAutoscalerStatus,\n \"V2beta1MetricSpec\": V2beta1MetricSpec,\n \"V2beta1MetricStatus\": V2beta1MetricStatus,\n \"V2beta1ObjectMetricSource\": V2beta1ObjectMetricSource,\n \"V2beta1ObjectMetricStatus\": V2beta1ObjectMetricStatus,\n \"V2beta1PodsMetricSource\": V2beta1PodsMetricSource,\n \"V2beta1PodsMetricStatus\": V2beta1PodsMetricStatus,\n \"V2beta1ResourceMetricSource\": V2beta1ResourceMetricSource,\n \"V2beta1ResourceMetricStatus\": V2beta1ResourceMetricStatus,\n \"V2beta2CrossVersionObjectReference\": V2beta2CrossVersionObjectReference,\n \"V2beta2ExternalMetricSource\": V2beta2ExternalMetricSource,\n \"V2beta2ExternalMetricStatus\": V2beta2ExternalMetricStatus,\n \"V2beta2HorizontalPodAutoscaler\": V2beta2HorizontalPodAutoscaler,\n \"V2beta2HorizontalPodAutoscalerCondition\": V2beta2HorizontalPodAutoscalerCondition,\n \"V2beta2HorizontalPodAutoscalerList\": V2beta2HorizontalPodAutoscalerList,\n \"V2beta2HorizontalPodAutoscalerSpec\": V2beta2HorizontalPodAutoscalerSpec,\n \"V2beta2HorizontalPodAutoscalerStatus\": V2beta2HorizontalPodAutoscalerStatus,\n \"V2beta2MetricIdentifier\": V2beta2MetricIdentifier,\n \"V2beta2MetricSpec\": V2beta2MetricSpec,\n \"V2beta2MetricStatus\": V2beta2MetricStatus,\n \"V2beta2MetricTarget\": V2beta2MetricTarget,\n \"V2beta2MetricValueStatus\": V2beta2MetricValueStatus,\n \"V2beta2ObjectMetricSource\": V2beta2ObjectMetricSource,\n \"V2beta2ObjectMetricStatus\": V2beta2ObjectMetricStatus,\n \"V2beta2PodsMetricSource\": V2beta2PodsMetricSource,\n \"V2beta2PodsMetricStatus\": V2beta2PodsMetricStatus,\n \"V2beta2ResourceMetricSource\": V2beta2ResourceMetricSource,\n \"V2beta2ResourceMetricStatus\": V2beta2ResourceMetricStatus,\n \"VersionInfo\": VersionInfo,\n};\nclass HttpBasicAuth {\n constructor() {\n this.username = '';\n this.password = '';\n }\n applyToRequest(requestOptions) {\n requestOptions.auth = {\n username: this.username, password: this.password\n };\n }\n}\nexports.HttpBasicAuth = HttpBasicAuth;\nclass ApiKeyAuth {\n constructor(location, paramName) {\n this.location = location;\n this.paramName = paramName;\n this.apiKey = '';\n }\n applyToRequest(requestOptions) {\n if (this.location == \"query\") {\n requestOptions.qs[this.paramName] = this.apiKey;\n }\n else if (this.location == \"header\" && requestOptions && requestOptions.headers) {\n requestOptions.headers[this.paramName] = this.apiKey;\n }\n }\n}\nexports.ApiKeyAuth = ApiKeyAuth;\nclass OAuth {\n constructor() {\n this.accessToken = '';\n }\n applyToRequest(requestOptions) {\n if (requestOptions && requestOptions.headers) {\n requestOptions.headers[\"Authorization\"] = \"Bearer \" + this.accessToken;\n }\n }\n}\nexports.OAuth = OAuth;\nclass VoidAuth {\n constructor() {\n this.username = '';\n this.password = '';\n }\n applyToRequest(_) {\n // Do nothing\n }\n}\nexports.VoidAuth = VoidAuth;\nvar AdmissionregistrationApiApiKeys;\n(function (AdmissionregistrationApiApiKeys) {\n AdmissionregistrationApiApiKeys[AdmissionregistrationApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AdmissionregistrationApiApiKeys = exports.AdmissionregistrationApiApiKeys || (exports.AdmissionregistrationApiApiKeys = {}));\nclass AdmissionregistrationApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AdmissionregistrationApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AdmissionregistrationApi = AdmissionregistrationApi;\nvar AdmissionregistrationV1alpha1ApiApiKeys;\n(function (AdmissionregistrationV1alpha1ApiApiKeys) {\n AdmissionregistrationV1alpha1ApiApiKeys[AdmissionregistrationV1alpha1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AdmissionregistrationV1alpha1ApiApiKeys = exports.AdmissionregistrationV1alpha1ApiApiKeys || (exports.AdmissionregistrationV1alpha1ApiApiKeys = {}));\nclass AdmissionregistrationV1alpha1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AdmissionregistrationV1alpha1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create an InitializerConfiguration\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createInitializerConfiguration(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createInitializerConfiguration.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1alpha1InitializerConfiguration\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1InitializerConfiguration\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of InitializerConfiguration\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionInitializerConfiguration(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete an InitializerConfiguration\n * @param name name of the InitializerConfiguration\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteInitializerConfiguration(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteInitializerConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind InitializerConfiguration\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listInitializerConfiguration(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1InitializerConfigurationList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified InitializerConfiguration\n * @param name name of the InitializerConfiguration\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchInitializerConfiguration(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchInitializerConfiguration.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchInitializerConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1InitializerConfiguration\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified InitializerConfiguration\n * @param name name of the InitializerConfiguration\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readInitializerConfiguration(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readInitializerConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1InitializerConfiguration\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified InitializerConfiguration\n * @param name name of the InitializerConfiguration\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceInitializerConfiguration(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceInitializerConfiguration.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceInitializerConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1alpha1InitializerConfiguration\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1InitializerConfiguration\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AdmissionregistrationV1alpha1Api = AdmissionregistrationV1alpha1Api;\nvar AdmissionregistrationV1beta1ApiApiKeys;\n(function (AdmissionregistrationV1beta1ApiApiKeys) {\n AdmissionregistrationV1beta1ApiApiKeys[AdmissionregistrationV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AdmissionregistrationV1beta1ApiApiKeys = exports.AdmissionregistrationV1beta1ApiApiKeys || (exports.AdmissionregistrationV1beta1ApiApiKeys = {}));\nclass AdmissionregistrationV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AdmissionregistrationV1beta1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a MutatingWebhookConfiguration\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createMutatingWebhookConfiguration(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createMutatingWebhookConfiguration.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1MutatingWebhookConfiguration\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1MutatingWebhookConfiguration\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a ValidatingWebhookConfiguration\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createValidatingWebhookConfiguration(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createValidatingWebhookConfiguration.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1ValidatingWebhookConfiguration\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ValidatingWebhookConfiguration\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of MutatingWebhookConfiguration\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionMutatingWebhookConfiguration(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of ValidatingWebhookConfiguration\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionValidatingWebhookConfiguration(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a MutatingWebhookConfiguration\n * @param name name of the MutatingWebhookConfiguration\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteMutatingWebhookConfiguration(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteMutatingWebhookConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a ValidatingWebhookConfiguration\n * @param name name of the ValidatingWebhookConfiguration\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteValidatingWebhookConfiguration(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteValidatingWebhookConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind MutatingWebhookConfiguration\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listMutatingWebhookConfiguration(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1MutatingWebhookConfigurationList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ValidatingWebhookConfiguration\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listValidatingWebhookConfiguration(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ValidatingWebhookConfigurationList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified MutatingWebhookConfiguration\n * @param name name of the MutatingWebhookConfiguration\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchMutatingWebhookConfiguration(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchMutatingWebhookConfiguration.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchMutatingWebhookConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1MutatingWebhookConfiguration\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified ValidatingWebhookConfiguration\n * @param name name of the ValidatingWebhookConfiguration\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchValidatingWebhookConfiguration(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchValidatingWebhookConfiguration.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchValidatingWebhookConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ValidatingWebhookConfiguration\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified MutatingWebhookConfiguration\n * @param name name of the MutatingWebhookConfiguration\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readMutatingWebhookConfiguration(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readMutatingWebhookConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1MutatingWebhookConfiguration\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified ValidatingWebhookConfiguration\n * @param name name of the ValidatingWebhookConfiguration\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readValidatingWebhookConfiguration(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readValidatingWebhookConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ValidatingWebhookConfiguration\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified MutatingWebhookConfiguration\n * @param name name of the MutatingWebhookConfiguration\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceMutatingWebhookConfiguration(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/mutatingwebhookconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceMutatingWebhookConfiguration.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceMutatingWebhookConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1MutatingWebhookConfiguration\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1MutatingWebhookConfiguration\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified ValidatingWebhookConfiguration\n * @param name name of the ValidatingWebhookConfiguration\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceValidatingWebhookConfiguration(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingwebhookconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceValidatingWebhookConfiguration.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceValidatingWebhookConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1ValidatingWebhookConfiguration\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ValidatingWebhookConfiguration\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AdmissionregistrationV1beta1Api = AdmissionregistrationV1beta1Api;\nvar ApiextensionsApiApiKeys;\n(function (ApiextensionsApiApiKeys) {\n ApiextensionsApiApiKeys[ApiextensionsApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(ApiextensionsApiApiKeys = exports.ApiextensionsApiApiKeys || (exports.ApiextensionsApiApiKeys = {}));\nclass ApiextensionsApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[ApiextensionsApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.ApiextensionsApi = ApiextensionsApi;\nvar ApiextensionsV1beta1ApiApiKeys;\n(function (ApiextensionsV1beta1ApiApiKeys) {\n ApiextensionsV1beta1ApiApiKeys[ApiextensionsV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(ApiextensionsV1beta1ApiApiKeys = exports.ApiextensionsV1beta1ApiApiKeys || (exports.ApiextensionsV1beta1ApiApiKeys = {}));\nclass ApiextensionsV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[ApiextensionsV1beta1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a CustomResourceDefinition\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createCustomResourceDefinition(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createCustomResourceDefinition.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1CustomResourceDefinition\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CustomResourceDefinition\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of CustomResourceDefinition\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionCustomResourceDefinition(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a CustomResourceDefinition\n * @param name name of the CustomResourceDefinition\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteCustomResourceDefinition(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteCustomResourceDefinition.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind CustomResourceDefinition\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listCustomResourceDefinition(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CustomResourceDefinitionList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified CustomResourceDefinition\n * @param name name of the CustomResourceDefinition\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchCustomResourceDefinition(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchCustomResourceDefinition.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchCustomResourceDefinition.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CustomResourceDefinition\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified CustomResourceDefinition\n * @param name name of the CustomResourceDefinition\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchCustomResourceDefinitionStatus(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchCustomResourceDefinitionStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchCustomResourceDefinitionStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CustomResourceDefinition\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified CustomResourceDefinition\n * @param name name of the CustomResourceDefinition\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readCustomResourceDefinition(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readCustomResourceDefinition.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CustomResourceDefinition\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified CustomResourceDefinition\n * @param name name of the CustomResourceDefinition\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readCustomResourceDefinitionStatus(name, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readCustomResourceDefinitionStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CustomResourceDefinition\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified CustomResourceDefinition\n * @param name name of the CustomResourceDefinition\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceCustomResourceDefinition(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceCustomResourceDefinition.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceCustomResourceDefinition.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1CustomResourceDefinition\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CustomResourceDefinition\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified CustomResourceDefinition\n * @param name name of the CustomResourceDefinition\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceCustomResourceDefinitionStatus(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceCustomResourceDefinitionStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceCustomResourceDefinitionStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1CustomResourceDefinition\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CustomResourceDefinition\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.ApiextensionsV1beta1Api = ApiextensionsV1beta1Api;\nvar ApiregistrationApiApiKeys;\n(function (ApiregistrationApiApiKeys) {\n ApiregistrationApiApiKeys[ApiregistrationApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(ApiregistrationApiApiKeys = exports.ApiregistrationApiApiKeys || (exports.ApiregistrationApiApiKeys = {}));\nclass ApiregistrationApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[ApiregistrationApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.ApiregistrationApi = ApiregistrationApi;\nvar ApiregistrationV1ApiApiKeys;\n(function (ApiregistrationV1ApiApiKeys) {\n ApiregistrationV1ApiApiKeys[ApiregistrationV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(ApiregistrationV1ApiApiKeys = exports.ApiregistrationV1ApiApiKeys || (exports.ApiregistrationV1ApiApiKeys = {}));\nclass ApiregistrationV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[ApiregistrationV1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create an APIService\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createAPIService(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createAPIService.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1APIService\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIService\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete an APIService\n * @param name name of the APIService\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteAPIService(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteAPIService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of APIService\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionAPIService(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind APIService\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listAPIService(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIServiceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified APIService\n * @param name name of the APIService\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchAPIService(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchAPIService.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchAPIService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIService\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified APIService\n * @param name name of the APIService\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchAPIServiceStatus(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchAPIServiceStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchAPIServiceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIService\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified APIService\n * @param name name of the APIService\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readAPIService(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readAPIService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIService\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified APIService\n * @param name name of the APIService\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readAPIServiceStatus(name, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readAPIServiceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIService\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified APIService\n * @param name name of the APIService\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceAPIService(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceAPIService.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceAPIService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1APIService\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIService\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified APIService\n * @param name name of the APIService\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceAPIServiceStatus(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceAPIServiceStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceAPIServiceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1APIService\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIService\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.ApiregistrationV1Api = ApiregistrationV1Api;\nvar ApiregistrationV1beta1ApiApiKeys;\n(function (ApiregistrationV1beta1ApiApiKeys) {\n ApiregistrationV1beta1ApiApiKeys[ApiregistrationV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(ApiregistrationV1beta1ApiApiKeys = exports.ApiregistrationV1beta1ApiApiKeys || (exports.ApiregistrationV1beta1ApiApiKeys = {}));\nclass ApiregistrationV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[ApiregistrationV1beta1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create an APIService\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createAPIService(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createAPIService.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1APIService\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1APIService\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete an APIService\n * @param name name of the APIService\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteAPIService(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteAPIService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of APIService\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionAPIService(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind APIService\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listAPIService(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1APIServiceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified APIService\n * @param name name of the APIService\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchAPIService(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchAPIService.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchAPIService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1APIService\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified APIService\n * @param name name of the APIService\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchAPIServiceStatus(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchAPIServiceStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchAPIServiceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1APIService\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified APIService\n * @param name name of the APIService\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readAPIService(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readAPIService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1APIService\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified APIService\n * @param name name of the APIService\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readAPIServiceStatus(name, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readAPIServiceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1APIService\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified APIService\n * @param name name of the APIService\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceAPIService(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceAPIService.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceAPIService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1APIService\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1APIService\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified APIService\n * @param name name of the APIService\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceAPIServiceStatus(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceAPIServiceStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceAPIServiceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1APIService\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1APIService\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.ApiregistrationV1beta1Api = ApiregistrationV1beta1Api;\nvar ApisApiApiKeys;\n(function (ApisApiApiKeys) {\n ApisApiApiKeys[ApisApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(ApisApiApiKeys = exports.ApisApiApiKeys || (exports.ApisApiApiKeys = {}));\nclass ApisApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[ApisApiApiKeys[key]].apiKey = value;\n }\n /**\n * get available API versions\n * @param {*} [options] Override http request options.\n */\n getAPIVersions(options = {}) {\n const localVarPath = this.basePath + '/apis/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroupList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.ApisApi = ApisApi;\nvar AppsApiApiKeys;\n(function (AppsApiApiKeys) {\n AppsApiApiKeys[AppsApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AppsApiApiKeys = exports.AppsApiApiKeys || (exports.AppsApiApiKeys = {}));\nclass AppsApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AppsApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/apps/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AppsApi = AppsApi;\nvar AppsV1ApiApiKeys;\n(function (AppsV1ApiApiKeys) {\n AppsV1ApiApiKeys[AppsV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AppsV1ApiApiKeys = exports.AppsV1ApiApiKeys || (exports.AppsV1ApiApiKeys = {}));\nclass AppsV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AppsV1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedControllerRevision(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedControllerRevision.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedControllerRevision.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ControllerRevision\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ControllerRevision\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedDaemonSet(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDaemonSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedDaemonSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DaemonSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedDeployment(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDeployment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedDeployment.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Deployment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedReplicaSet(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedReplicaSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedReplicaSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ReplicaSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedStatefulSet(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedStatefulSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedStatefulSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1StatefulSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedControllerRevision(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedControllerRevision.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedDaemonSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDaemonSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedDeployment(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDeployment.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedReplicaSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedReplicaSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedStatefulSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedStatefulSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a ControllerRevision\n * @param name name of the ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedControllerRevision(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedControllerRevision.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedDaemonSet(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedDaemonSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedDeployment(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedReplicaSet(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedReplicaSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedStatefulSet(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedStatefulSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ControllerRevision\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listControllerRevisionForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/controllerrevisions';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ControllerRevisionList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind DaemonSet\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listDaemonSetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/daemonsets';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1DaemonSetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Deployment\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listDeploymentForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/deployments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1DeploymentList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedControllerRevision(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedControllerRevision.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ControllerRevisionList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedDaemonSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedDaemonSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1DaemonSetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedDeployment(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedDeployment.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1DeploymentList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedReplicaSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedReplicaSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ReplicaSetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedStatefulSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedStatefulSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1StatefulSetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ReplicaSet\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listReplicaSetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/replicasets';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ReplicaSetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind StatefulSet\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listStatefulSetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/statefulsets';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1StatefulSetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified ControllerRevision\n * @param name name of the ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedControllerRevision(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedControllerRevision.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedControllerRevision.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ControllerRevision\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedDaemonSet(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDaemonSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDaemonSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDaemonSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedDeployment(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeployment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update scale of the specified Deployment\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeploymentScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeploymentScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeploymentScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeploymentStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeploymentStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeploymentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedReplicaSet(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update scale of the specified ReplicaSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSetScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedStatefulSet(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update scale of the specified StatefulSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSetScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified ControllerRevision\n * @param name name of the ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedControllerRevision(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedControllerRevision.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ControllerRevision\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedDaemonSet(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDaemonSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedDaemonSetStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDaemonSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedDeployment(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read scale of the specified Deployment\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedDeploymentScale(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDeploymentScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeploymentScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedDeploymentStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDeploymentStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeploymentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedReplicaSet(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read scale of the specified ReplicaSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedReplicaSetScale(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedReplicaSetStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedStatefulSet(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read scale of the specified StatefulSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedStatefulSetScale(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedStatefulSetStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified ControllerRevision\n * @param name name of the ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedControllerRevision(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedControllerRevision.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedControllerRevision.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ControllerRevision\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ControllerRevision\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedDaemonSet(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDaemonSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDaemonSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DaemonSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDaemonSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DaemonSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedDeployment(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeployment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Deployment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace scale of the specified Deployment\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeploymentScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeploymentScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Scale\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeploymentStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeploymentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Deployment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedReplicaSet(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ReplicaSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace scale of the specified ReplicaSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSetScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Scale\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ReplicaSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedStatefulSet(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1StatefulSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace scale of the specified StatefulSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSetScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Scale\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1StatefulSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AppsV1Api = AppsV1Api;\nvar AppsV1beta1ApiApiKeys;\n(function (AppsV1beta1ApiApiKeys) {\n AppsV1beta1ApiApiKeys[AppsV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AppsV1beta1ApiApiKeys = exports.AppsV1beta1ApiApiKeys || (exports.AppsV1beta1ApiApiKeys = {}));\nclass AppsV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AppsV1beta1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedControllerRevision(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/controllerrevisions'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedControllerRevision.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedControllerRevision.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1ControllerRevision\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ControllerRevision\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedDeployment(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDeployment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedDeployment.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"AppsV1beta1Deployment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"AppsV1beta1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create rollback of a Deployment\n * @param name name of the DeploymentRollback\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @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\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n createNamespacedDeploymentRollback(name, namespace, body, dryRun, includeUninitialized, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/rollback'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling createNamespacedDeploymentRollback.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDeploymentRollback.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedDeploymentRollback.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"AppsV1beta1DeploymentRollback\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedStatefulSet(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedStatefulSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedStatefulSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1StatefulSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedControllerRevision(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/controllerrevisions'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedControllerRevision.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedDeployment(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDeployment.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedStatefulSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedStatefulSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a ControllerRevision\n * @param name name of the ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedControllerRevision(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/controllerrevisions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedControllerRevision.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedDeployment(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedStatefulSet(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedStatefulSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ControllerRevision\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listControllerRevisionForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/controllerrevisions';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ControllerRevisionList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Deployment\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listDeploymentForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/deployments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"AppsV1beta1DeploymentList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedControllerRevision(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/controllerrevisions'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedControllerRevision.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ControllerRevisionList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedDeployment(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedDeployment.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"AppsV1beta1DeploymentList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedStatefulSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedStatefulSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1StatefulSetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind StatefulSet\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listStatefulSetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/statefulsets';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1StatefulSetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified ControllerRevision\n * @param name name of the ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedControllerRevision(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/controllerrevisions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedControllerRevision.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedControllerRevision.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ControllerRevision\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedDeployment(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeployment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"AppsV1beta1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update scale of the specified Deployment\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeploymentScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeploymentScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeploymentScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"AppsV1beta1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeploymentStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeploymentStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeploymentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"AppsV1beta1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedStatefulSet(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update scale of the specified StatefulSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSetScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"AppsV1beta1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified ControllerRevision\n * @param name name of the ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedControllerRevision(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/controllerrevisions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedControllerRevision.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ControllerRevision\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedDeployment(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"AppsV1beta1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read scale of the specified Deployment\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedDeploymentScale(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDeploymentScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeploymentScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"AppsV1beta1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedDeploymentStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDeploymentStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeploymentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"AppsV1beta1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedStatefulSet(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read scale of the specified StatefulSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedStatefulSetScale(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"AppsV1beta1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedStatefulSetStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified ControllerRevision\n * @param name name of the ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedControllerRevision(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/controllerrevisions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedControllerRevision.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedControllerRevision.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1ControllerRevision\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ControllerRevision\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedDeployment(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeployment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"AppsV1beta1Deployment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"AppsV1beta1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace scale of the specified Deployment\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeploymentScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeploymentScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"AppsV1beta1Scale\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"AppsV1beta1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeploymentStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeploymentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"AppsV1beta1Deployment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"AppsV1beta1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedStatefulSet(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1StatefulSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace scale of the specified StatefulSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSetScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"AppsV1beta1Scale\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"AppsV1beta1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1StatefulSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AppsV1beta1Api = AppsV1beta1Api;\nvar AppsV1beta2ApiApiKeys;\n(function (AppsV1beta2ApiApiKeys) {\n AppsV1beta2ApiApiKeys[AppsV1beta2ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AppsV1beta2ApiApiKeys = exports.AppsV1beta2ApiApiKeys || (exports.AppsV1beta2ApiApiKeys = {}));\nclass AppsV1beta2Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AppsV1beta2ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedControllerRevision(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedControllerRevision.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedControllerRevision.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta2ControllerRevision\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2ControllerRevision\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedDaemonSet(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDaemonSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedDaemonSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta2DaemonSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedDeployment(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDeployment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedDeployment.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta2Deployment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedReplicaSet(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedReplicaSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedReplicaSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta2ReplicaSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedStatefulSet(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedStatefulSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedStatefulSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta2StatefulSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedControllerRevision(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedControllerRevision.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedDaemonSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDaemonSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedDeployment(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDeployment.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedReplicaSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedReplicaSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedStatefulSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedStatefulSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a ControllerRevision\n * @param name name of the ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedControllerRevision(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedControllerRevision.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedDaemonSet(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedDaemonSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedDeployment(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedReplicaSet(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedReplicaSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedStatefulSet(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedStatefulSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ControllerRevision\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listControllerRevisionForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/controllerrevisions';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2ControllerRevisionList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind DaemonSet\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listDaemonSetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/daemonsets';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2DaemonSetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Deployment\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listDeploymentForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/deployments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2DeploymentList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedControllerRevision(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedControllerRevision.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2ControllerRevisionList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedDaemonSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedDaemonSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2DaemonSetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedDeployment(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedDeployment.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2DeploymentList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedReplicaSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedReplicaSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2ReplicaSetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedStatefulSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedStatefulSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2StatefulSetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ReplicaSet\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listReplicaSetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/replicasets';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2ReplicaSetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind StatefulSet\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listStatefulSetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/statefulsets';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2StatefulSetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified ControllerRevision\n * @param name name of the ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedControllerRevision(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedControllerRevision.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedControllerRevision.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2ControllerRevision\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedDaemonSet(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDaemonSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDaemonSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDaemonSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedDeployment(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeployment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update scale of the specified Deployment\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeploymentScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeploymentScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeploymentScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeploymentStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeploymentStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeploymentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedReplicaSet(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update scale of the specified ReplicaSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSetScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedStatefulSet(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update scale of the specified StatefulSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSetScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified ControllerRevision\n * @param name name of the ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedControllerRevision(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedControllerRevision.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2ControllerRevision\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedDaemonSet(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDaemonSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedDaemonSetStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDaemonSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedDeployment(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read scale of the specified Deployment\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedDeploymentScale(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDeploymentScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeploymentScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedDeploymentStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDeploymentStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeploymentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedReplicaSet(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read scale of the specified ReplicaSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedReplicaSetScale(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedReplicaSetStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedStatefulSet(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read scale of the specified StatefulSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedStatefulSetScale(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedStatefulSetStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified ControllerRevision\n * @param name name of the ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedControllerRevision(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedControllerRevision.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedControllerRevision.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta2ControllerRevision\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2ControllerRevision\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedDaemonSet(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDaemonSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDaemonSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta2DaemonSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDaemonSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta2DaemonSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedDeployment(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeployment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta2Deployment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace scale of the specified Deployment\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeploymentScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeploymentScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta2Scale\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeploymentStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeploymentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta2Deployment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedReplicaSet(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta2ReplicaSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace scale of the specified ReplicaSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSetScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta2Scale\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta2ReplicaSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedStatefulSet(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta2StatefulSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace scale of the specified StatefulSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSetScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta2Scale\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta2StatefulSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta2StatefulSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AppsV1beta2Api = AppsV1beta2Api;\nvar AuditregistrationApiApiKeys;\n(function (AuditregistrationApiApiKeys) {\n AuditregistrationApiApiKeys[AuditregistrationApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AuditregistrationApiApiKeys = exports.AuditregistrationApiApiKeys || (exports.AuditregistrationApiApiKeys = {}));\nclass AuditregistrationApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AuditregistrationApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/auditregistration.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AuditregistrationApi = AuditregistrationApi;\nvar AuditregistrationV1alpha1ApiApiKeys;\n(function (AuditregistrationV1alpha1ApiApiKeys) {\n AuditregistrationV1alpha1ApiApiKeys[AuditregistrationV1alpha1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AuditregistrationV1alpha1ApiApiKeys = exports.AuditregistrationV1alpha1ApiApiKeys || (exports.AuditregistrationV1alpha1ApiApiKeys = {}));\nclass AuditregistrationV1alpha1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AuditregistrationV1alpha1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create an AuditSink\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createAuditSink(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/auditregistration.k8s.io/v1alpha1/auditsinks';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createAuditSink.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1alpha1AuditSink\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1AuditSink\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete an AuditSink\n * @param name name of the AuditSink\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteAuditSink(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/auditregistration.k8s.io/v1alpha1/auditsinks/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteAuditSink.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of AuditSink\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionAuditSink(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/auditregistration.k8s.io/v1alpha1/auditsinks';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/auditregistration.k8s.io/v1alpha1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind AuditSink\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listAuditSink(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/auditregistration.k8s.io/v1alpha1/auditsinks';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1AuditSinkList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified AuditSink\n * @param name name of the AuditSink\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchAuditSink(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/auditregistration.k8s.io/v1alpha1/auditsinks/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchAuditSink.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchAuditSink.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1AuditSink\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified AuditSink\n * @param name name of the AuditSink\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readAuditSink(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/auditregistration.k8s.io/v1alpha1/auditsinks/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readAuditSink.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1AuditSink\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified AuditSink\n * @param name name of the AuditSink\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceAuditSink(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/auditregistration.k8s.io/v1alpha1/auditsinks/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceAuditSink.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceAuditSink.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1alpha1AuditSink\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1AuditSink\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AuditregistrationV1alpha1Api = AuditregistrationV1alpha1Api;\nvar AuthenticationApiApiKeys;\n(function (AuthenticationApiApiKeys) {\n AuthenticationApiApiKeys[AuthenticationApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AuthenticationApiApiKeys = exports.AuthenticationApiApiKeys || (exports.AuthenticationApiApiKeys = {}));\nclass AuthenticationApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AuthenticationApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/authentication.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AuthenticationApi = AuthenticationApi;\nvar AuthenticationV1ApiApiKeys;\n(function (AuthenticationV1ApiApiKeys) {\n AuthenticationV1ApiApiKeys[AuthenticationV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AuthenticationV1ApiApiKeys = exports.AuthenticationV1ApiApiKeys || (exports.AuthenticationV1ApiApiKeys = {}));\nclass AuthenticationV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AuthenticationV1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a TokenReview\n * @param body\n * @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\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n createTokenReview(body, dryRun, includeUninitialized, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1/tokenreviews';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createTokenReview.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1TokenReview\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1TokenReview\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AuthenticationV1Api = AuthenticationV1Api;\nvar AuthenticationV1beta1ApiApiKeys;\n(function (AuthenticationV1beta1ApiApiKeys) {\n AuthenticationV1beta1ApiApiKeys[AuthenticationV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AuthenticationV1beta1ApiApiKeys = exports.AuthenticationV1beta1ApiApiKeys || (exports.AuthenticationV1beta1ApiApiKeys = {}));\nclass AuthenticationV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AuthenticationV1beta1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a TokenReview\n * @param body\n * @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\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n createTokenReview(body, dryRun, includeUninitialized, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1beta1/tokenreviews';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createTokenReview.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1TokenReview\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1TokenReview\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AuthenticationV1beta1Api = AuthenticationV1beta1Api;\nvar AuthorizationApiApiKeys;\n(function (AuthorizationApiApiKeys) {\n AuthorizationApiApiKeys[AuthorizationApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AuthorizationApiApiKeys = exports.AuthorizationApiApiKeys || (exports.AuthorizationApiApiKeys = {}));\nclass AuthorizationApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AuthorizationApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/authorization.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AuthorizationApi = AuthorizationApi;\nvar AuthorizationV1ApiApiKeys;\n(function (AuthorizationV1ApiApiKeys) {\n AuthorizationV1ApiApiKeys[AuthorizationV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AuthorizationV1ApiApiKeys = exports.AuthorizationV1ApiApiKeys || (exports.AuthorizationV1ApiApiKeys = {}));\nclass AuthorizationV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AuthorizationV1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a LocalSubjectAccessReview\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @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\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n createNamespacedLocalSubjectAccessReview(namespace, body, dryRun, includeUninitialized, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLocalSubjectAccessReview.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedLocalSubjectAccessReview.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1LocalSubjectAccessReview\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1LocalSubjectAccessReview\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a SelfSubjectAccessReview\n * @param body\n * @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\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n createSelfSubjectAccessReview(body, dryRun, includeUninitialized, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/selfsubjectaccessreviews';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createSelfSubjectAccessReview.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1SelfSubjectAccessReview\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1SelfSubjectAccessReview\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a SelfSubjectRulesReview\n * @param body\n * @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\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n createSelfSubjectRulesReview(body, dryRun, includeUninitialized, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/selfsubjectrulesreviews';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createSelfSubjectRulesReview.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1SelfSubjectRulesReview\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1SelfSubjectRulesReview\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a SubjectAccessReview\n * @param body\n * @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\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n createSubjectAccessReview(body, dryRun, includeUninitialized, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/subjectaccessreviews';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createSubjectAccessReview.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1SubjectAccessReview\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1SubjectAccessReview\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AuthorizationV1Api = AuthorizationV1Api;\nvar AuthorizationV1beta1ApiApiKeys;\n(function (AuthorizationV1beta1ApiApiKeys) {\n AuthorizationV1beta1ApiApiKeys[AuthorizationV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AuthorizationV1beta1ApiApiKeys = exports.AuthorizationV1beta1ApiApiKeys || (exports.AuthorizationV1beta1ApiApiKeys = {}));\nclass AuthorizationV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AuthorizationV1beta1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a LocalSubjectAccessReview\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @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\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n createNamespacedLocalSubjectAccessReview(namespace, body, dryRun, includeUninitialized, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1beta1/namespaces/{namespace}/localsubjectaccessreviews'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLocalSubjectAccessReview.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedLocalSubjectAccessReview.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1LocalSubjectAccessReview\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1LocalSubjectAccessReview\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a SelfSubjectAccessReview\n * @param body\n * @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\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n createSelfSubjectAccessReview(body, dryRun, includeUninitialized, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1beta1/selfsubjectaccessreviews';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createSelfSubjectAccessReview.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1SelfSubjectAccessReview\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1SelfSubjectAccessReview\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a SelfSubjectRulesReview\n * @param body\n * @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\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n createSelfSubjectRulesReview(body, dryRun, includeUninitialized, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1beta1/selfsubjectrulesreviews';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createSelfSubjectRulesReview.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1SelfSubjectRulesReview\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1SelfSubjectRulesReview\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a SubjectAccessReview\n * @param body\n * @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\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n createSubjectAccessReview(body, dryRun, includeUninitialized, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1beta1/subjectaccessreviews';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createSubjectAccessReview.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1SubjectAccessReview\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1SubjectAccessReview\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AuthorizationV1beta1Api = AuthorizationV1beta1Api;\nvar AutoscalingApiApiKeys;\n(function (AutoscalingApiApiKeys) {\n AutoscalingApiApiKeys[AutoscalingApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AutoscalingApiApiKeys = exports.AutoscalingApiApiKeys || (exports.AutoscalingApiApiKeys = {}));\nclass AutoscalingApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AutoscalingApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AutoscalingApi = AutoscalingApi;\nvar AutoscalingV1ApiApiKeys;\n(function (AutoscalingV1ApiApiKeys) {\n AutoscalingV1ApiApiKeys[AutoscalingV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AutoscalingV1ApiApiKeys = exports.AutoscalingV1ApiApiKeys || (exports.AutoscalingV1ApiApiKeys = {}));\nclass AutoscalingV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AutoscalingV1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedHorizontalPodAutoscaler(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1HorizontalPodAutoscaler\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedHorizontalPodAutoscaler.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind HorizontalPodAutoscaler\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listHorizontalPodAutoscalerForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/horizontalpodautoscalers';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1HorizontalPodAutoscalerList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedHorizontalPodAutoscaler(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedHorizontalPodAutoscaler.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1HorizontalPodAutoscalerList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1HorizontalPodAutoscaler\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1HorizontalPodAutoscaler\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AutoscalingV1Api = AutoscalingV1Api;\nvar AutoscalingV2beta1ApiApiKeys;\n(function (AutoscalingV2beta1ApiApiKeys) {\n AutoscalingV2beta1ApiApiKeys[AutoscalingV2beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AutoscalingV2beta1ApiApiKeys = exports.AutoscalingV2beta1ApiApiKeys || (exports.AutoscalingV2beta1ApiApiKeys = {}));\nclass AutoscalingV2beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AutoscalingV2beta1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedHorizontalPodAutoscaler(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V2beta1HorizontalPodAutoscaler\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2beta1HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedHorizontalPodAutoscaler.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind HorizontalPodAutoscaler\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listHorizontalPodAutoscalerForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/horizontalpodautoscalers';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2beta1HorizontalPodAutoscalerList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedHorizontalPodAutoscaler(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedHorizontalPodAutoscaler.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2beta1HorizontalPodAutoscalerList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2beta1HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2beta1HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2beta1HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2beta1HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V2beta1HorizontalPodAutoscaler\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2beta1HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V2beta1HorizontalPodAutoscaler\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2beta1HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AutoscalingV2beta1Api = AutoscalingV2beta1Api;\nvar AutoscalingV2beta2ApiApiKeys;\n(function (AutoscalingV2beta2ApiApiKeys) {\n AutoscalingV2beta2ApiApiKeys[AutoscalingV2beta2ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AutoscalingV2beta2ApiApiKeys = exports.AutoscalingV2beta2ApiApiKeys || (exports.AutoscalingV2beta2ApiApiKeys = {}));\nclass AutoscalingV2beta2Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AutoscalingV2beta2ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedHorizontalPodAutoscaler(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V2beta2HorizontalPodAutoscaler\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2beta2HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedHorizontalPodAutoscaler.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind HorizontalPodAutoscaler\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listHorizontalPodAutoscalerForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/horizontalpodautoscalers';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2beta2HorizontalPodAutoscalerList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedHorizontalPodAutoscaler(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedHorizontalPodAutoscaler.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2beta2HorizontalPodAutoscalerList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2beta2HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2beta2HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2beta2HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2beta2HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V2beta2HorizontalPodAutoscaler\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2beta2HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V2beta2HorizontalPodAutoscaler\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2beta2HorizontalPodAutoscaler\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.AutoscalingV2beta2Api = AutoscalingV2beta2Api;\nvar BatchApiApiKeys;\n(function (BatchApiApiKeys) {\n BatchApiApiKeys[BatchApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(BatchApiApiKeys = exports.BatchApiApiKeys || (exports.BatchApiApiKeys = {}));\nclass BatchApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[BatchApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/batch/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.BatchApi = BatchApi;\nvar BatchV1ApiApiKeys;\n(function (BatchV1ApiApiKeys) {\n BatchV1ApiApiKeys[BatchV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(BatchV1ApiApiKeys = exports.BatchV1ApiApiKeys || (exports.BatchV1ApiApiKeys = {}));\nclass BatchV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[BatchV1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedJob(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedJob.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedJob.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Job\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Job\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedJob(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedJob.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a Job\n * @param name name of the Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedJob(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Job\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listJobForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1/jobs';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1JobList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedJob(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedJob.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1JobList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified Job\n * @param name name of the Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedJob(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedJob.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Job\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified Job\n * @param name name of the Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedJobStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedJobStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedJobStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedJobStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Job\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified Job\n * @param name name of the Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedJob(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Job\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified Job\n * @param name name of the Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedJobStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedJobStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedJobStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Job\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified Job\n * @param name name of the Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedJob(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedJob.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Job\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Job\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified Job\n * @param name name of the Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedJobStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedJobStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedJobStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedJobStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Job\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Job\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.BatchV1Api = BatchV1Api;\nvar BatchV1beta1ApiApiKeys;\n(function (BatchV1beta1ApiApiKeys) {\n BatchV1beta1ApiApiKeys[BatchV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(BatchV1beta1ApiApiKeys = exports.BatchV1beta1ApiApiKeys || (exports.BatchV1beta1ApiApiKeys = {}));\nclass BatchV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[BatchV1beta1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedCronJob(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCronJob.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedCronJob.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1CronJob\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CronJob\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedCronJob(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCronJob.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedCronJob(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCronJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind CronJob\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listCronJobForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/cronjobs';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CronJobList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedCronJob(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCronJob.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CronJobList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedCronJob(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJob.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CronJob\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJobStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJobStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJobStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CronJob\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedCronJob(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CronJob\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedCronJobStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJobStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJobStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CronJob\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJob.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1CronJob\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CronJob\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJobStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJobStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJobStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1CronJob\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CronJob\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.BatchV1beta1Api = BatchV1beta1Api;\nvar BatchV2alpha1ApiApiKeys;\n(function (BatchV2alpha1ApiApiKeys) {\n BatchV2alpha1ApiApiKeys[BatchV2alpha1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(BatchV2alpha1ApiApiKeys = exports.BatchV2alpha1ApiApiKeys || (exports.BatchV2alpha1ApiApiKeys = {}));\nclass BatchV2alpha1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[BatchV2alpha1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedCronJob(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCronJob.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedCronJob.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V2alpha1CronJob\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2alpha1CronJob\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedCronJob(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCronJob.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedCronJob(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCronJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v2alpha1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind CronJob\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listCronJobForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v2alpha1/cronjobs';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2alpha1CronJobList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedCronJob(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCronJob.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2alpha1CronJobList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedCronJob(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJob.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2alpha1CronJob\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJobStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJobStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJobStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2alpha1CronJob\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedCronJob(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2alpha1CronJob\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedCronJobStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJobStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJobStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2alpha1CronJob\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJob.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V2alpha1CronJob\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2alpha1CronJob\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJobStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJobStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJobStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V2alpha1CronJob\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V2alpha1CronJob\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.BatchV2alpha1Api = BatchV2alpha1Api;\nvar CertificatesApiApiKeys;\n(function (CertificatesApiApiKeys) {\n CertificatesApiApiKeys[CertificatesApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(CertificatesApiApiKeys = exports.CertificatesApiApiKeys || (exports.CertificatesApiApiKeys = {}));\nclass CertificatesApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[CertificatesApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.CertificatesApi = CertificatesApi;\nvar CertificatesV1beta1ApiApiKeys;\n(function (CertificatesV1beta1ApiApiKeys) {\n CertificatesV1beta1ApiApiKeys[CertificatesV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(CertificatesV1beta1ApiApiKeys = exports.CertificatesV1beta1ApiApiKeys || (exports.CertificatesV1beta1ApiApiKeys = {}));\nclass CertificatesV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[CertificatesV1beta1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a CertificateSigningRequest\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createCertificateSigningRequest(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createCertificateSigningRequest.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1CertificateSigningRequest\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CertificateSigningRequest\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a CertificateSigningRequest\n * @param name name of the CertificateSigningRequest\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteCertificateSigningRequest(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteCertificateSigningRequest.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of CertificateSigningRequest\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionCertificateSigningRequest(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind CertificateSigningRequest\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listCertificateSigningRequest(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CertificateSigningRequestList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified CertificateSigningRequest\n * @param name name of the CertificateSigningRequest\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchCertificateSigningRequest(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequest.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequest.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CertificateSigningRequest\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified CertificateSigningRequest\n * @param name name of the CertificateSigningRequest\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchCertificateSigningRequestStatus(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequestStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequestStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CertificateSigningRequest\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified CertificateSigningRequest\n * @param name name of the CertificateSigningRequest\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readCertificateSigningRequest(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequest.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CertificateSigningRequest\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified CertificateSigningRequest\n * @param name name of the CertificateSigningRequest\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readCertificateSigningRequestStatus(name, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequestStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CertificateSigningRequest\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified CertificateSigningRequest\n * @param name name of the CertificateSigningRequest\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceCertificateSigningRequest(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequest.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequest.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1CertificateSigningRequest\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CertificateSigningRequest\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace approval of the specified CertificateSigningRequest\n * @param name name of the CertificateSigningRequest\n * @param body\n * @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\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n replaceCertificateSigningRequestApproval(name, body, dryRun, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/approval'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequestApproval.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequestApproval.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1CertificateSigningRequest\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CertificateSigningRequest\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified CertificateSigningRequest\n * @param name name of the CertificateSigningRequest\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceCertificateSigningRequestStatus(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequestStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequestStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1CertificateSigningRequest\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1CertificateSigningRequest\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.CertificatesV1beta1Api = CertificatesV1beta1Api;\nvar CoordinationApiApiKeys;\n(function (CoordinationApiApiKeys) {\n CoordinationApiApiKeys[CoordinationApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(CoordinationApiApiKeys = exports.CoordinationApiApiKeys || (exports.CoordinationApiApiKeys = {}));\nclass CoordinationApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[CoordinationApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.CoordinationApi = CoordinationApi;\nvar CoordinationV1beta1ApiApiKeys;\n(function (CoordinationV1beta1ApiApiKeys) {\n CoordinationV1beta1ApiApiKeys[CoordinationV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(CoordinationV1beta1ApiApiKeys = exports.CoordinationV1beta1ApiApiKeys || (exports.CoordinationV1beta1ApiApiKeys = {}));\nclass CoordinationV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[CoordinationV1beta1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a Lease\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedLease(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leases'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLease.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedLease.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1Lease\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Lease\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of Lease\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedLease(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leases'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedLease.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a Lease\n * @param name name of the Lease\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedLease(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leases/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedLease.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedLease.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Lease\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listLeaseForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/leases';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1LeaseList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Lease\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedLease(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leases'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedLease.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1LeaseList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified Lease\n * @param name name of the Lease\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedLease(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leases/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedLease.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedLease.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedLease.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Lease\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified Lease\n * @param name name of the Lease\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedLease(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leases/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedLease.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedLease.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Lease\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified Lease\n * @param name name of the Lease\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedLease(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leases/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedLease.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedLease.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedLease.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1Lease\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Lease\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.CoordinationV1beta1Api = CoordinationV1beta1Api;\nvar CoreApiApiKeys;\n(function (CoreApiApiKeys) {\n CoreApiApiKeys[CoreApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(CoreApiApiKeys = exports.CoreApiApiKeys || (exports.CoreApiApiKeys = {}));\nclass CoreApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[CoreApiApiKeys[key]].apiKey = value;\n }\n /**\n * get available API versions\n * @param {*} [options] Override http request options.\n */\n getAPIVersions(options = {}) {\n const localVarPath = this.basePath + '/api/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIVersions\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.CoreApi = CoreApi;\nvar CoreV1ApiApiKeys;\n(function (CoreV1ApiApiKeys) {\n CoreV1ApiApiKeys[CoreV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(CoreV1ApiApiKeys = exports.CoreV1ApiApiKeys || (exports.CoreV1ApiApiKeys = {}));\nclass CoreV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[CoreV1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * connect DELETE requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the URL path to use for the current proxy request to pod.\n * @param {*} [options] Override http request options.\n */\n connectDeleteNamespacedPodProxy(name, namespace, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedPodProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedPodProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect DELETE requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to pod.\n * @param {*} [options] Override http request options.\n */\n connectDeleteNamespacedPodProxyWithPath(name, namespace, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect DELETE requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.\n * @param {*} [options] Override http request options.\n */\n connectDeleteNamespacedServiceProxy(name, namespace, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedServiceProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedServiceProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect DELETE requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.\n * @param {*} [options] Override http request options.\n */\n connectDeleteNamespacedServiceProxyWithPath(name, namespace, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect DELETE requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path Path is the URL path to use for the current proxy request to node.\n * @param {*} [options] Override http request options.\n */\n connectDeleteNodeProxy(name, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectDeleteNodeProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect DELETE requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to node.\n * @param {*} [options] Override http request options.\n */\n connectDeleteNodeProxyWithPath(name, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectDeleteNodeProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectDeleteNodeProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect GET requests to attach of Pod\n * @param name name of the PodAttachOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param container The container in which to execute the command. Defaults to only container if there is only one container in the pod.\n * @param stderr Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.\n * @param stdin Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.\n * @param stdout Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.\n * @param tty TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.\n * @param {*} [options] Override http request options.\n */\n connectGetNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/attach'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodAttach.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodAttach.');\n }\n if (container !== undefined) {\n localVarQueryParameters['container'] = ObjectSerializer.serialize(container, \"string\");\n }\n if (stderr !== undefined) {\n localVarQueryParameters['stderr'] = ObjectSerializer.serialize(stderr, \"boolean\");\n }\n if (stdin !== undefined) {\n localVarQueryParameters['stdin'] = ObjectSerializer.serialize(stdin, \"boolean\");\n }\n if (stdout !== undefined) {\n localVarQueryParameters['stdout'] = ObjectSerializer.serialize(stdout, \"boolean\");\n }\n if (tty !== undefined) {\n localVarQueryParameters['tty'] = ObjectSerializer.serialize(tty, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect GET requests to exec of Pod\n * @param name name of the PodExecOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param command Command is the remote command to execute. argv array. Not executed within a shell.\n * @param container Container in which to execute the command. Defaults to only container if there is only one container in the pod.\n * @param stderr Redirect the standard error stream of the pod for this call. Defaults to true.\n * @param stdin Redirect the standard input stream of the pod for this call. Defaults to false.\n * @param stdout Redirect the standard output stream of the pod for this call. Defaults to true.\n * @param tty TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.\n * @param {*} [options] Override http request options.\n */\n connectGetNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/exec'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodExec.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodExec.');\n }\n if (command !== undefined) {\n localVarQueryParameters['command'] = ObjectSerializer.serialize(command, \"string\");\n }\n if (container !== undefined) {\n localVarQueryParameters['container'] = ObjectSerializer.serialize(container, \"string\");\n }\n if (stderr !== undefined) {\n localVarQueryParameters['stderr'] = ObjectSerializer.serialize(stderr, \"boolean\");\n }\n if (stdin !== undefined) {\n localVarQueryParameters['stdin'] = ObjectSerializer.serialize(stdin, \"boolean\");\n }\n if (stdout !== undefined) {\n localVarQueryParameters['stdout'] = ObjectSerializer.serialize(stdout, \"boolean\");\n }\n if (tty !== undefined) {\n localVarQueryParameters['tty'] = ObjectSerializer.serialize(tty, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect GET requests to portforward of Pod\n * @param name name of the PodPortForwardOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param ports List of ports to forward Required when using WebSockets\n * @param {*} [options] Override http request options.\n */\n connectGetNamespacedPodPortforward(name, namespace, ports, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/portforward'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodPortforward.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodPortforward.');\n }\n if (ports !== undefined) {\n localVarQueryParameters['ports'] = ObjectSerializer.serialize(ports, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect GET requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the URL path to use for the current proxy request to pod.\n * @param {*} [options] Override http request options.\n */\n connectGetNamespacedPodProxy(name, namespace, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect GET requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to pod.\n * @param {*} [options] Override http request options.\n */\n connectGetNamespacedPodProxyWithPath(name, namespace, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectGetNamespacedPodProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect GET requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.\n * @param {*} [options] Override http request options.\n */\n connectGetNamespacedServiceProxy(name, namespace, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedServiceProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedServiceProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect GET requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.\n * @param {*} [options] Override http request options.\n */\n connectGetNamespacedServiceProxyWithPath(name, namespace, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectGetNamespacedServiceProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect GET requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path Path is the URL path to use for the current proxy request to node.\n * @param {*} [options] Override http request options.\n */\n connectGetNodeProxy(name, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectGetNodeProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect GET requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to node.\n * @param {*} [options] Override http request options.\n */\n connectGetNodeProxyWithPath(name, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectGetNodeProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectGetNodeProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect HEAD requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the URL path to use for the current proxy request to pod.\n * @param {*} [options] Override http request options.\n */\n connectHeadNamespacedPodProxy(name, namespace, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedPodProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedPodProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'HEAD',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect HEAD requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to pod.\n * @param {*} [options] Override http request options.\n */\n connectHeadNamespacedPodProxyWithPath(name, namespace, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectHeadNamespacedPodProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'HEAD',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect HEAD requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.\n * @param {*} [options] Override http request options.\n */\n connectHeadNamespacedServiceProxy(name, namespace, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedServiceProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedServiceProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'HEAD',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect HEAD requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.\n * @param {*} [options] Override http request options.\n */\n connectHeadNamespacedServiceProxyWithPath(name, namespace, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'HEAD',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect HEAD requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path Path is the URL path to use for the current proxy request to node.\n * @param {*} [options] Override http request options.\n */\n connectHeadNodeProxy(name, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectHeadNodeProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'HEAD',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect HEAD requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to node.\n * @param {*} [options] Override http request options.\n */\n connectHeadNodeProxyWithPath(name, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectHeadNodeProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectHeadNodeProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'HEAD',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect OPTIONS requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the URL path to use for the current proxy request to pod.\n * @param {*} [options] Override http request options.\n */\n connectOptionsNamespacedPodProxy(name, namespace, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedPodProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedPodProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'OPTIONS',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect OPTIONS requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to pod.\n * @param {*} [options] Override http request options.\n */\n connectOptionsNamespacedPodProxyWithPath(name, namespace, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'OPTIONS',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect OPTIONS requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.\n * @param {*} [options] Override http request options.\n */\n connectOptionsNamespacedServiceProxy(name, namespace, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedServiceProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedServiceProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'OPTIONS',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect OPTIONS requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.\n * @param {*} [options] Override http request options.\n */\n connectOptionsNamespacedServiceProxyWithPath(name, namespace, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'OPTIONS',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect OPTIONS requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path Path is the URL path to use for the current proxy request to node.\n * @param {*} [options] Override http request options.\n */\n connectOptionsNodeProxy(name, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectOptionsNodeProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'OPTIONS',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect OPTIONS requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to node.\n * @param {*} [options] Override http request options.\n */\n connectOptionsNodeProxyWithPath(name, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectOptionsNodeProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectOptionsNodeProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'OPTIONS',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect PATCH requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the URL path to use for the current proxy request to pod.\n * @param {*} [options] Override http request options.\n */\n connectPatchNamespacedPodProxy(name, namespace, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedPodProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedPodProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect PATCH requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to pod.\n * @param {*} [options] Override http request options.\n */\n connectPatchNamespacedPodProxyWithPath(name, namespace, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectPatchNamespacedPodProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect PATCH requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.\n * @param {*} [options] Override http request options.\n */\n connectPatchNamespacedServiceProxy(name, namespace, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedServiceProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedServiceProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect PATCH requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.\n * @param {*} [options] Override http request options.\n */\n connectPatchNamespacedServiceProxyWithPath(name, namespace, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect PATCH requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path Path is the URL path to use for the current proxy request to node.\n * @param {*} [options] Override http request options.\n */\n connectPatchNodeProxy(name, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPatchNodeProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect PATCH requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to node.\n * @param {*} [options] Override http request options.\n */\n connectPatchNodeProxyWithPath(name, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPatchNodeProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectPatchNodeProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect POST requests to attach of Pod\n * @param name name of the PodAttachOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param container The container in which to execute the command. Defaults to only container if there is only one container in the pod.\n * @param stderr Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.\n * @param stdin Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.\n * @param stdout Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.\n * @param tty TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.\n * @param {*} [options] Override http request options.\n */\n connectPostNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/attach'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodAttach.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodAttach.');\n }\n if (container !== undefined) {\n localVarQueryParameters['container'] = ObjectSerializer.serialize(container, \"string\");\n }\n if (stderr !== undefined) {\n localVarQueryParameters['stderr'] = ObjectSerializer.serialize(stderr, \"boolean\");\n }\n if (stdin !== undefined) {\n localVarQueryParameters['stdin'] = ObjectSerializer.serialize(stdin, \"boolean\");\n }\n if (stdout !== undefined) {\n localVarQueryParameters['stdout'] = ObjectSerializer.serialize(stdout, \"boolean\");\n }\n if (tty !== undefined) {\n localVarQueryParameters['tty'] = ObjectSerializer.serialize(tty, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect POST requests to exec of Pod\n * @param name name of the PodExecOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param command Command is the remote command to execute. argv array. Not executed within a shell.\n * @param container Container in which to execute the command. Defaults to only container if there is only one container in the pod.\n * @param stderr Redirect the standard error stream of the pod for this call. Defaults to true.\n * @param stdin Redirect the standard input stream of the pod for this call. Defaults to false.\n * @param stdout Redirect the standard output stream of the pod for this call. Defaults to true.\n * @param tty TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.\n * @param {*} [options] Override http request options.\n */\n connectPostNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/exec'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodExec.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodExec.');\n }\n if (command !== undefined) {\n localVarQueryParameters['command'] = ObjectSerializer.serialize(command, \"string\");\n }\n if (container !== undefined) {\n localVarQueryParameters['container'] = ObjectSerializer.serialize(container, \"string\");\n }\n if (stderr !== undefined) {\n localVarQueryParameters['stderr'] = ObjectSerializer.serialize(stderr, \"boolean\");\n }\n if (stdin !== undefined) {\n localVarQueryParameters['stdin'] = ObjectSerializer.serialize(stdin, \"boolean\");\n }\n if (stdout !== undefined) {\n localVarQueryParameters['stdout'] = ObjectSerializer.serialize(stdout, \"boolean\");\n }\n if (tty !== undefined) {\n localVarQueryParameters['tty'] = ObjectSerializer.serialize(tty, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect POST requests to portforward of Pod\n * @param name name of the PodPortForwardOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param ports List of ports to forward Required when using WebSockets\n * @param {*} [options] Override http request options.\n */\n connectPostNamespacedPodPortforward(name, namespace, ports, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/portforward'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodPortforward.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodPortforward.');\n }\n if (ports !== undefined) {\n localVarQueryParameters['ports'] = ObjectSerializer.serialize(ports, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect POST requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the URL path to use for the current proxy request to pod.\n * @param {*} [options] Override http request options.\n */\n connectPostNamespacedPodProxy(name, namespace, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect POST requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to pod.\n * @param {*} [options] Override http request options.\n */\n connectPostNamespacedPodProxyWithPath(name, namespace, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectPostNamespacedPodProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect POST requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.\n * @param {*} [options] Override http request options.\n */\n connectPostNamespacedServiceProxy(name, namespace, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedServiceProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedServiceProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect POST requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.\n * @param {*} [options] Override http request options.\n */\n connectPostNamespacedServiceProxyWithPath(name, namespace, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectPostNamespacedServiceProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect POST requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path Path is the URL path to use for the current proxy request to node.\n * @param {*} [options] Override http request options.\n */\n connectPostNodeProxy(name, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPostNodeProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect POST requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to node.\n * @param {*} [options] Override http request options.\n */\n connectPostNodeProxyWithPath(name, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPostNodeProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectPostNodeProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect PUT requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the URL path to use for the current proxy request to pod.\n * @param {*} [options] Override http request options.\n */\n connectPutNamespacedPodProxy(name, namespace, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedPodProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedPodProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect PUT requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to pod.\n * @param {*} [options] Override http request options.\n */\n connectPutNamespacedPodProxyWithPath(name, namespace, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectPutNamespacedPodProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect PUT requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.\n * @param {*} [options] Override http request options.\n */\n connectPutNamespacedServiceProxy(name, namespace, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedServiceProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedServiceProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect PUT requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.\n * @param {*} [options] Override http request options.\n */\n connectPutNamespacedServiceProxyWithPath(name, namespace, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectPutNamespacedServiceProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect PUT requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path Path is the URL path to use for the current proxy request to node.\n * @param {*} [options] Override http request options.\n */\n connectPutNodeProxy(name, path, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPutNodeProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * connect PUT requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to node.\n * @param {*} [options] Override http request options.\n */\n connectPutNodeProxyWithPath(name, path, path2, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPutNodeProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectPutNodeProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a Namespace\n * @param body\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespace(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespace.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Namespace\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Namespace\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a Binding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @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\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n createNamespacedBinding(namespace, body, dryRun, includeUninitialized, pretty, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/bindings'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedBinding.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Binding\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Binding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a ConfigMap\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedConfigMap(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedConfigMap.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedConfigMap.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ConfigMap\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ConfigMap\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create Endpoints\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedEndpoints(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEndpoints.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedEndpoints.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Endpoints\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Endpoints\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create an Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedEvent(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEvent.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedEvent.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Event\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Event\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a LimitRange\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedLimitRange(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLimitRange.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedLimitRange.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1LimitRange\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1LimitRange\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedPersistentVolumeClaim(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPersistentVolumeClaim.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedPersistentVolumeClaim.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1PersistentVolumeClaim\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaim\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedPod(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPod.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedPod.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Pod\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Pod\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create binding of a Pod\n * @param name name of the Binding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @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\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n createNamespacedPodBinding(name, namespace, body, dryRun, includeUninitialized, pretty, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/binding'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling createNamespacedPodBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedPodBinding.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Binding\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Binding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create eviction of a Pod\n * @param name name of the Eviction\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @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\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n createNamespacedPodEviction(name, namespace, body, dryRun, includeUninitialized, pretty, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/eviction'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling createNamespacedPodEviction.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodEviction.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedPodEviction.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1Eviction\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Eviction\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a PodTemplate\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedPodTemplate(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodTemplate.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedPodTemplate.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1PodTemplate\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PodTemplate\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedReplicationController(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedReplicationController.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedReplicationController.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ReplicationController\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ReplicationController\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedResourceQuota(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedResourceQuota.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedResourceQuota.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ResourceQuota\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ResourceQuota\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a Secret\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedSecret(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedSecret.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedSecret.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Secret\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Secret\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a Service\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedService(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedService.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedService.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Service\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Service\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a ServiceAccount\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedServiceAccount(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedServiceAccount.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedServiceAccount.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ServiceAccount\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ServiceAccount\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a Node\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNode(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNode.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Node\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Node\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a PersistentVolume\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createPersistentVolume(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createPersistentVolume.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1PersistentVolume\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PersistentVolume\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of ConfigMap\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedConfigMap(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedConfigMap.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of Endpoints\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedEndpoints(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEndpoints.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedEvent(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEvent.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of LimitRange\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedLimitRange(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedLimitRange.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedPersistentVolumeClaim(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPersistentVolumeClaim.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedPod(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPod.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of PodTemplate\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedPodTemplate(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodTemplate.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedReplicationController(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedReplicationController.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedResourceQuota(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedResourceQuota.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of Secret\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedSecret(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedSecret.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of ServiceAccount\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedServiceAccount(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedServiceAccount.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of Node\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNode(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of PersistentVolume\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionPersistentVolume(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a Namespace\n * @param name name of the Namespace\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespace(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespace.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a ConfigMap\n * @param name name of the ConfigMap\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedConfigMap(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedConfigMap.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedConfigMap.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete Endpoints\n * @param name name of the Endpoints\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedEndpoints(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEndpoints.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEndpoints.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete an Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedEvent(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a LimitRange\n * @param name name of the LimitRange\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedLimitRange(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedLimitRange.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedLimitRange.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a PersistentVolumeClaim\n * @param name name of the PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedPersistentVolumeClaim(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPersistentVolumeClaim.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPersistentVolumeClaim.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedPod(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPod.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPod.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a PodTemplate\n * @param name name of the PodTemplate\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedPodTemplate(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodTemplate.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodTemplate.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a ReplicationController\n * @param name name of the ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedReplicationController(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedReplicationController.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedReplicationController.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a ResourceQuota\n * @param name name of the ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedResourceQuota(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedResourceQuota.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedResourceQuota.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a Secret\n * @param name name of the Secret\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedSecret(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedSecret.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedSecret.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a Service\n * @param name name of the Service\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedService(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedService.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a ServiceAccount\n * @param name name of the ServiceAccount\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedServiceAccount(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedServiceAccount.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedServiceAccount.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a Node\n * @param name name of the Node\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNode(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNode.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a PersistentVolume\n * @param name name of the PersistentVolume\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deletePersistentVolume(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deletePersistentVolume.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/api/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list objects of kind ComponentStatus\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listComponentStatus(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/componentstatuses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ComponentStatusList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ConfigMap\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listConfigMapForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/configmaps';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ConfigMapList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Endpoints\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listEndpointsForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/endpoints';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1EndpointsList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Event\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listEventForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/events';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1EventList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind LimitRange\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listLimitRangeForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/limitranges';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1LimitRangeList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Namespace\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespace(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1NamespaceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ConfigMap\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedConfigMap(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedConfigMap.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ConfigMapList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Endpoints\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedEndpoints(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEndpoints.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1EndpointsList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedEvent(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEvent.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1EventList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind LimitRange\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedLimitRange(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedLimitRange.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1LimitRangeList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedPersistentVolumeClaim(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPersistentVolumeClaim.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaimList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedPod(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPod.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PodList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind PodTemplate\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedPodTemplate(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPodTemplate.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PodTemplateList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedReplicationController(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedReplicationController.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ReplicationControllerList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedResourceQuota(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedResourceQuota.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ResourceQuotaList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Secret\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedSecret(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedSecret.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1SecretList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Service\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedService(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedService.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ServiceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ServiceAccount\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedServiceAccount(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedServiceAccount.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ServiceAccountList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Node\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNode(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1NodeList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind PersistentVolume\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listPersistentVolume(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PersistentVolumeList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind PersistentVolumeClaim\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listPersistentVolumeClaimForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumeclaims';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaimList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Pod\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listPodForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/pods';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PodList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind PodTemplate\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listPodTemplateForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/podtemplates';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PodTemplateList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ReplicationController\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listReplicationControllerForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/replicationcontrollers';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ReplicationControllerList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ResourceQuota\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listResourceQuotaForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/resourcequotas';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ResourceQuotaList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Secret\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listSecretForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/secrets';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1SecretList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ServiceAccount\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listServiceAccountForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/serviceaccounts';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ServiceAccountList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Service\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listServiceForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/api/v1/services';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ServiceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified Namespace\n * @param name name of the Namespace\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespace(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespace.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespace.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Namespace\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified Namespace\n * @param name name of the Namespace\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespaceStatus(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespaceStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespaceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Namespace\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified ConfigMap\n * @param name name of the ConfigMap\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedConfigMap(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedConfigMap.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedConfigMap.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedConfigMap.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ConfigMap\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified Endpoints\n * @param name name of the Endpoints\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedEndpoints(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedEndpoints.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEndpoints.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedEndpoints.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Endpoints\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedEvent(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEvent.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Event\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified LimitRange\n * @param name name of the LimitRange\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedLimitRange(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedLimitRange.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedLimitRange.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedLimitRange.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1LimitRange\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified PersistentVolumeClaim\n * @param name name of the PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedPersistentVolumeClaim.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPersistentVolumeClaim.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedPersistentVolumeClaim.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaim\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified PersistentVolumeClaim\n * @param name name of the PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaim\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedPod(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedPod.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPod.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedPod.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Pod\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedPodStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Pod\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified PodTemplate\n * @param name name of the PodTemplate\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedPodTemplate(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodTemplate.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodTemplate.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodTemplate.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PodTemplate\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified ReplicationController\n * @param name name of the ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedReplicationController(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationController.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationController.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationController.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ReplicationController\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update scale of the specified ReplicationController\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationControllerScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationControllerScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationControllerScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified ReplicationController\n * @param name name of the ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationControllerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationControllerStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationControllerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ReplicationController\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified ResourceQuota\n * @param name name of the ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedResourceQuota(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedResourceQuota.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedResourceQuota.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedResourceQuota.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ResourceQuota\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified ResourceQuota\n * @param name name of the ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedResourceQuotaStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedResourceQuotaStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedResourceQuotaStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ResourceQuota\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified Secret\n * @param name name of the Secret\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedSecret(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedSecret.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedSecret.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedSecret.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Secret\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified Service\n * @param name name of the Service\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedService(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedService.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedService.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Service\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified ServiceAccount\n * @param name name of the ServiceAccount\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedServiceAccount(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedServiceAccount.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedServiceAccount.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedServiceAccount.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ServiceAccount\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified Service\n * @param name name of the Service\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedServiceStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedServiceStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedServiceStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedServiceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Service\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified Node\n * @param name name of the Node\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNode(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNode.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNode.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Node\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified Node\n * @param name name of the Node\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNodeStatus(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNodeStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNodeStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Node\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified PersistentVolume\n * @param name name of the PersistentVolume\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchPersistentVolume(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchPersistentVolume.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchPersistentVolume.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PersistentVolume\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified PersistentVolume\n * @param name name of the PersistentVolume\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchPersistentVolumeStatus(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchPersistentVolumeStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchPersistentVolumeStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PersistentVolume\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified ComponentStatus\n * @param name name of the ComponentStatus\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readComponentStatus(name, pretty, options = {}) {\n const localVarPath = this.basePath + '/api/v1/componentstatuses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readComponentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ComponentStatus\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified Namespace\n * @param name name of the Namespace\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespace(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespace.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Namespace\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified Namespace\n * @param name name of the Namespace\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespaceStatus(name, pretty, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespaceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Namespace\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified ConfigMap\n * @param name name of the ConfigMap\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedConfigMap(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedConfigMap.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedConfigMap.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ConfigMap\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified Endpoints\n * @param name name of the Endpoints\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedEndpoints(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedEndpoints.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEndpoints.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Endpoints\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedEvent(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Event\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified LimitRange\n * @param name name of the LimitRange\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedLimitRange(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedLimitRange.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedLimitRange.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1LimitRange\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified PersistentVolumeClaim\n * @param name name of the PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedPersistentVolumeClaim(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPersistentVolumeClaim.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPersistentVolumeClaim.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaim\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified PersistentVolumeClaim\n * @param name name of the PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedPersistentVolumeClaimStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPersistentVolumeClaimStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPersistentVolumeClaimStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaim\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedPod(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPod.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPod.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Pod\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read log of the specified Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param container The container for which to stream logs. Defaults to only container if there is one container in the pod.\n * @param follow Follow the log stream of the pod. Defaults to false.\n * @param limitBytes If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.\n * @param pretty If 'true', then the output is pretty printed.\n * @param previous Return previous terminated container logs. Defaults to false.\n * @param sinceSeconds A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.\n * @param tailLines If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime\n * @param timestamps If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.\n * @param {*} [options] Override http request options.\n */\n readNamespacedPodLog(name, namespace, container, follow, limitBytes, pretty, previous, sinceSeconds, tailLines, timestamps, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/log'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPodLog.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodLog.');\n }\n if (container !== undefined) {\n localVarQueryParameters['container'] = ObjectSerializer.serialize(container, \"string\");\n }\n if (follow !== undefined) {\n localVarQueryParameters['follow'] = ObjectSerializer.serialize(follow, \"boolean\");\n }\n if (limitBytes !== undefined) {\n localVarQueryParameters['limitBytes'] = ObjectSerializer.serialize(limitBytes, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (previous !== undefined) {\n localVarQueryParameters['previous'] = ObjectSerializer.serialize(previous, \"boolean\");\n }\n if (sinceSeconds !== undefined) {\n localVarQueryParameters['sinceSeconds'] = ObjectSerializer.serialize(sinceSeconds, \"number\");\n }\n if (tailLines !== undefined) {\n localVarQueryParameters['tailLines'] = ObjectSerializer.serialize(tailLines, \"number\");\n }\n if (timestamps !== undefined) {\n localVarQueryParameters['timestamps'] = ObjectSerializer.serialize(timestamps, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"string\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedPodStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPodStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Pod\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified PodTemplate\n * @param name name of the PodTemplate\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedPodTemplate(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPodTemplate.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodTemplate.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PodTemplate\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified ReplicationController\n * @param name name of the ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedReplicationController(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationController.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationController.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ReplicationController\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read scale of the specified ReplicationController\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedReplicationControllerScale(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationControllerScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationControllerScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified ReplicationController\n * @param name name of the ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedReplicationControllerStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationControllerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationControllerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ReplicationController\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified ResourceQuota\n * @param name name of the ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedResourceQuota(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedResourceQuota.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedResourceQuota.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ResourceQuota\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified ResourceQuota\n * @param name name of the ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedResourceQuotaStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedResourceQuotaStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedResourceQuotaStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ResourceQuota\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified Secret\n * @param name name of the Secret\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedSecret(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedSecret.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedSecret.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Secret\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified Service\n * @param name name of the Service\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedService(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedService.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Service\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified ServiceAccount\n * @param name name of the ServiceAccount\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedServiceAccount(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedServiceAccount.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedServiceAccount.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ServiceAccount\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified Service\n * @param name name of the Service\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedServiceStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedServiceStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedServiceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Service\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified Node\n * @param name name of the Node\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNode(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNode.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Node\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified Node\n * @param name name of the Node\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNodeStatus(name, pretty, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNodeStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Node\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified PersistentVolume\n * @param name name of the PersistentVolume\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readPersistentVolume(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readPersistentVolume.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PersistentVolume\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified PersistentVolume\n * @param name name of the PersistentVolume\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readPersistentVolumeStatus(name, pretty, options = {}) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readPersistentVolumeStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PersistentVolume\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified Namespace\n * @param name name of the Namespace\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespace(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespace.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespace.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Namespace\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Namespace\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace finalize of the specified Namespace\n * @param name name of the Namespace\n * @param body\n * @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\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n replaceNamespaceFinalize(name, body, dryRun, pretty, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{name}/finalize'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespaceFinalize.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespaceFinalize.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Namespace\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Namespace\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified Namespace\n * @param name name of the Namespace\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespaceStatus(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespaceStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespaceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Namespace\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Namespace\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified ConfigMap\n * @param name name of the ConfigMap\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedConfigMap(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedConfigMap.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedConfigMap.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedConfigMap.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ConfigMap\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ConfigMap\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified Endpoints\n * @param name name of the Endpoints\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedEndpoints(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEndpoints.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEndpoints.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEndpoints.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Endpoints\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Endpoints\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedEvent(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEvent.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Event\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Event\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified LimitRange\n * @param name name of the LimitRange\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedLimitRange(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedLimitRange.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedLimitRange.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedLimitRange.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1LimitRange\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1LimitRange\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified PersistentVolumeClaim\n * @param name name of the PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPersistentVolumeClaim.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPersistentVolumeClaim.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPersistentVolumeClaim.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1PersistentVolumeClaim\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaim\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified PersistentVolumeClaim\n * @param name name of the PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1PersistentVolumeClaim\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaim\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedPod(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPod.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPod.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPod.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Pod\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Pod\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedPodStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Pod\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Pod\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified PodTemplate\n * @param name name of the PodTemplate\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedPodTemplate(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodTemplate.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodTemplate.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodTemplate.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1PodTemplate\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PodTemplate\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified ReplicationController\n * @param name name of the ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedReplicationController(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationController.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationController.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationController.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ReplicationController\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ReplicationController\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace scale of the specified ReplicationController\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationControllerScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationControllerScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationControllerScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Scale\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified ReplicationController\n * @param name name of the ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationControllerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationControllerStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationControllerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ReplicationController\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ReplicationController\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified ResourceQuota\n * @param name name of the ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedResourceQuota(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedResourceQuota.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedResourceQuota.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedResourceQuota.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ResourceQuota\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ResourceQuota\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified ResourceQuota\n * @param name name of the ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedResourceQuotaStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedResourceQuotaStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedResourceQuotaStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ResourceQuota\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ResourceQuota\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified Secret\n * @param name name of the Secret\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedSecret(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedSecret.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedSecret.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedSecret.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Secret\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Secret\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified Service\n * @param name name of the Service\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedService(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedService.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedService.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Service\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Service\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified ServiceAccount\n * @param name name of the ServiceAccount\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedServiceAccount(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedServiceAccount.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedServiceAccount.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedServiceAccount.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ServiceAccount\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ServiceAccount\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified Service\n * @param name name of the Service\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedServiceStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedServiceStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedServiceStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedServiceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Service\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Service\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified Node\n * @param name name of the Node\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNode(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNode.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNode.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Node\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Node\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified Node\n * @param name name of the Node\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNodeStatus(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNodeStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNodeStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Node\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Node\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified PersistentVolume\n * @param name name of the PersistentVolume\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replacePersistentVolume(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replacePersistentVolume.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replacePersistentVolume.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1PersistentVolume\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PersistentVolume\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified PersistentVolume\n * @param name name of the PersistentVolume\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replacePersistentVolumeStatus(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replacePersistentVolumeStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replacePersistentVolumeStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1PersistentVolume\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1PersistentVolume\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.CoreV1Api = CoreV1Api;\nvar CustomObjectsApiApiKeys;\n(function (CustomObjectsApiApiKeys) {\n CustomObjectsApiApiKeys[CustomObjectsApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(CustomObjectsApiApiKeys = exports.CustomObjectsApiApiKeys || (exports.CustomObjectsApiApiKeys = {}));\nclass CustomObjectsApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[CustomObjectsApiApiKeys[key]].apiKey = value;\n }\n /**\n * Creates a cluster scoped Custom object\n * @param group The custom resource's group name\n * @param version The custom resource's version\n * @param plural The custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param body The JSON schema of the Resource to create.\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n createClusterCustomObject(group, version, plural, body, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling createClusterCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling createClusterCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling createClusterCustomObject.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createClusterCustomObject.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * Creates a namespace scoped Custom object\n * @param group The custom resource's group name\n * @param version The custom resource's version\n * @param namespace The custom resource's namespace\n * @param plural The custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param body The JSON schema of the Resource to create.\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n createNamespacedCustomObject(group, version, namespace, plural, body, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling createNamespacedCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling createNamespacedCustomObject.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling createNamespacedCustomObject.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedCustomObject.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * Deletes the specified cluster scoped custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param plural the custom object's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param body\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.\n * @param {*} [options] Override http request options.\n */\n deleteClusterCustomObject(group, version, plural, name, body, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling deleteClusterCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling deleteClusterCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling deleteClusterCustomObject.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteClusterCustomObject.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling deleteClusterCustomObject.');\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * Deletes the specified namespace scoped custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param namespace The custom resource's namespace\n * @param plural the custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param body\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedCustomObject(group, version, namespace, plural, name, body, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling deleteNamespacedCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling deleteNamespacedCustomObject.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling deleteNamespacedCustomObject.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCustomObject.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling deleteNamespacedCustomObject.');\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * Returns a cluster scoped custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param plural the custom object's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param {*} [options] Override http request options.\n */\n getClusterCustomObject(group, version, plural, name, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling getClusterCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling getClusterCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling getClusterCustomObject.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling getClusterCustomObject.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read scale of the specified custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param plural the custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param {*} [options] Override http request options.\n */\n getClusterCustomObjectScale(group, version, plural, name, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/scale'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling getClusterCustomObjectScale.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling getClusterCustomObjectScale.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling getClusterCustomObjectScale.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling getClusterCustomObjectScale.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified cluster scoped custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param plural the custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param {*} [options] Override http request options.\n */\n getClusterCustomObjectStatus(group, version, plural, name, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/status'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling getClusterCustomObjectStatus.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling getClusterCustomObjectStatus.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling getClusterCustomObjectStatus.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling getClusterCustomObjectStatus.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * Returns a namespace scoped custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param namespace The custom resource's namespace\n * @param plural the custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param {*} [options] Override http request options.\n */\n getNamespacedCustomObject(group, version, namespace, plural, name, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling getNamespacedCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling getNamespacedCustomObject.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling getNamespacedCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling getNamespacedCustomObject.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling getNamespacedCustomObject.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read scale of the specified namespace scoped custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param namespace The custom resource's namespace\n * @param plural the custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param {*} [options] Override http request options.\n */\n getNamespacedCustomObjectScale(group, version, namespace, plural, name, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling getNamespacedCustomObjectScale.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling getNamespacedCustomObjectScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling getNamespacedCustomObjectScale.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling getNamespacedCustomObjectScale.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling getNamespacedCustomObjectScale.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified namespace scoped custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param namespace The custom resource's namespace\n * @param plural the custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param {*} [options] Override http request options.\n */\n getNamespacedCustomObjectStatus(group, version, namespace, plural, name, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling getNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling getNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling getNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling getNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling getNamespacedCustomObjectStatus.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch cluster scoped custom objects\n * @param group The custom resource's group name\n * @param version The custom resource's version\n * @param plural The custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param pretty If 'true', then the output is pretty printed.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.\n * @param {*} [options] Override http request options.\n */\n listClusterCustomObject(group, version, plural, pretty, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling listClusterCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling listClusterCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling listClusterCustomObject.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch namespace scoped custom objects\n * @param group The custom resource's group name\n * @param version The custom resource's version\n * @param namespace The custom resource's namespace\n * @param plural The custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param pretty If 'true', then the output is pretty printed.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.\n * @param {*} [options] Override http request options.\n */\n listNamespacedCustomObject(group, version, namespace, plural, pretty, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling listNamespacedCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling listNamespacedCustomObject.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling listNamespacedCustomObject.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * patch the specified cluster scoped custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param plural the custom object's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param body The JSON schema of the Resource to patch.\n * @param {*} [options] Override http request options.\n */\n patchClusterCustomObject(group, version, plural, name, body, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling patchClusterCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling patchClusterCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling patchClusterCustomObject.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchClusterCustomObject.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchClusterCustomObject.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update scale of the specified cluster scoped custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param plural the custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param body\n * @param {*} [options] Override http request options.\n */\n patchClusterCustomObjectScale(group, version, plural, name, body, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/scale'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling patchClusterCustomObjectScale.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling patchClusterCustomObjectScale.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling patchClusterCustomObjectScale.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchClusterCustomObjectScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchClusterCustomObjectScale.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified cluster scoped custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param plural the custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param body\n * @param {*} [options] Override http request options.\n */\n patchClusterCustomObjectStatus(group, version, plural, name, body, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/status'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling patchClusterCustomObjectStatus.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling patchClusterCustomObjectStatus.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling patchClusterCustomObjectStatus.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchClusterCustomObjectStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchClusterCustomObjectStatus.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * patch the specified namespace scoped custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param namespace The custom resource's namespace\n * @param plural the custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param body The JSON schema of the Resource to patch.\n * @param {*} [options] Override http request options.\n */\n patchNamespacedCustomObject(group, version, namespace, plural, name, body, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling patchNamespacedCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling patchNamespacedCustomObject.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling patchNamespacedCustomObject.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedCustomObject.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedCustomObject.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update scale of the specified namespace scoped custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param namespace The custom resource's namespace\n * @param plural the custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param body\n * @param {*} [options] Override http request options.\n */\n patchNamespacedCustomObjectScale(group, version, namespace, plural, name, body, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling patchNamespacedCustomObjectScale.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling patchNamespacedCustomObjectScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCustomObjectScale.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling patchNamespacedCustomObjectScale.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedCustomObjectScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedCustomObjectScale.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified namespace scoped custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param namespace The custom resource's namespace\n * @param plural the custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param body\n * @param {*} [options] Override http request options.\n */\n patchNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling patchNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling patchNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling patchNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedCustomObjectStatus.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified cluster scoped custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param plural the custom object's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param body The JSON schema of the Resource to replace.\n * @param {*} [options] Override http request options.\n */\n replaceClusterCustomObject(group, version, plural, name, body, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling replaceClusterCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling replaceClusterCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling replaceClusterCustomObject.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceClusterCustomObject.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceClusterCustomObject.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace scale of the specified cluster scoped custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param plural the custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param body\n * @param {*} [options] Override http request options.\n */\n replaceClusterCustomObjectScale(group, version, plural, name, body, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/scale'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling replaceClusterCustomObjectScale.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling replaceClusterCustomObjectScale.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling replaceClusterCustomObjectScale.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceClusterCustomObjectScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceClusterCustomObjectScale.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the cluster scoped specified custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param plural the custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param body\n * @param {*} [options] Override http request options.\n */\n replaceClusterCustomObjectStatus(group, version, plural, name, body, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/status'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling replaceClusterCustomObjectStatus.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling replaceClusterCustomObjectStatus.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling replaceClusterCustomObjectStatus.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceClusterCustomObjectStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceClusterCustomObjectStatus.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified namespace scoped custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param namespace The custom resource's namespace\n * @param plural the custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param body The JSON schema of the Resource to replace.\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedCustomObject(group, version, namespace, plural, name, body, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling replaceNamespacedCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling replaceNamespacedCustomObject.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling replaceNamespacedCustomObject.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCustomObject.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCustomObject.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace scale of the specified namespace scoped custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param namespace The custom resource's namespace\n * @param plural the custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param body\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedCustomObjectScale(group, version, namespace, plural, name, body, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling replaceNamespacedCustomObjectScale.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling replaceNamespacedCustomObjectScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCustomObjectScale.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling replaceNamespacedCustomObjectScale.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCustomObjectScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCustomObjectScale.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified namespace scoped custom object\n * @param group the custom resource's group\n * @param version the custom resource's version\n * @param namespace The custom resource's namespace\n * @param plural the custom resource's plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object's name\n * @param body\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, options = {}) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling replaceNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling replaceNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling replaceNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCustomObjectStatus.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"any\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.CustomObjectsApi = CustomObjectsApi;\nvar EventsApiApiKeys;\n(function (EventsApiApiKeys) {\n EventsApiApiKeys[EventsApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(EventsApiApiKeys = exports.EventsApiApiKeys || (exports.EventsApiApiKeys = {}));\nclass EventsApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[EventsApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.EventsApi = EventsApi;\nvar EventsV1beta1ApiApiKeys;\n(function (EventsV1beta1ApiApiKeys) {\n EventsV1beta1ApiApiKeys[EventsV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(EventsV1beta1ApiApiKeys = exports.EventsV1beta1ApiApiKeys || (exports.EventsV1beta1ApiApiKeys = {}));\nclass EventsV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[EventsV1beta1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create an Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedEvent(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEvent.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedEvent.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1Event\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Event\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedEvent(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEvent.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete an Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedEvent(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Event\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listEventForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/events';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1EventList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedEvent(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEvent.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1EventList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedEvent(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEvent.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Event\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedEvent(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Event\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedEvent(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEvent.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1Event\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Event\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.EventsV1beta1Api = EventsV1beta1Api;\nvar ExtensionsApiApiKeys;\n(function (ExtensionsApiApiKeys) {\n ExtensionsApiApiKeys[ExtensionsApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(ExtensionsApiApiKeys = exports.ExtensionsApiApiKeys || (exports.ExtensionsApiApiKeys = {}));\nclass ExtensionsApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[ExtensionsApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.ExtensionsApi = ExtensionsApi;\nvar ExtensionsV1beta1ApiApiKeys;\n(function (ExtensionsV1beta1ApiApiKeys) {\n ExtensionsV1beta1ApiApiKeys[ExtensionsV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(ExtensionsV1beta1ApiApiKeys = exports.ExtensionsV1beta1ApiApiKeys || (exports.ExtensionsV1beta1ApiApiKeys = {}));\nclass ExtensionsV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[ExtensionsV1beta1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedDaemonSet(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDaemonSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedDaemonSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1DaemonSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedDeployment(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDeployment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedDeployment.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"ExtensionsV1beta1Deployment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create rollback of a Deployment\n * @param name name of the DeploymentRollback\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @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\n * @param includeUninitialized If IncludeUninitialized is specified, the object may be returned without completing initialization.\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n createNamespacedDeploymentRollback(name, namespace, body, dryRun, includeUninitialized, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/rollback'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling createNamespacedDeploymentRollback.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDeploymentRollback.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedDeploymentRollback.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"ExtensionsV1beta1DeploymentRollback\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create an Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedIngress(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedIngress.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedIngress.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1Ingress\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Ingress\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedNetworkPolicy(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedNetworkPolicy.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedNetworkPolicy.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1NetworkPolicy\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1NetworkPolicy\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedReplicaSet(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedReplicaSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedReplicaSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1ReplicaSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a PodSecurityPolicy\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createPodSecurityPolicy(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/podsecuritypolicies';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createPodSecurityPolicy.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"ExtensionsV1beta1PodSecurityPolicy\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1PodSecurityPolicy\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedDaemonSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDaemonSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedDeployment(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDeployment.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedIngress(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedIngress.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedNetworkPolicy(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedNetworkPolicy.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedReplicaSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedReplicaSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of PodSecurityPolicy\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionPodSecurityPolicy(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/podsecuritypolicies';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedDaemonSet(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedDaemonSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedDeployment(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete an Ingress\n * @param name name of the Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedIngress(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedIngress.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedIngress.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a NetworkPolicy\n * @param name name of the NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedNetworkPolicy(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedNetworkPolicy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedNetworkPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedReplicaSet(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedReplicaSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a PodSecurityPolicy\n * @param name name of the PodSecurityPolicy\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deletePodSecurityPolicy(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/podsecuritypolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deletePodSecurityPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind DaemonSet\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listDaemonSetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/daemonsets';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1DaemonSetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Deployment\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listDeploymentForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/deployments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1DeploymentList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Ingress\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listIngressForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/ingresses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1IngressList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedDaemonSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedDaemonSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1DaemonSetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedDeployment(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedDeployment.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1DeploymentList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedIngress(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedIngress.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1IngressList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedNetworkPolicy(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedNetworkPolicy.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1NetworkPolicyList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedReplicaSet(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedReplicaSet.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ReplicaSetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind NetworkPolicy\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNetworkPolicyForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/networkpolicies';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1NetworkPolicyList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind PodSecurityPolicy\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listPodSecurityPolicy(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/podsecuritypolicies';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1PodSecurityPolicyList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ReplicaSet\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listReplicaSetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/replicasets';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ReplicaSetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedDaemonSet(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDaemonSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDaemonSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDaemonSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedDeployment(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeployment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update scale of the specified Deployment\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeploymentScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeploymentScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeploymentScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeploymentStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeploymentStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeploymentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified Ingress\n * @param name name of the Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedIngress(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedIngress.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedIngress.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedIngress.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Ingress\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified Ingress\n * @param name name of the Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedIngressStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedIngressStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedIngressStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedIngressStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Ingress\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified NetworkPolicy\n * @param name name of the NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedNetworkPolicy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedNetworkPolicy.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedNetworkPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1NetworkPolicy\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedReplicaSet(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update scale of the specified ReplicaSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSetScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update scale of the specified ReplicationControllerDummy\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedReplicationControllerDummyScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicationcontrollers/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationControllerDummyScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationControllerDummyScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationControllerDummyScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified PodSecurityPolicy\n * @param name name of the PodSecurityPolicy\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchPodSecurityPolicy(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/podsecuritypolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchPodSecurityPolicy.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchPodSecurityPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1PodSecurityPolicy\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedDaemonSet(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDaemonSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedDaemonSetStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDaemonSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedDeployment(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read scale of the specified Deployment\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedDeploymentScale(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDeploymentScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeploymentScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedDeploymentStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDeploymentStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeploymentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified Ingress\n * @param name name of the Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedIngress(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedIngress.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedIngress.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Ingress\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified Ingress\n * @param name name of the Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedIngressStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedIngressStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedIngressStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Ingress\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified NetworkPolicy\n * @param name name of the NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedNetworkPolicy(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedNetworkPolicy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedNetworkPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1NetworkPolicy\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedReplicaSet(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read scale of the specified ReplicaSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedReplicaSetScale(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedReplicaSetStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read scale of the specified ReplicationControllerDummy\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedReplicationControllerDummyScale(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicationcontrollers/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationControllerDummyScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationControllerDummyScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified PodSecurityPolicy\n * @param name name of the PodSecurityPolicy\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readPodSecurityPolicy(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/podsecuritypolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readPodSecurityPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1PodSecurityPolicy\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedDaemonSet(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDaemonSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDaemonSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1DaemonSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDaemonSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1DaemonSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1DaemonSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedDeployment(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeployment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"ExtensionsV1beta1Deployment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace scale of the specified Deployment\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeploymentScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeploymentScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"ExtensionsV1beta1Scale\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeploymentStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeploymentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"ExtensionsV1beta1Deployment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1Deployment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified Ingress\n * @param name name of the Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedIngress(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedIngress.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedIngress.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedIngress.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1Ingress\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Ingress\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified Ingress\n * @param name name of the Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedIngressStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedIngressStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedIngressStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedIngressStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1Ingress\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Ingress\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified NetworkPolicy\n * @param name name of the NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedNetworkPolicy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedNetworkPolicy.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedNetworkPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1NetworkPolicy\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1NetworkPolicy\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedReplicaSet(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1ReplicaSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace scale of the specified ReplicaSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSetScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"ExtensionsV1beta1Scale\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1ReplicaSet\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ReplicaSet\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace scale of the specified ReplicationControllerDummy\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedReplicationControllerDummyScale(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/namespaces/{namespace}/replicationcontrollers/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationControllerDummyScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationControllerDummyScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationControllerDummyScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"ExtensionsV1beta1Scale\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1Scale\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified PodSecurityPolicy\n * @param name name of the PodSecurityPolicy\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replacePodSecurityPolicy(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/extensions/v1beta1/podsecuritypolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replacePodSecurityPolicy.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replacePodSecurityPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"ExtensionsV1beta1PodSecurityPolicy\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"ExtensionsV1beta1PodSecurityPolicy\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.ExtensionsV1beta1Api = ExtensionsV1beta1Api;\nvar LogsApiApiKeys;\n(function (LogsApiApiKeys) {\n LogsApiApiKeys[LogsApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(LogsApiApiKeys = exports.LogsApiApiKeys || (exports.LogsApiApiKeys = {}));\nclass LogsApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[LogsApiApiKeys[key]].apiKey = value;\n }\n /**\n *\n * @param logpath path to the log\n * @param {*} [options] Override http request options.\n */\n logFileHandler(logpath, options = {}) {\n const localVarPath = this.basePath + '/logs/{logpath}'\n .replace('{' + 'logpath' + '}', encodeURIComponent(String(logpath)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'logpath' is not null or undefined\n if (logpath === null || logpath === undefined) {\n throw new Error('Required parameter logpath was null or undefined when calling logFileHandler.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n *\n * @param {*} [options] Override http request options.\n */\n logFileListHandler(options = {}) {\n const localVarPath = this.basePath + '/logs/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.LogsApi = LogsApi;\nvar NetworkingApiApiKeys;\n(function (NetworkingApiApiKeys) {\n NetworkingApiApiKeys[NetworkingApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(NetworkingApiApiKeys = exports.NetworkingApiApiKeys || (exports.NetworkingApiApiKeys = {}));\nclass NetworkingApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[NetworkingApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.NetworkingApi = NetworkingApi;\nvar NetworkingV1ApiApiKeys;\n(function (NetworkingV1ApiApiKeys) {\n NetworkingV1ApiApiKeys[NetworkingV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(NetworkingV1ApiApiKeys = exports.NetworkingV1ApiApiKeys || (exports.NetworkingV1ApiApiKeys = {}));\nclass NetworkingV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[NetworkingV1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedNetworkPolicy(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedNetworkPolicy.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedNetworkPolicy.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1NetworkPolicy\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1NetworkPolicy\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedNetworkPolicy(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedNetworkPolicy.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a NetworkPolicy\n * @param name name of the NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedNetworkPolicy(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedNetworkPolicy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedNetworkPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedNetworkPolicy(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedNetworkPolicy.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1NetworkPolicyList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind NetworkPolicy\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNetworkPolicyForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/networkpolicies';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1NetworkPolicyList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified NetworkPolicy\n * @param name name of the NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedNetworkPolicy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedNetworkPolicy.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedNetworkPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1NetworkPolicy\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified NetworkPolicy\n * @param name name of the NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedNetworkPolicy(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedNetworkPolicy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedNetworkPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1NetworkPolicy\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified NetworkPolicy\n * @param name name of the NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedNetworkPolicy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedNetworkPolicy.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedNetworkPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1NetworkPolicy\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1NetworkPolicy\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.NetworkingV1Api = NetworkingV1Api;\nvar PolicyApiApiKeys;\n(function (PolicyApiApiKeys) {\n PolicyApiApiKeys[PolicyApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(PolicyApiApiKeys = exports.PolicyApiApiKeys || (exports.PolicyApiApiKeys = {}));\nclass PolicyApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[PolicyApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/policy/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.PolicyApi = PolicyApi;\nvar PolicyV1beta1ApiApiKeys;\n(function (PolicyV1beta1ApiApiKeys) {\n PolicyV1beta1ApiApiKeys[PolicyV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(PolicyV1beta1ApiApiKeys = exports.PolicyV1beta1ApiApiKeys || (exports.PolicyV1beta1ApiApiKeys = {}));\nclass PolicyV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[PolicyV1beta1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedPodDisruptionBudget(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedPodDisruptionBudget.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1PodDisruptionBudget\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1PodDisruptionBudget\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a PodSecurityPolicy\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createPodSecurityPolicy(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createPodSecurityPolicy.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"PolicyV1beta1PodSecurityPolicy\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"PolicyV1beta1PodSecurityPolicy\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedPodDisruptionBudget(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodDisruptionBudget.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of PodSecurityPolicy\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionPodSecurityPolicy(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedPodDisruptionBudget(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodDisruptionBudget.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a PodSecurityPolicy\n * @param name name of the PodSecurityPolicy\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deletePodSecurityPolicy(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deletePodSecurityPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedPodDisruptionBudget(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPodDisruptionBudget.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1PodDisruptionBudgetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind PodDisruptionBudget\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listPodDisruptionBudgetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/poddisruptionbudgets';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1PodDisruptionBudgetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind PodSecurityPolicy\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listPodSecurityPolicy(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"PolicyV1beta1PodSecurityPolicyList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudget.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1PodDisruptionBudget\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1PodDisruptionBudget\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified PodSecurityPolicy\n * @param name name of the PodSecurityPolicy\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchPodSecurityPolicy(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchPodSecurityPolicy.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchPodSecurityPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"PolicyV1beta1PodSecurityPolicy\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedPodDisruptionBudget(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudget.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1PodDisruptionBudget\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedPodDisruptionBudgetStatus(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1PodDisruptionBudget\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified PodSecurityPolicy\n * @param name name of the PodSecurityPolicy\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readPodSecurityPolicy(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readPodSecurityPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"PolicyV1beta1PodSecurityPolicy\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudget.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1PodDisruptionBudget\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1PodDisruptionBudget\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1PodDisruptionBudget\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1PodDisruptionBudget\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified PodSecurityPolicy\n * @param name name of the PodSecurityPolicy\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replacePodSecurityPolicy(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replacePodSecurityPolicy.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replacePodSecurityPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"PolicyV1beta1PodSecurityPolicy\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"PolicyV1beta1PodSecurityPolicy\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.PolicyV1beta1Api = PolicyV1beta1Api;\nvar RbacAuthorizationApiApiKeys;\n(function (RbacAuthorizationApiApiKeys) {\n RbacAuthorizationApiApiKeys[RbacAuthorizationApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(RbacAuthorizationApiApiKeys = exports.RbacAuthorizationApiApiKeys || (exports.RbacAuthorizationApiApiKeys = {}));\nclass RbacAuthorizationApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[RbacAuthorizationApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.RbacAuthorizationApi = RbacAuthorizationApi;\nvar RbacAuthorizationV1ApiApiKeys;\n(function (RbacAuthorizationV1ApiApiKeys) {\n RbacAuthorizationV1ApiApiKeys[RbacAuthorizationV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(RbacAuthorizationV1ApiApiKeys = exports.RbacAuthorizationV1ApiApiKeys || (exports.RbacAuthorizationV1ApiApiKeys = {}));\nclass RbacAuthorizationV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[RbacAuthorizationV1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a ClusterRole\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createClusterRole(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createClusterRole.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ClusterRole\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ClusterRole\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a ClusterRoleBinding\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createClusterRoleBinding(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createClusterRoleBinding.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ClusterRoleBinding\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ClusterRoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedRole(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedRole.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Role\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Role\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedRoleBinding(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedRoleBinding.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1RoleBinding\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1RoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a ClusterRole\n * @param name name of the ClusterRole\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteClusterRole(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteClusterRoleBinding(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of ClusterRole\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionClusterRole(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of ClusterRoleBinding\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionClusterRoleBinding(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedRole(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRole.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedRoleBinding(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRoleBinding.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedRole(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedRoleBinding(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ClusterRole\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listClusterRole(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ClusterRoleList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ClusterRoleBinding\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listClusterRoleBinding(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ClusterRoleBindingList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedRole(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRole.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1RoleList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedRoleBinding(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRoleBinding.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1RoleBindingList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind RoleBinding\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listRoleBindingForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/rolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1RoleBindingList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Role\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listRoleForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/roles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1RoleList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified ClusterRole\n * @param name name of the ClusterRole\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchClusterRole(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchClusterRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ClusterRole\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchClusterRoleBinding(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchClusterRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ClusterRoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedRole(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Role\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1RoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified ClusterRole\n * @param name name of the ClusterRole\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readClusterRole(name, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ClusterRole\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readClusterRoleBinding(name, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ClusterRoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedRole(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Role\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedRoleBinding(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1RoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified ClusterRole\n * @param name name of the ClusterRole\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceClusterRole(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceClusterRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ClusterRole\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ClusterRole\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceClusterRoleBinding(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceClusterRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1ClusterRoleBinding\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1ClusterRoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedRole(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1Role\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Role\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1RoleBinding\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1RoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.RbacAuthorizationV1Api = RbacAuthorizationV1Api;\nvar RbacAuthorizationV1alpha1ApiApiKeys;\n(function (RbacAuthorizationV1alpha1ApiApiKeys) {\n RbacAuthorizationV1alpha1ApiApiKeys[RbacAuthorizationV1alpha1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(RbacAuthorizationV1alpha1ApiApiKeys = exports.RbacAuthorizationV1alpha1ApiApiKeys || (exports.RbacAuthorizationV1alpha1ApiApiKeys = {}));\nclass RbacAuthorizationV1alpha1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[RbacAuthorizationV1alpha1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a ClusterRole\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createClusterRole(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createClusterRole.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1alpha1ClusterRole\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1ClusterRole\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a ClusterRoleBinding\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createClusterRoleBinding(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createClusterRoleBinding.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1alpha1ClusterRoleBinding\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1ClusterRoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedRole(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedRole.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1alpha1Role\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1Role\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedRoleBinding(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedRoleBinding.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1alpha1RoleBinding\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1RoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a ClusterRole\n * @param name name of the ClusterRole\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteClusterRole(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteClusterRoleBinding(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of ClusterRole\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionClusterRole(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of ClusterRoleBinding\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionClusterRoleBinding(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedRole(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRole.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedRoleBinding(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRoleBinding.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedRole(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedRoleBinding(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ClusterRole\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listClusterRole(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1ClusterRoleList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ClusterRoleBinding\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listClusterRoleBinding(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1ClusterRoleBindingList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedRole(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRole.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1RoleList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedRoleBinding(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRoleBinding.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1RoleBindingList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind RoleBinding\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listRoleBindingForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/rolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1RoleBindingList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Role\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listRoleForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/roles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1RoleList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified ClusterRole\n * @param name name of the ClusterRole\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchClusterRole(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchClusterRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1ClusterRole\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchClusterRoleBinding(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchClusterRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1ClusterRoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedRole(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1Role\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1RoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified ClusterRole\n * @param name name of the ClusterRole\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readClusterRole(name, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1ClusterRole\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readClusterRoleBinding(name, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1ClusterRoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedRole(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1Role\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedRoleBinding(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1RoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified ClusterRole\n * @param name name of the ClusterRole\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceClusterRole(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceClusterRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1alpha1ClusterRole\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1ClusterRole\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceClusterRoleBinding(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceClusterRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1alpha1ClusterRoleBinding\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1ClusterRoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedRole(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1alpha1Role\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1Role\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1alpha1RoleBinding\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1RoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.RbacAuthorizationV1alpha1Api = RbacAuthorizationV1alpha1Api;\nvar RbacAuthorizationV1beta1ApiApiKeys;\n(function (RbacAuthorizationV1beta1ApiApiKeys) {\n RbacAuthorizationV1beta1ApiApiKeys[RbacAuthorizationV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(RbacAuthorizationV1beta1ApiApiKeys = exports.RbacAuthorizationV1beta1ApiApiKeys || (exports.RbacAuthorizationV1beta1ApiApiKeys = {}));\nclass RbacAuthorizationV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[RbacAuthorizationV1beta1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a ClusterRole\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createClusterRole(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterroles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createClusterRole.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1ClusterRole\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ClusterRole\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a ClusterRoleBinding\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createClusterRoleBinding(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createClusterRoleBinding.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1ClusterRoleBinding\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ClusterRoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedRole(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedRole.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1Role\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Role\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedRoleBinding(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedRoleBinding.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1RoleBinding\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1RoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a ClusterRole\n * @param name name of the ClusterRole\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteClusterRole(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteClusterRoleBinding(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of ClusterRole\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionClusterRole(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterroles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of ClusterRoleBinding\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionClusterRoleBinding(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedRole(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRole.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedRoleBinding(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRoleBinding.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedRole(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedRoleBinding(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ClusterRole\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listClusterRole(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterroles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ClusterRoleList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind ClusterRoleBinding\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listClusterRoleBinding(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ClusterRoleBindingList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedRole(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRole.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1RoleList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedRoleBinding(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRoleBinding.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1RoleBindingList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind RoleBinding\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listRoleBindingForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/rolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1RoleBindingList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind Role\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listRoleForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/roles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1RoleList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified ClusterRole\n * @param name name of the ClusterRole\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchClusterRole(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchClusterRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ClusterRole\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchClusterRoleBinding(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchClusterRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ClusterRoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedRole(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Role\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1RoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified ClusterRole\n * @param name name of the ClusterRole\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readClusterRole(name, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ClusterRole\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readClusterRoleBinding(name, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ClusterRoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedRole(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Role\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readNamespacedRoleBinding(name, namespace, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1RoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified ClusterRole\n * @param name name of the ClusterRole\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceClusterRole(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceClusterRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1ClusterRole\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ClusterRole\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceClusterRoleBinding(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceClusterRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1ClusterRoleBinding\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1ClusterRoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedRole(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1Role\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1Role\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1RoleBinding\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1RoleBinding\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.RbacAuthorizationV1beta1Api = RbacAuthorizationV1beta1Api;\nvar SchedulingApiApiKeys;\n(function (SchedulingApiApiKeys) {\n SchedulingApiApiKeys[SchedulingApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(SchedulingApiApiKeys = exports.SchedulingApiApiKeys || (exports.SchedulingApiApiKeys = {}));\nclass SchedulingApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[SchedulingApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.SchedulingApi = SchedulingApi;\nvar SchedulingV1alpha1ApiApiKeys;\n(function (SchedulingV1alpha1ApiApiKeys) {\n SchedulingV1alpha1ApiApiKeys[SchedulingV1alpha1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(SchedulingV1alpha1ApiApiKeys = exports.SchedulingV1alpha1ApiApiKeys || (exports.SchedulingV1alpha1ApiApiKeys = {}));\nclass SchedulingV1alpha1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[SchedulingV1alpha1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a PriorityClass\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createPriorityClass(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createPriorityClass.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1alpha1PriorityClass\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1PriorityClass\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of PriorityClass\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionPriorityClass(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a PriorityClass\n * @param name name of the PriorityClass\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deletePriorityClass(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deletePriorityClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind PriorityClass\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listPriorityClass(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1PriorityClassList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified PriorityClass\n * @param name name of the PriorityClass\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchPriorityClass(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchPriorityClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchPriorityClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1PriorityClass\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified PriorityClass\n * @param name name of the PriorityClass\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readPriorityClass(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readPriorityClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1PriorityClass\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified PriorityClass\n * @param name name of the PriorityClass\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replacePriorityClass(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replacePriorityClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replacePriorityClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1alpha1PriorityClass\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1PriorityClass\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.SchedulingV1alpha1Api = SchedulingV1alpha1Api;\nvar SchedulingV1beta1ApiApiKeys;\n(function (SchedulingV1beta1ApiApiKeys) {\n SchedulingV1beta1ApiApiKeys[SchedulingV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(SchedulingV1beta1ApiApiKeys = exports.SchedulingV1beta1ApiApiKeys || (exports.SchedulingV1beta1ApiApiKeys = {}));\nclass SchedulingV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[SchedulingV1beta1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a PriorityClass\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createPriorityClass(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createPriorityClass.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1PriorityClass\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1PriorityClass\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of PriorityClass\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionPriorityClass(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a PriorityClass\n * @param name name of the PriorityClass\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deletePriorityClass(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deletePriorityClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind PriorityClass\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listPriorityClass(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1PriorityClassList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified PriorityClass\n * @param name name of the PriorityClass\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchPriorityClass(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchPriorityClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchPriorityClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1PriorityClass\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified PriorityClass\n * @param name name of the PriorityClass\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readPriorityClass(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readPriorityClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1PriorityClass\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified PriorityClass\n * @param name name of the PriorityClass\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replacePriorityClass(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1beta1/priorityclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replacePriorityClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replacePriorityClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1PriorityClass\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1PriorityClass\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.SchedulingV1beta1Api = SchedulingV1beta1Api;\nvar SettingsApiApiKeys;\n(function (SettingsApiApiKeys) {\n SettingsApiApiKeys[SettingsApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(SettingsApiApiKeys = exports.SettingsApiApiKeys || (exports.SettingsApiApiKeys = {}));\nclass SettingsApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[SettingsApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/settings.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.SettingsApi = SettingsApi;\nvar SettingsV1alpha1ApiApiKeys;\n(function (SettingsV1alpha1ApiApiKeys) {\n SettingsV1alpha1ApiApiKeys[SettingsV1alpha1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(SettingsV1alpha1ApiApiKeys = exports.SettingsV1alpha1ApiApiKeys || (exports.SettingsV1alpha1ApiApiKeys = {}));\nclass SettingsV1alpha1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[SettingsV1alpha1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a PodPreset\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createNamespacedPodPreset(namespace, body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodPreset.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedPodPreset.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1alpha1PodPreset\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1PodPreset\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of PodPreset\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionNamespacedPodPreset(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodPreset.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a PodPreset\n * @param name name of the PodPreset\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteNamespacedPodPreset(name, namespace, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodPreset.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodPreset.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/settings.k8s.io/v1alpha1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind PodPreset\n * @param namespace object name and auth scope, such as for teams and projects\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listNamespacedPodPreset(namespace, includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPodPreset.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1PodPresetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind PodPreset\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param pretty If 'true', then the output is pretty printed.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listPodPresetForAllNamespaces(_continue, fieldSelector, includeUninitialized, labelSelector, limit, pretty, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/settings.k8s.io/v1alpha1/podpresets';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1PodPresetList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified PodPreset\n * @param name name of the PodPreset\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchNamespacedPodPreset(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodPreset.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodPreset.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodPreset.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1PodPreset\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified PodPreset\n * @param name name of the PodPreset\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readNamespacedPodPreset(name, namespace, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPodPreset.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodPreset.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1PodPreset\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified PodPreset\n * @param name name of the PodPreset\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceNamespacedPodPreset(name, namespace, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodPreset.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodPreset.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodPreset.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1alpha1PodPreset\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1PodPreset\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.SettingsV1alpha1Api = SettingsV1alpha1Api;\nvar StorageApiApiKeys;\n(function (StorageApiApiKeys) {\n StorageApiApiKeys[StorageApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(StorageApiApiKeys = exports.StorageApiApiKeys || (exports.StorageApiApiKeys = {}));\nclass StorageApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[StorageApiApiKeys[key]].apiKey = value;\n }\n /**\n * get information of a group\n * @param {*} [options] Override http request options.\n */\n getAPIGroup(options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIGroup\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.StorageApi = StorageApi;\nvar StorageV1ApiApiKeys;\n(function (StorageV1ApiApiKeys) {\n StorageV1ApiApiKeys[StorageV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(StorageV1ApiApiKeys = exports.StorageV1ApiApiKeys || (exports.StorageV1ApiApiKeys = {}));\nclass StorageV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[StorageV1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a StorageClass\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createStorageClass(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createStorageClass.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1StorageClass\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1StorageClass\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a VolumeAttachment\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createVolumeAttachment(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createVolumeAttachment.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1VolumeAttachment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1VolumeAttachment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of StorageClass\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionStorageClass(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of VolumeAttachment\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionVolumeAttachment(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a StorageClass\n * @param name name of the StorageClass\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteStorageClass(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteStorageClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteVolumeAttachment(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind StorageClass\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listStorageClass(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1StorageClassList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind VolumeAttachment\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listVolumeAttachment(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1VolumeAttachmentList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified StorageClass\n * @param name name of the StorageClass\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchStorageClass(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchStorageClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchStorageClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1StorageClass\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchVolumeAttachment(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1VolumeAttachment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update status of the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchVolumeAttachmentStatus(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachmentStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachmentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1VolumeAttachment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified StorageClass\n * @param name name of the StorageClass\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readStorageClass(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readStorageClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1StorageClass\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readVolumeAttachment(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1VolumeAttachment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read status of the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param pretty If 'true', then the output is pretty printed.\n * @param {*} [options] Override http request options.\n */\n readVolumeAttachmentStatus(name, pretty, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readVolumeAttachmentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1VolumeAttachment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified StorageClass\n * @param name name of the StorageClass\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceStorageClass(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceStorageClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceStorageClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1StorageClass\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1StorageClass\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceVolumeAttachment(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1VolumeAttachment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1VolumeAttachment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace status of the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceVolumeAttachmentStatus(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachmentStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachmentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1VolumeAttachment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1VolumeAttachment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.StorageV1Api = StorageV1Api;\nvar StorageV1alpha1ApiApiKeys;\n(function (StorageV1alpha1ApiApiKeys) {\n StorageV1alpha1ApiApiKeys[StorageV1alpha1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(StorageV1alpha1ApiApiKeys = exports.StorageV1alpha1ApiApiKeys || (exports.StorageV1alpha1ApiApiKeys = {}));\nclass StorageV1alpha1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[StorageV1alpha1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a VolumeAttachment\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createVolumeAttachment(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createVolumeAttachment.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1alpha1VolumeAttachment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1VolumeAttachment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of VolumeAttachment\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionVolumeAttachment(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteVolumeAttachment(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind VolumeAttachment\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listVolumeAttachment(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1VolumeAttachmentList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchVolumeAttachment(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1VolumeAttachment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readVolumeAttachment(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1VolumeAttachment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceVolumeAttachment(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1alpha1VolumeAttachment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1alpha1VolumeAttachment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.StorageV1alpha1Api = StorageV1alpha1Api;\nvar StorageV1beta1ApiApiKeys;\n(function (StorageV1beta1ApiApiKeys) {\n StorageV1beta1ApiApiKeys[StorageV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(StorageV1beta1ApiApiKeys = exports.StorageV1beta1ApiApiKeys || (exports.StorageV1beta1ApiApiKeys = {}));\nclass StorageV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[StorageV1beta1ApiApiKeys[key]].apiKey = value;\n }\n /**\n * create a StorageClass\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createStorageClass(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createStorageClass.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1StorageClass\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1StorageClass\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * create a VolumeAttachment\n * @param body\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n createVolumeAttachment(body, includeUninitialized, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createVolumeAttachment.');\n }\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1VolumeAttachment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1VolumeAttachment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of StorageClass\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionStorageClass(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete collection of VolumeAttachment\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n deleteCollectionVolumeAttachment(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a StorageClass\n * @param name name of the StorageClass\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteStorageClass(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteStorageClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * delete a VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param pretty If 'true', then the output is pretty printed.\n * @param body\n * @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\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.\n * @param {*} [options] Override http request options.\n */\n deleteVolumeAttachment(name, pretty, body, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1Status\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * get available resources\n * @param {*} [options] Override http request options.\n */\n getAPIResources(options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind StorageClass\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listStorageClass(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1StorageClassList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * list or watch objects of kind VolumeAttachment\n * @param includeUninitialized If true, partially initialized resources are included in the response.\n * @param pretty If 'true', then the output is pretty printed.\n * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \\"next key\\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n * @param resourceVersion When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n * @param {*} [options] Override http request options.\n */\n listVolumeAttachment(includeUninitialized, pretty, _continue, fieldSelector, labelSelector, limit, resourceVersion, timeoutSeconds, watch, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n if (includeUninitialized !== undefined) {\n localVarQueryParameters['includeUninitialized'] = ObjectSerializer.serialize(includeUninitialized, \"boolean\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1VolumeAttachmentList\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified StorageClass\n * @param name name of the StorageClass\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchStorageClass(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchStorageClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchStorageClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1StorageClass\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * partially update the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n patchVolumeAttachment(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"any\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1VolumeAttachment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified StorageClass\n * @param name name of the StorageClass\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readStorageClass(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readStorageClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1StorageClass\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * read the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param pretty If 'true', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.\n * @param _export Should this value be exported. Export strips fields that a user can not specify.\n * @param {*} [options] Override http request options.\n */\n readVolumeAttachment(name, pretty, exact, _export, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (exact !== undefined) {\n localVarQueryParameters['exact'] = ObjectSerializer.serialize(exact, \"boolean\");\n }\n if (_export !== undefined) {\n localVarQueryParameters['export'] = ObjectSerializer.serialize(_export, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1VolumeAttachment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified StorageClass\n * @param name name of the StorageClass\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceStorageClass(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/storageclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceStorageClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceStorageClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1StorageClass\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1StorageClass\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n /**\n * replace the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param body\n * @param pretty If 'true', then the output is pretty printed.\n * @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\n * @param {*} [options] Override http request options.\n */\n replaceVolumeAttachment(name, body, pretty, dryRun, options = {}) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: ObjectSerializer.serialize(body, \"V1beta1VolumeAttachment\")\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"V1beta1VolumeAttachment\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.StorageV1beta1Api = StorageV1beta1Api;\nvar VersionApiApiKeys;\n(function (VersionApiApiKeys) {\n VersionApiApiKeys[VersionApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(VersionApiApiKeys = exports.VersionApiApiKeys || (exports.VersionApiApiKeys = {}));\nclass VersionApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this.defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new VoidAuth(),\n 'BearerToken': new ApiKeyAuth('header', 'authorization'),\n };\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[VersionApiApiKeys[key]].apiKey = value;\n }\n /**\n * get the code version\n * @param {*} [options] Override http request options.\n */\n getCode(options = {}) {\n const localVarPath = this.basePath + '/version/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this.defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n this.authentications.BearerToken.applyToRequest(localVarRequestOptions);\n this.authentications.default.applyToRequest(localVarRequestOptions);\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n localVarRequest(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = ObjectSerializer.deserialize(body, \"VersionInfo\");\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject({ response: response, body: body });\n }\n }\n });\n });\n }\n}\nexports.VersionApi = VersionApi;\n//# sourceMappingURL=api.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst querystring = require(\"querystring\");\nconst terminal_size_queue_1 = require(\"./terminal-size-queue\");\nconst web_socket_handler_1 = require(\"./web-socket-handler\");\nclass Attach {\n constructor(config, websocketInterface) {\n if (websocketInterface) {\n this.handler = websocketInterface;\n }\n else {\n this.handler = new web_socket_handler_1.WebSocketHandler(config);\n }\n }\n attach(namespace, podName, containerName, stdout, stderr, stdin, tty) {\n return tslib_1.__awaiter(this, void 0, void 0, function* () {\n const query = {\n container: containerName,\n stderr: stderr != null,\n stdin: stdin != null,\n stdout: stdout != null,\n tty,\n };\n const queryStr = querystring.stringify(query);\n const path = `/api/v1/namespaces/${namespace}/pods/${podName}/attach?${queryStr}`;\n const conn = yield this.handler.connect(path, null, (streamNum, buff) => {\n web_socket_handler_1.WebSocketHandler.handleStandardStreams(streamNum, buff, stdout, stderr);\n return true;\n });\n if (stdin != null) {\n web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, stdin, web_socket_handler_1.WebSocketHandler.StdinStream);\n }\n if (terminal_size_queue_1.isResizable(stdout)) {\n this.terminalSizeQueue = new terminal_size_queue_1.TerminalSizeQueue();\n web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, this.terminalSizeQueue, web_socket_handler_1.WebSocketHandler.ResizeStream);\n this.terminalSizeQueue.handleResizes(stdout);\n }\n return conn;\n });\n }\n}\nexports.Attach = Attach;\n//# sourceMappingURL=attach.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst informer_1 = require(\"./informer\");\nclass ListWatch {\n constructor(path, watch, listFn, autoStart = true) {\n this.path = path;\n this.watch = watch;\n this.listFn = listFn;\n this.objects = [];\n this.indexCache = {};\n this.callbackCache = {};\n this.watch = watch;\n this.listFn = listFn;\n if (autoStart) {\n this.doneHandler(null);\n }\n }\n start() {\n this.doneHandler(null);\n }\n on(verb, cb) {\n if (verb !== informer_1.ADD && verb !== informer_1.UPDATE && verb !== informer_1.DELETE) {\n throw new Error(`Unknown verb: ${verb}`);\n }\n if (!this.callbackCache[verb]) {\n this.callbackCache[verb] = [];\n }\n this.callbackCache[verb].push(cb);\n }\n get(name, namespace) {\n return this.objects.find((obj) => {\n return obj.metadata.name === name && (!namespace || obj.metadata.namespace === namespace);\n });\n }\n list(namespace) {\n if (!namespace) {\n return this.objects;\n }\n return this.indexCache[namespace];\n }\n doneHandler(err) {\n return tslib_1.__awaiter(this, void 0, void 0, function* () {\n const promise = this.listFn();\n const result = yield promise;\n const list = result.body;\n deleteItems(this.objects, list.items, this.callbackCache[informer_1.DELETE]);\n this.addOrUpdateItems(list.items);\n this.watch.watch(this.path, { resourceVersion: list.metadata.resourceVersion }, this.watchHandler.bind(this), this.doneHandler.bind(this));\n });\n }\n addOrUpdateItems(items) {\n items.forEach((obj) => {\n addOrUpdateObject(this.objects, obj, this.callbackCache[informer_1.ADD], this.callbackCache[informer_1.UPDATE]);\n if (obj.metadata.namespace) {\n this.indexObj(obj);\n }\n });\n }\n indexObj(obj) {\n let namespaceList = this.indexCache[obj.metadata.namespace];\n if (!namespaceList) {\n namespaceList = [];\n this.indexCache[obj.metadata.namespace] = namespaceList;\n }\n addOrUpdateObject(namespaceList, obj);\n }\n watchHandler(phase, obj) {\n switch (phase) {\n case 'ADDED':\n case 'MODIFIED':\n addOrUpdateObject(this.objects, obj, this.callbackCache[informer_1.ADD], this.callbackCache[informer_1.UPDATE]);\n if (obj.metadata.namespace) {\n this.indexObj(obj);\n }\n break;\n case 'DELETED':\n deleteObject(this.objects, obj, this.callbackCache[informer_1.DELETE]);\n if (obj.metadata.namespace) {\n const namespaceList = this.indexCache[obj.metadata.namespace];\n if (namespaceList) {\n deleteObject(namespaceList, obj);\n }\n }\n break;\n }\n }\n}\nexports.ListWatch = ListWatch;\n// external for testing\nfunction deleteItems(oldObjects, newObjects, deleteCallback) {\n return oldObjects.filter((obj) => {\n if (findKubernetesObject(newObjects, obj) === -1) {\n if (deleteCallback) {\n deleteCallback.forEach((fn) => fn(obj));\n }\n return false;\n }\n return true;\n });\n}\nexports.deleteItems = deleteItems;\n// Only public for testing.\nfunction addOrUpdateObject(objects, obj, addCallback, updateCallback) {\n const ix = findKubernetesObject(objects, obj);\n if (ix === -1) {\n objects.push(obj);\n if (addCallback) {\n addCallback.forEach((elt) => elt(obj));\n }\n }\n else {\n objects[ix] = obj;\n if (updateCallback) {\n updateCallback.forEach((elt) => elt(obj));\n }\n }\n}\nexports.addOrUpdateObject = addOrUpdateObject;\nfunction isSameObject(o1, o2) {\n return o1.metadata.name === o2.metadata.name && o1.metadata.namespace === o2.metadata.namespace;\n}\nfunction findKubernetesObject(objects, obj) {\n return objects.findIndex((elt) => {\n return isSameObject(elt, obj);\n });\n}\n// Public for testing.\nfunction deleteObject(objects, obj, deleteCallback) {\n const ix = findKubernetesObject(objects, obj);\n if (ix !== -1) {\n objects.splice(ix, 1);\n if (deleteCallback) {\n deleteCallback.forEach((elt) => elt(obj));\n }\n }\n}\nexports.deleteObject = deleteObject;\n//# sourceMappingURL=cache.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst jsonpath = require(\"jsonpath-plus\");\nconst shelljs = require(\"shelljs\");\nclass CloudAuth {\n isAuthProvider(user) {\n if (!user || !user.authProvider) {\n return false;\n }\n return user.authProvider.name === 'azure' || user.authProvider.name === 'gcp';\n }\n getToken(user) {\n const config = user.authProvider.config;\n if (this.isExpired(config)) {\n this.updateAccessToken(config);\n }\n return 'Bearer ' + config['access-token'];\n }\n isExpired(config) {\n const token = config['access-token'];\n const expiry = config.expiry;\n if (!token) {\n return true;\n }\n if (!expiry) {\n return false;\n }\n const expiration = Date.parse(expiry);\n if (expiration < Date.now()) {\n return true;\n }\n return false;\n }\n updateAccessToken(config) {\n if (!config['cmd-path']) {\n throw new Error('Token is expired!');\n }\n const args = config['cmd-args'];\n // TODO: Cache to file?\n // TODO: do this asynchronously\n let result;\n try {\n let cmd = config['cmd-path'];\n if (args) {\n cmd = `\"${cmd}\" ${args}`;\n }\n result = shelljs.exec(cmd, { silent: true });\n if (result.code !== 0) {\n throw new Error(result.stderr);\n }\n }\n catch (err) {\n throw new Error('Failed to refresh token: ' + err.message);\n }\n const output = result.stdout.toString();\n const resultObj = JSON.parse(output);\n const tokenPathKeyInConfig = config['token-key'];\n const expiryPathKeyInConfig = config['expiry-key'];\n // Format in file is {}, so slice it out and add '$'\n const tokenPathKey = '$' + tokenPathKeyInConfig.slice(1, -1);\n const expiryPathKey = '$' + expiryPathKeyInConfig.slice(1, -1);\n config['access-token'] = jsonpath.JSONPath(tokenPathKey, resultObj);\n config.expiry = jsonpath.JSONPath(expiryPathKey, resultObj);\n }\n}\nexports.CloudAuth = CloudAuth;\n//# sourceMappingURL=cloud_auth.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fs = require(\"fs\");\nconst path = require(\"path\");\nconst yaml = require(\"js-yaml\");\nconst shelljs = require(\"shelljs\");\nconst api = require(\"./api\");\nconst cloud_auth_1 = require(\"./cloud_auth\");\nconst config_types_1 = require(\"./config_types\");\nconst exec_auth_1 = require(\"./exec_auth\");\n// fs.existsSync was removed in node 10\nfunction fileExists(filepath) {\n try {\n fs.accessSync(filepath);\n return true;\n // tslint:disable-next-line:no-empty\n }\n catch (ignore) { }\n return false;\n}\nclass KubeConfig {\n getContexts() {\n return this.contexts;\n }\n getClusters() {\n return this.clusters;\n }\n getUsers() {\n return this.users;\n }\n getCurrentContext() {\n return this.currentContext;\n }\n setCurrentContext(context) {\n this.currentContext = context;\n }\n getContextObject(name) {\n if (!this.contexts) {\n return null;\n }\n return findObject(this.contexts, name, 'context');\n }\n getCurrentCluster() {\n const context = this.getCurrentContextObject();\n if (!context) {\n return null;\n }\n return this.getCluster(context.cluster);\n }\n getCluster(name) {\n return findObject(this.clusters, name, 'cluster');\n }\n getCurrentUser() {\n const ctx = this.getCurrentContextObject();\n if (!ctx) {\n return null;\n }\n return this.getUser(ctx.user);\n }\n getUser(name) {\n return findObject(this.users, name, 'user');\n }\n loadFromFile(file) {\n const rootDirectory = path.dirname(file);\n this.loadFromString(fs.readFileSync(file, 'utf8'));\n this.makePathsAbsolute(rootDirectory);\n }\n applytoHTTPSOptions(opts) {\n const user = this.getCurrentUser();\n this.applyOptions(opts);\n if (user && user.username) {\n opts.auth = `${user.username}:${user.password}`;\n }\n }\n applyToRequest(opts) {\n const cluster = this.getCurrentCluster();\n const user = this.getCurrentUser();\n this.applyOptions(opts);\n if (cluster && cluster.skipTLSVerify) {\n opts.strictSSL = false;\n }\n if (user && user.username) {\n opts.auth = {\n password: user.password,\n username: user.username,\n };\n }\n }\n loadFromString(config) {\n const obj = yaml.safeLoad(config);\n if (obj.apiVersion !== 'v1') {\n throw new TypeError('unknown version: ' + obj.apiVersion);\n }\n this.clusters = config_types_1.newClusters(obj.clusters);\n this.contexts = config_types_1.newContexts(obj.contexts);\n this.users = config_types_1.newUsers(obj.users);\n this.currentContext = obj['current-context'];\n }\n loadFromOptions(options) {\n this.clusters = options.clusters;\n this.contexts = options.contexts;\n this.users = options.users;\n this.currentContext = options.currentContext;\n }\n loadFromClusterAndUser(cluster, user) {\n this.clusters = [cluster];\n this.users = [user];\n this.currentContext = 'loaded-context';\n this.contexts = [\n {\n cluster: cluster.name,\n user: user.name,\n name: this.currentContext,\n },\n ];\n }\n loadFromCluster(pathPrefix = '') {\n const host = process.env.KUBERNETES_SERVICE_HOST;\n const port = process.env.KUBERNETES_SERVICE_PORT;\n const clusterName = 'inCluster';\n const userName = 'inClusterUser';\n const contextName = 'inClusterContext';\n let scheme = 'https';\n if (port === '80' || port === '8080' || port === '8001') {\n scheme = 'http';\n }\n this.clusters = [\n {\n name: clusterName,\n caFile: `${pathPrefix}${Config.SERVICEACCOUNT_CA_PATH}`,\n server: `${scheme}://${host}:${port}`,\n skipTLSVerify: false,\n },\n ];\n this.users = [\n {\n name: userName,\n token: fs.readFileSync(`${pathPrefix}${Config.SERVICEACCOUNT_TOKEN_PATH}`).toString(),\n },\n ];\n this.contexts = [\n {\n cluster: clusterName,\n name: contextName,\n user: userName,\n },\n ];\n this.currentContext = contextName;\n }\n mergeConfig(config) {\n this.currentContext = config.currentContext;\n config.clusters.forEach((cluster) => {\n this.addCluster(cluster);\n });\n config.users.forEach((user) => {\n this.addUser(user);\n });\n config.contexts.forEach((ctx) => {\n this.addContext(ctx);\n });\n }\n addCluster(cluster) {\n this.clusters.forEach((c, ix) => {\n if (c.name === cluster.name) {\n throw new Error(`Duplicate cluster: ${c.name}`);\n }\n });\n this.clusters.push(cluster);\n }\n addUser(user) {\n this.users.forEach((c, ix) => {\n if (c.name === user.name) {\n throw new Error(`Duplicate user: ${c.name}`);\n }\n });\n this.users.push(user);\n }\n addContext(ctx) {\n this.contexts.forEach((c, ix) => {\n if (c.name === ctx.name) {\n throw new Error(`Duplicate context: ${c.name}`);\n }\n });\n this.contexts.push(ctx);\n }\n loadFromDefault() {\n if (process.env.KUBECONFIG && process.env.KUBECONFIG.length > 0) {\n const files = process.env.KUBECONFIG.split(path.delimiter);\n this.loadFromFile(files[0]);\n for (let i = 1; i < files.length; i++) {\n const kc = new KubeConfig();\n kc.loadFromFile(files[i]);\n this.mergeConfig(kc);\n }\n return;\n }\n const home = findHomeDir();\n if (home) {\n const config = path.join(home, '.kube', 'config');\n if (fileExists(config)) {\n this.loadFromFile(config);\n return;\n }\n }\n if (process.platform === 'win32' && shelljs.which('wsl.exe')) {\n // TODO: Handle if someome set $KUBECONFIG in wsl here...\n const result = shelljs.exec('wsl.exe cat $HOME/.kube/config', {\n silent: true,\n });\n if (result.code === 0) {\n this.loadFromString(result.stdout);\n return;\n }\n }\n if (fileExists(Config.SERVICEACCOUNT_TOKEN_PATH)) {\n this.loadFromCluster();\n return;\n }\n this.loadFromClusterAndUser({ name: 'cluster', server: 'http://localhost:8080' }, { name: 'user' });\n }\n makeApiClient(apiClientType) {\n const cluster = this.getCurrentCluster();\n if (!cluster) {\n throw new Error('No active cluster!');\n }\n const apiClient = new apiClientType(cluster.server);\n apiClient.setDefaultAuthentication(this);\n return apiClient;\n }\n makePathsAbsolute(rootDirectory) {\n this.clusters.forEach((cluster) => {\n if (cluster.caFile) {\n cluster.caFile = makeAbsolutePath(rootDirectory, cluster.caFile);\n }\n });\n this.users.forEach((user) => {\n if (user.certFile) {\n user.certFile = makeAbsolutePath(rootDirectory, user.certFile);\n }\n if (user.keyFile) {\n user.keyFile = makeAbsolutePath(rootDirectory, user.keyFile);\n }\n });\n }\n getCurrentContextObject() {\n return this.getContextObject(this.currentContext);\n }\n applyHTTPSOptions(opts) {\n const cluster = this.getCurrentCluster();\n const user = this.getCurrentUser();\n if (!user) {\n return;\n }\n if (cluster != null && cluster.skipTLSVerify) {\n opts.rejectUnauthorized = false;\n }\n const ca = cluster != null ? bufferFromFileOrString(cluster.caFile, cluster.caData) : null;\n if (ca) {\n opts.ca = ca;\n }\n const cert = bufferFromFileOrString(user.certFile, user.certData);\n if (cert) {\n opts.cert = cert;\n }\n const key = bufferFromFileOrString(user.keyFile, user.keyData);\n if (key) {\n opts.key = key;\n }\n }\n applyAuthorizationHeader(opts) {\n const user = this.getCurrentUser();\n if (!user) {\n return;\n }\n let token = null;\n KubeConfig.authenticators.forEach((authenticator) => {\n if (authenticator.isAuthProvider(user)) {\n token = authenticator.getToken(user);\n }\n });\n if (user.token) {\n token = 'Bearer ' + user.token;\n }\n if (token) {\n if (!opts.headers) {\n opts.headers = [];\n }\n opts.headers.Authorization = token;\n }\n }\n applyOptions(opts) {\n this.applyHTTPSOptions(opts);\n this.applyAuthorizationHeader(opts);\n }\n}\nKubeConfig.authenticators = [new cloud_auth_1.CloudAuth(), new exec_auth_1.ExecAuth()];\nexports.KubeConfig = KubeConfig;\n// This class is deprecated and will eventually be removed.\nclass Config {\n static fromFile(filename) {\n return Config.apiFromFile(filename, api.CoreV1Api);\n }\n static fromCluster() {\n return Config.apiFromCluster(api.CoreV1Api);\n }\n static defaultClient() {\n return Config.apiFromDefaultClient(api.CoreV1Api);\n }\n static apiFromFile(filename, apiClientType) {\n const kc = new KubeConfig();\n kc.loadFromFile(filename);\n return kc.makeApiClient(apiClientType);\n }\n static apiFromCluster(apiClientType) {\n const kc = new KubeConfig();\n kc.loadFromCluster();\n const cluster = kc.getCurrentCluster();\n if (!cluster) {\n throw new Error('No active cluster!');\n }\n const k8sApi = new apiClientType(cluster.server);\n k8sApi.setDefaultAuthentication(kc);\n return k8sApi;\n }\n static apiFromDefaultClient(apiClientType) {\n const kc = new KubeConfig();\n kc.loadFromDefault();\n return kc.makeApiClient(apiClientType);\n }\n}\nConfig.SERVICEACCOUNT_ROOT = '/var/run/secrets/kubernetes.io/serviceaccount';\nConfig.SERVICEACCOUNT_CA_PATH = Config.SERVICEACCOUNT_ROOT + '/ca.crt';\nConfig.SERVICEACCOUNT_TOKEN_PATH = Config.SERVICEACCOUNT_ROOT + '/token';\nexports.Config = Config;\nfunction makeAbsolutePath(root, file) {\n if (!root || path.isAbsolute(file)) {\n return file;\n }\n return path.join(root, file);\n}\nexports.makeAbsolutePath = makeAbsolutePath;\n// This is public really only for testing.\nfunction bufferFromFileOrString(file, data) {\n if (file) {\n return fs.readFileSync(file);\n }\n if (data) {\n return Buffer.from(data, 'base64');\n }\n return null;\n}\nexports.bufferFromFileOrString = bufferFromFileOrString;\n// Only public for testing.\nfunction findHomeDir() {\n if (process.env.HOME) {\n try {\n fs.accessSync(process.env.HOME);\n return process.env.HOME;\n // tslint:disable-next-line:no-empty\n }\n catch (ignore) { }\n }\n if (process.platform !== 'win32') {\n return null;\n }\n if (process.env.HOMEDRIVE && process.env.HOMEPATH) {\n const dir = path.join(process.env.HOMEDRIVE, process.env.HOMEPATH);\n try {\n fs.accessSync(dir);\n return dir;\n // tslint:disable-next-line:no-empty\n }\n catch (ignore) { }\n }\n if (process.env.USERPROFILE) {\n try {\n fs.accessSync(process.env.USERPROFILE);\n return process.env.USERPROFILE;\n // tslint:disable-next-line:no-empty\n }\n catch (ignore) { }\n }\n return null;\n}\nexports.findHomeDir = findHomeDir;\n// Only really public for testing...\nfunction findObject(list, name, key) {\n for (const obj of list) {\n if (obj.name === name) {\n if (obj[key]) {\n return obj[key];\n }\n return obj;\n }\n }\n return null;\n}\nexports.findObject = findObject;\n//# sourceMappingURL=config.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fs = require(\"fs\");\nconst u = require(\"underscore\");\nfunction newClusters(a) {\n return u.map(a, clusterIterator());\n}\nexports.newClusters = newClusters;\nfunction clusterIterator() {\n return (elt, i, list) => {\n if (!elt.name) {\n throw new Error(`clusters[${i}].name is missing`);\n }\n if (!elt.cluster) {\n throw new Error(`clusters[${i}].cluster is missing`);\n }\n if (!elt.cluster.server) {\n throw new Error(`clusters[${i}].cluster.server is missing`);\n }\n return {\n caData: elt.cluster['certificate-authority-data'],\n caFile: elt.cluster['certificate-authority'],\n name: elt.name,\n server: elt.cluster.server,\n skipTLSVerify: elt.cluster['insecure-skip-tls-verify'] === true,\n };\n };\n}\nfunction newUsers(a) {\n return u.map(a, userIterator());\n}\nexports.newUsers = newUsers;\nfunction userIterator() {\n return (elt, i, list) => {\n if (!elt.name) {\n throw new Error(`users[${i}].name is missing`);\n }\n return {\n authProvider: elt.user ? elt.user['auth-provider'] : null,\n certData: elt.user ? elt.user['client-certificate-data'] : null,\n certFile: elt.user ? elt.user['client-certificate'] : null,\n exec: elt.user ? elt.user.exec : null,\n keyData: elt.user ? elt.user['client-key-data'] : null,\n keyFile: elt.user ? elt.user['client-key'] : null,\n name: elt.name,\n token: findToken(elt.user),\n password: elt.user ? elt.user.password : null,\n username: elt.user ? elt.user.username : null,\n };\n };\n}\nfunction findToken(user) {\n if (user) {\n if (user.token) {\n return user.token;\n }\n if (user['token-file']) {\n return fs.readFileSync(user['token-file']).toString();\n }\n }\n}\nfunction newContexts(a) {\n return u.map(a, contextIterator());\n}\nexports.newContexts = newContexts;\nfunction contextIterator() {\n return (elt, i, list) => {\n if (!elt.name) {\n throw new Error(`contexts[${i}].name is missing`);\n }\n if (!elt.context) {\n throw new Error(`contexts[${i}].context is missing`);\n }\n if (!elt.context.cluster) {\n throw new Error(`contexts[${i}].context.cluster is missing`);\n }\n return {\n cluster: elt.context.cluster,\n name: elt.name,\n user: elt.context.user || undefined,\n namespace: elt.context.namespace || undefined,\n };\n };\n}\n//# sourceMappingURL=config_types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst querystring = require(\"querystring\");\nconst terminal_size_queue_1 = require(\"./terminal-size-queue\");\nconst web_socket_handler_1 = require(\"./web-socket-handler\");\nclass Exec {\n constructor(config, wsInterface) {\n if (wsInterface) {\n this.handler = wsInterface;\n }\n else {\n this.handler = new web_socket_handler_1.WebSocketHandler(config);\n }\n }\n /**\n * @param {string} namespace - The namespace of the pod to exec the command inside.\n * @param {string} podName - The name of the pod to exec the command inside.\n * @param {string} containerName - The name of the container in the pod to exec the command inside.\n * @param {(string|string[])} command - The command or command and arguments to execute.\n * @param {stream.Writable} stdout - The stream to write stdout data from the command.\n * @param {stream.Writable} stderr - The stream to write stderr data from the command.\n * @param {stream.Readable} stdin - The strream to write stdin data into the command.\n * @param {boolean} tty - Should the command execute in a TTY enabled session.\n * @param {(V1Status) => void} statusCallback -\n * A callback to received the status (e.g. exit code) from the command, optional.\n * @return {string} This is the result\n */\n exec(namespace, podName, containerName, command, stdout, stderr, stdin, tty, statusCallback) {\n return tslib_1.__awaiter(this, void 0, void 0, function* () {\n const query = {\n stdout: stdout != null,\n stderr: stderr != null,\n stdin: stdin != null,\n tty,\n command,\n container: containerName,\n };\n const queryStr = querystring.stringify(query);\n const path = `/api/v1/namespaces/${namespace}/pods/${podName}/exec?${queryStr}`;\n const conn = yield this.handler.connect(path, null, (streamNum, buff) => {\n const status = web_socket_handler_1.WebSocketHandler.handleStandardStreams(streamNum, buff, stdout, stderr);\n if (status != null) {\n if (statusCallback) {\n statusCallback(status);\n }\n return false;\n }\n return true;\n });\n if (stdin != null) {\n web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, stdin, web_socket_handler_1.WebSocketHandler.StdinStream);\n }\n if (terminal_size_queue_1.isResizable(stdout)) {\n this.terminalSizeQueue = new terminal_size_queue_1.TerminalSizeQueue();\n web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, this.terminalSizeQueue, web_socket_handler_1.WebSocketHandler.ResizeStream);\n this.terminalSizeQueue.handleResizes(stdout);\n }\n return conn;\n });\n }\n}\nexports.Exec = Exec;\n//# sourceMappingURL=exec.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst shell = require(\"shelljs\");\nclass ExecAuth {\n constructor() {\n this.tokenCache = {};\n this.execFn = shell.exec;\n }\n isAuthProvider(user) {\n if (!user) {\n return false;\n }\n if (user.exec) {\n return true;\n }\n if (!user.authProvider) {\n return false;\n }\n return (user.authProvider.name === 'exec' || (user.authProvider.config && user.authProvider.config.exec));\n }\n getToken(user) {\n // TODO: Handle client cert auth here, requires auth refactor.\n // See https://kubernetes.io/docs/reference/access-authn-authz/authentication/#input-and-output-formats\n // for details on this protocol.\n // TODO: Add a unit test for token caching.\n const cachedToken = this.tokenCache[user.name];\n if (cachedToken) {\n const date = Date.parse(cachedToken.status.expirationTimestamp);\n if (date > Date.now()) {\n return `Bearer ${cachedToken.status.token}`;\n }\n this.tokenCache[user.name] = null;\n }\n let exec = null;\n if (user.authProvider && user.authProvider.config) {\n exec = user.authProvider.config.exec;\n }\n if (user.exec) {\n exec = user.exec;\n }\n if (!exec) {\n return null;\n }\n if (!exec.command) {\n throw new Error('No command was specified for exec authProvider!');\n }\n let cmd = exec.command;\n if (exec.args) {\n cmd = `${cmd} ${exec.args.join(' ')}`;\n }\n let opts = { silent: true };\n if (exec.env) {\n const env = process.env;\n exec.env.forEach((elt) => (env[elt.name] = elt.value));\n opts = Object.assign({}, opts, { env });\n }\n const result = this.execFn(cmd, opts);\n if (result.code === 0) {\n const obj = JSON.parse(result.stdout);\n this.tokenCache[user.name] = obj;\n return `Bearer ${obj.status.token}`;\n }\n throw new Error(result.stderr);\n }\n}\nexports.ExecAuth = ExecAuth;\n//# sourceMappingURL=exec_auth.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./config\"), exports);\ntslib_1.__exportStar(require(\"./cache\"), exports);\ntslib_1.__exportStar(require(\"./api\"), exports);\ntslib_1.__exportStar(require(\"./attach\"), exports);\ntslib_1.__exportStar(require(\"./watch\"), exports);\ntslib_1.__exportStar(require(\"./exec\"), exports);\ntslib_1.__exportStar(require(\"./portforward\"), exports);\ntslib_1.__exportStar(require(\"./yaml\"), exports);\ntslib_1.__exportStar(require(\"./log\"), exports);\ntslib_1.__exportStar(require(\"./informer\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst cache_1 = require(\"./cache\");\nconst watch_1 = require(\"./watch\");\nexports.ADD = 'add';\nexports.UPDATE = 'update';\nexports.DELETE = 'delete';\nfunction makeInformer(kubeconfig, path, listPromiseFn) {\n const watch = new watch_1.Watch(kubeconfig);\n return new cache_1.ListWatch(path, watch, listPromiseFn, false);\n}\nexports.makeInformer = makeInformer;\n//# sourceMappingURL=informer.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst request = require(\"request\");\nclass Log {\n constructor(config) {\n this.config = config;\n }\n log(namespace, podName, containerName, stream, done, options = {}) {\n const path = `/api/v1/namespaces/${namespace}/pods/${podName}/log`;\n const cluster = this.config.getCurrentCluster();\n if (!cluster) {\n throw new Error('No currently active cluster');\n }\n const url = cluster.server + path;\n const requestOptions = {\n method: 'GET',\n qs: Object.assign({}, options, { container: containerName }),\n uri: url,\n };\n this.config.applyToRequest(requestOptions);\n const req = request(requestOptions, (error, response, body) => {\n if (error) {\n done(error);\n }\n else if (response && response.statusCode !== 200) {\n done(body);\n }\n else {\n done(null);\n }\n }).on('response', (response) => {\n if (response.statusCode === 200) {\n req.pipe(stream);\n }\n });\n return req;\n }\n}\nexports.Log = Log;\n//# sourceMappingURL=log.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst querystring = require(\"querystring\");\nconst util_1 = require(\"util\");\nconst web_socket_handler_1 = require(\"./web-socket-handler\");\nclass PortForward {\n // handler is a parameter really only for injecting for testing.\n constructor(config, disconnectOnErr, handler) {\n if (!handler) {\n this.handler = new web_socket_handler_1.WebSocketHandler(config);\n }\n else {\n this.handler = handler;\n }\n this.disconnectOnErr = util_1.isUndefined(disconnectOnErr) ? true : disconnectOnErr;\n }\n // TODO: support multiple ports for real...\n portForward(namespace, podName, targetPorts, output, err, input, retryCount = 0) {\n return tslib_1.__awaiter(this, void 0, void 0, function* () {\n if (targetPorts.length === 0) {\n throw new Error('You must provide at least one port to forward to.');\n }\n if (targetPorts.length > 1) {\n throw new Error('Only one port is currently supported for port-forward');\n }\n const query = {\n ports: targetPorts[0],\n };\n const queryStr = querystring.stringify(query);\n const needsToReadPortNumber = [];\n targetPorts.forEach((value, index) => {\n needsToReadPortNumber[index * 2] = true;\n needsToReadPortNumber[index * 2 + 1] = true;\n });\n const path = `/api/v1/namespaces/${namespace}/pods/${podName}/portforward?${queryStr}`;\n const createWebSocket = () => {\n return this.handler.connect(path, null, (streamNum, buff) => {\n if (streamNum >= targetPorts.length * 2) {\n return !this.disconnectOnErr;\n }\n // First two bytes of each stream are the port number\n if (needsToReadPortNumber[streamNum]) {\n buff = buff.slice(2);\n needsToReadPortNumber[streamNum] = false;\n }\n if (streamNum % 2 === 1) {\n if (err) {\n err.write(buff);\n }\n }\n else {\n output.write(buff);\n }\n return true;\n });\n };\n if (retryCount < 1) {\n const ws = yield createWebSocket();\n web_socket_handler_1.WebSocketHandler.handleStandardInput(ws, input, 0);\n return ws;\n }\n return web_socket_handler_1.WebSocketHandler.restartableHandleStandardInput(createWebSocket, input, 0, retryCount);\n });\n }\n}\nexports.PortForward = PortForward;\n//# sourceMappingURL=portforward.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst stream_1 = require(\"stream\");\nclass TerminalSizeQueue extends stream_1.Readable {\n constructor(opts = {}) {\n super(Object.assign({}, opts, { \n // tslint:disable-next-line:no-empty\n read() { } }));\n }\n handleResizes(writeStream) {\n // Set initial size\n this.resize(getTerminalSize(writeStream));\n // Handle future size updates\n writeStream.on('resize', () => this.resize(getTerminalSize(writeStream)));\n }\n resize(size) {\n this.push(JSON.stringify(size));\n }\n}\nexports.TerminalSizeQueue = TerminalSizeQueue;\nfunction isResizable(stream) {\n if (stream == null) {\n return false;\n }\n const hasRows = 'rows' in stream;\n const hasColumns = 'columns' in stream;\n const hasOn = typeof stream.on === 'function';\n return hasRows && hasColumns && hasOn;\n}\nexports.isResizable = isResizable;\nfunction getTerminalSize(writeStream) {\n return { height: writeStream.rows, width: writeStream.columns };\n}\n//# sourceMappingURL=terminal-size-queue.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst JSONStream = require(\"json-stream\");\nconst request = require(\"request\");\nclass DefaultRequest {\n webRequest(opts, callback) {\n return request(opts, callback);\n }\n}\nexports.DefaultRequest = DefaultRequest;\nclass Watch {\n constructor(config, requestImpl) {\n this.config = config;\n if (requestImpl) {\n this.requestImpl = requestImpl;\n }\n else {\n this.requestImpl = new DefaultRequest();\n }\n }\n watch(path, queryParams, callback, done) {\n const cluster = this.config.getCurrentCluster();\n if (!cluster) {\n throw new Error('No currently active cluster');\n }\n const url = cluster.server + path;\n queryParams.watch = true;\n const headerParams = {};\n const requestOptions = {\n method: 'GET',\n qs: queryParams,\n headers: headerParams,\n uri: url,\n useQuerystring: true,\n json: true,\n };\n this.config.applyToRequest(requestOptions);\n const stream = new JSONStream();\n stream.on('data', (data) => callback(data.type, data.object));\n const req = this.requestImpl.webRequest(requestOptions, (error, response, body) => {\n if (error) {\n done(error);\n }\n else {\n done(null);\n }\n });\n req.pipe(stream);\n return req;\n }\n}\nexports.Watch = Watch;\n//# sourceMappingURL=watch.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\nconst WebSocket = require(\"isomorphic-ws\");\nconst protocols = ['v4.channel.k8s.io', 'v3.channel.k8s.io', 'v2.channel.k8s.io', 'channel.k8s.io'];\nclass WebSocketHandler {\n // factory is really just for test injection\n constructor(config, socketFactory) {\n this.config = config;\n this.socketFactory = socketFactory;\n }\n static handleStandardStreams(streamNum, buff, stdout, stderr) {\n if (buff.length < 1) {\n return null;\n }\n if (stdout && streamNum === WebSocketHandler.StdoutStream) {\n stdout.write(buff);\n }\n else if (stderr && streamNum === WebSocketHandler.StderrStream) {\n stderr.write(buff);\n }\n else if (streamNum === WebSocketHandler.StatusStream) {\n // stream closing.\n if (stdout && stdout !== process.stdout) {\n stdout.end();\n }\n if (stderr && stderr !== process.stderr) {\n stderr.end();\n }\n return JSON.parse(buff.toString('utf8'));\n }\n else {\n throw new Error('Unknown stream: ' + streamNum);\n }\n return null;\n }\n static handleStandardInput(ws, stdin, streamNum = 0) {\n stdin.on('data', (data) => {\n const buff = Buffer.alloc(data.length + 1);\n buff.writeInt8(streamNum, 0);\n if (data instanceof Buffer) {\n data.copy(buff, 1);\n }\n else {\n buff.write(data, 1);\n }\n ws.send(buff);\n });\n stdin.on('end', () => {\n ws.close();\n });\n // Keep the stream open\n return true;\n }\n static restartableHandleStandardInput(createWS, stdin, streamNum = 0, retryCount = 3) {\n if (retryCount < 0) {\n throw new Error(\"retryCount can't be lower than 0.\");\n }\n let queue = Promise.resolve();\n let ws;\n function processData(data) {\n return tslib_1.__awaiter(this, void 0, void 0, function* () {\n const buff = Buffer.alloc(data.length + 1);\n buff.writeInt8(streamNum, 0);\n if (data instanceof Buffer) {\n data.copy(buff, 1);\n }\n else {\n buff.write(data, 1);\n }\n let i = 0;\n for (; i < retryCount; ++i) {\n if (ws !== null && ws.readyState === WebSocket.OPEN) {\n ws.send(buff);\n break;\n }\n else {\n ws = yield createWS();\n }\n }\n if (i >= retryCount) {\n throw new Error(\"can't send data to ws\");\n }\n });\n }\n stdin.on('data', (data) => {\n queue = queue.then(() => processData(data));\n });\n stdin.on('end', () => {\n if (ws) {\n ws.close();\n }\n });\n return () => ws;\n }\n /**\n * Connect to a web socket endpoint.\n * @param path The HTTP Path to connect to on the server.\n * @param textHandler Callback for text over the web socket.\n * Returns true if the connection should be kept alive, false to disconnect.\n * @param binaryHandler Callback for binary data over the web socket.\n * Returns true if the connection should be kept alive, false to disconnect.\n */\n connect(path, textHandler, binaryHandler) {\n const cluster = this.config.getCurrentCluster();\n if (!cluster) {\n throw new Error('No cluster is defined.');\n }\n const server = cluster.server;\n const ssl = server.startsWith('https://');\n const target = ssl ? server.substr(8) : server.substr(7);\n const proto = ssl ? 'wss' : 'ws';\n const uri = `${proto}://${target}${path}`;\n const opts = {};\n this.config.applytoHTTPSOptions(opts);\n return new Promise((resolve, reject) => {\n const client = this.socketFactory\n ? this.socketFactory(uri, opts)\n : new WebSocket(uri, protocols, opts);\n let resolved = false;\n client.onopen = () => {\n resolved = true;\n resolve(client);\n };\n client.onerror = (err) => {\n if (!resolved) {\n reject(err);\n }\n };\n client.onmessage = ({ data }) => {\n // TODO: support ArrayBuffer and Buffer[] data types?\n if (typeof data === 'string') {\n if (textHandler && !textHandler(data)) {\n client.close();\n }\n }\n else if (data instanceof Buffer) {\n const streamNum = data.readInt8(0);\n if (binaryHandler && !binaryHandler(streamNum, data.slice(1))) {\n client.close();\n }\n }\n };\n });\n }\n}\nWebSocketHandler.StdinStream = 0;\nWebSocketHandler.StdoutStream = 1;\nWebSocketHandler.StderrStream = 2;\nWebSocketHandler.StatusStream = 3;\nWebSocketHandler.ResizeStream = 4;\nexports.WebSocketHandler = WebSocketHandler;\n//# sourceMappingURL=web-socket-handler.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst yaml = require(\"js-yaml\");\nfunction loadYaml(data, opts) {\n return yaml.safeLoad(data, opts);\n}\nexports.loadYaml = loadYaml;\nfunction loadAllYaml(data, opts) {\n return yaml.safeLoadAll(data, undefined, opts);\n}\nexports.loadAllYaml = loadAllYaml;\nfunction dumpYaml(object, opts) {\n return yaml.safeDump(object, opts);\n}\nexports.dumpYaml = dumpYaml;\n//# sourceMappingURL=yaml.js.map","const { define } = require('./asn1/api')\nconst base = require('./asn1/base')\nconst constants = require('./asn1/constants')\nconst decoders = require('./asn1/decoders')\nconst encoders = require('./asn1/encoders')\n\nmodule.exports = {\n base,\n constants,\n decoders,\n define,\n encoders\n}\n","const { inherits } = require('util')\nconst encoders = require('./encoders')\nconst decoders = require('./decoders')\n\nmodule.exports.define = function define (name, body) {\n return new Entity(name, body)\n}\n\nfunction Entity (name, body) {\n this.name = name\n this.body = body\n\n this.decoders = {}\n this.encoders = {}\n}\n\nEntity.prototype._createNamed = function createNamed (Base) {\n const name = this.name\n\n function Generated (entity) {\n this._initNamed(entity, name)\n }\n inherits(Generated, Base)\n Generated.prototype._initNamed = function _initNamed (entity, name) {\n Base.call(this, entity, name)\n }\n\n return new Generated(this)\n}\n\nEntity.prototype._getDecoder = function _getDecoder (enc) {\n enc = enc || 'der'\n // Lazily create decoder\n if (!Object.prototype.hasOwnProperty.call(this.decoders, enc)) { this.decoders[enc] = this._createNamed(decoders[enc]) }\n return this.decoders[enc]\n}\n\nEntity.prototype.decode = function decode (data, enc, options) {\n return this._getDecoder(enc).decode(data, options)\n}\n\nEntity.prototype._getEncoder = function _getEncoder (enc) {\n enc = enc || 'der'\n // Lazily create encoder\n if (!Object.prototype.hasOwnProperty.call(this.encoders, enc)) { this.encoders[enc] = this._createNamed(encoders[enc]) }\n return this.encoders[enc]\n}\n\nEntity.prototype.encode = function encode (data, enc, /* internal */ reporter) {\n return this._getEncoder(enc).encode(data, reporter)\n}\n","const { inherits } = require('util')\n\nconst { Reporter } = require('../base/reporter')\n\nfunction DecoderBuffer (base, options) {\n Reporter.call(this, options)\n if (!Buffer.isBuffer(base)) {\n this.error('Input not Buffer')\n return\n }\n\n this.base = base\n this.offset = 0\n this.length = base.length\n}\ninherits(DecoderBuffer, Reporter)\n\nDecoderBuffer.isDecoderBuffer = function isDecoderBuffer (data) {\n if (data instanceof DecoderBuffer) {\n return true\n }\n\n // Or accept compatible API\n const isCompatible = typeof data === 'object' &&\n Buffer.isBuffer(data.base) &&\n data.constructor.name === 'DecoderBuffer' &&\n typeof data.offset === 'number' &&\n typeof data.length === 'number' &&\n typeof data.save === 'function' &&\n typeof data.restore === 'function' &&\n typeof data.isEmpty === 'function' &&\n typeof data.readUInt8 === 'function' &&\n typeof data.skip === 'function' &&\n typeof data.raw === 'function'\n\n return isCompatible\n}\n\nDecoderBuffer.prototype.save = function save () {\n return { offset: this.offset, reporter: Reporter.prototype.save.call(this) }\n}\n\nDecoderBuffer.prototype.restore = function restore (save) {\n // Return skipped data\n const res = new DecoderBuffer(this.base)\n res.offset = save.offset\n res.length = this.offset\n\n this.offset = save.offset\n Reporter.prototype.restore.call(this, save.reporter)\n\n return res\n}\n\nDecoderBuffer.prototype.isEmpty = function isEmpty () {\n return this.offset === this.length\n}\n\nDecoderBuffer.prototype.readUInt8 = function readUInt8 (fail) {\n if (this.offset + 1 <= this.length) { return this.base.readUInt8(this.offset++, true) } else { return this.error(fail || 'DecoderBuffer overrun') }\n}\n\nDecoderBuffer.prototype.skip = function skip (bytes, fail) {\n if (!(this.offset + bytes <= this.length)) { return this.error(fail || 'DecoderBuffer overrun') }\n\n const res = new DecoderBuffer(this.base)\n\n // Share reporter state\n res._reporterState = this._reporterState\n\n res.offset = this.offset\n res.length = this.offset + bytes\n this.offset += bytes\n return res\n}\n\nDecoderBuffer.prototype.raw = function raw (save) {\n return this.base.slice(save ? save.offset : this.offset, this.length)\n}\n\nfunction EncoderBuffer (value, reporter) {\n if (Array.isArray(value)) {\n this.length = 0\n this.value = value.map(function (item) {\n if (!EncoderBuffer.isEncoderBuffer(item)) { item = new EncoderBuffer(item, reporter) }\n this.length += item.length\n return item\n }, this)\n } else if (typeof value === 'number') {\n if (!(value >= 0 && value <= 0xff)) { return reporter.error('non-byte EncoderBuffer value') }\n this.value = value\n this.length = 1\n } else if (typeof value === 'string') {\n this.value = value\n this.length = Buffer.byteLength(value)\n } else if (Buffer.isBuffer(value)) {\n this.value = value\n this.length = value.length\n } else {\n return reporter.error(`Unsupported type: ${typeof value}`)\n }\n}\n\nEncoderBuffer.isEncoderBuffer = function isEncoderBuffer (data) {\n if (data instanceof EncoderBuffer) {\n return true\n }\n\n // Or accept compatible API\n const isCompatible = typeof data === 'object' &&\n data.constructor.name === 'EncoderBuffer' &&\n typeof data.length === 'number' &&\n typeof data.join === 'function'\n\n return isCompatible\n}\n\nEncoderBuffer.prototype.join = function join (out, offset) {\n if (!out) { out = Buffer.alloc(this.length) }\n if (!offset) { offset = 0 }\n\n if (this.length === 0) { return out }\n\n if (Array.isArray(this.value)) {\n this.value.forEach(function (item) {\n item.join(out, offset)\n offset += item.length\n })\n } else {\n if (typeof this.value === 'number') { out[offset] = this.value } else if (typeof this.value === 'string') { out.write(this.value, offset) } else if (Buffer.isBuffer(this.value)) { this.value.copy(out, offset) }\n offset += this.length\n }\n\n return out\n}\n\nmodule.exports = {\n DecoderBuffer,\n EncoderBuffer\n}\n","const { Reporter } = require('./reporter')\nconst { DecoderBuffer, EncoderBuffer } = require('./buffer')\nconst Node = require('./node')\n\nmodule.exports = {\n DecoderBuffer,\n EncoderBuffer,\n Node,\n Reporter\n}\n","const { strict: assert } = require('assert')\n\nconst { Reporter } = require('../base/reporter')\nconst { DecoderBuffer, EncoderBuffer } = require('../base/buffer')\n\n// Supported tags\nconst tags = [\n 'seq', 'seqof', 'set', 'setof', 'objid', 'bool',\n 'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc',\n 'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str',\n 'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr'\n]\n\n// Public methods list\nconst methods = [\n 'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice',\n 'any', 'contains'\n].concat(tags)\n\n// Overrided methods list\nconst overrided = [\n '_peekTag', '_decodeTag', '_use',\n '_decodeStr', '_decodeObjid', '_decodeTime',\n '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList',\n\n '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime',\n '_encodeNull', '_encodeInt', '_encodeBool'\n]\n\nfunction Node (enc, parent, name) {\n const state = {}\n this._baseState = state\n\n state.name = name\n state.enc = enc\n\n state.parent = parent || null\n state.children = null\n\n // State\n state.tag = null\n state.args = null\n state.reverseArgs = null\n state.choice = null\n state.optional = false\n state.any = false\n state.obj = false\n state.use = null\n state.useDecoder = null\n state.key = null\n state.default = null\n state.explicit = null\n state.implicit = null\n state.contains = null\n\n // Should create new instance on each method\n if (!state.parent) {\n state.children = []\n this._wrap()\n }\n}\n\nconst stateProps = [\n 'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice',\n 'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit',\n 'implicit', 'contains'\n]\n\nNode.prototype.clone = function clone () {\n const state = this._baseState\n const cstate = {}\n stateProps.forEach(function (prop) {\n cstate[prop] = state[prop]\n })\n const res = new this.constructor(cstate.parent)\n res._baseState = cstate\n return res\n}\n\nNode.prototype._wrap = function wrap () {\n const state = this._baseState\n methods.forEach(function (method) {\n this[method] = function _wrappedMethod () {\n const clone = new this.constructor(this)\n state.children.push(clone)\n return clone[method].apply(clone, arguments)\n }\n }, this)\n}\n\nNode.prototype._init = function init (body) {\n const state = this._baseState\n\n assert(state.parent === null)\n body.call(this)\n\n // Filter children\n state.children = state.children.filter(function (child) {\n return child._baseState.parent === this\n }, this)\n assert.equal(state.children.length, 1, 'Root node can have only one child')\n}\n\nNode.prototype._useArgs = function useArgs (args) {\n const state = this._baseState\n\n // Filter children and args\n const children = args.filter(function (arg) {\n return arg instanceof this.constructor\n }, this)\n args = args.filter(function (arg) {\n return !(arg instanceof this.constructor)\n }, this)\n\n if (children.length !== 0) {\n assert(state.children === null)\n state.children = children\n\n // Replace parent to maintain backward link\n children.forEach(function (child) {\n child._baseState.parent = this\n }, this)\n }\n if (args.length !== 0) {\n assert(state.args === null)\n state.args = args\n state.reverseArgs = args.map(function (arg) {\n if (typeof arg !== 'object' || arg.constructor !== Object) { return arg }\n\n const res = {}\n Object.keys(arg).forEach(function (key) {\n if (key == (key | 0)) { key |= 0 } // eslint-disable-line eqeqeq\n const value = arg[key]\n res[value] = key\n })\n return res\n })\n }\n}\n\n//\n// Overrided methods\n//\n\noverrided.forEach(function (method) {\n Node.prototype[method] = function _overrided () {\n const state = this._baseState\n throw new Error(`${method} not implemented for encoding: ${state.enc}`)\n }\n})\n\n//\n// Public methods\n//\n\ntags.forEach(function (tag) {\n Node.prototype[tag] = function _tagMethod () {\n const state = this._baseState\n const args = Array.prototype.slice.call(arguments)\n\n assert(state.tag === null)\n state.tag = tag\n\n this._useArgs(args)\n\n return this\n }\n})\n\nNode.prototype.use = function use (item) {\n assert(item)\n const state = this._baseState\n\n assert(state.use === null)\n state.use = item\n\n return this\n}\n\nNode.prototype.optional = function optional () {\n const state = this._baseState\n\n state.optional = true\n\n return this\n}\n\nNode.prototype.def = function def (val) {\n const state = this._baseState\n\n assert(state.default === null)\n state.default = val\n state.optional = true\n\n return this\n}\n\nNode.prototype.explicit = function explicit (num) {\n const state = this._baseState\n\n assert(state.explicit === null && state.implicit === null)\n state.explicit = num\n\n return this\n}\n\nNode.prototype.implicit = function implicit (num) {\n const state = this._baseState\n\n assert(state.explicit === null && state.implicit === null)\n state.implicit = num\n\n return this\n}\n\nNode.prototype.obj = function obj () {\n const state = this._baseState\n const args = Array.prototype.slice.call(arguments)\n\n state.obj = true\n\n if (args.length !== 0) { this._useArgs(args) }\n\n return this\n}\n\nNode.prototype.key = function key (newKey) {\n const state = this._baseState\n\n assert(state.key === null)\n state.key = newKey\n\n return this\n}\n\nNode.prototype.any = function any () {\n const state = this._baseState\n\n state.any = true\n\n return this\n}\n\nNode.prototype.choice = function choice (obj) {\n const state = this._baseState\n\n assert(state.choice === null)\n state.choice = obj\n this._useArgs(Object.keys(obj).map(function (key) {\n return obj[key]\n }))\n\n return this\n}\n\nNode.prototype.contains = function contains (item) {\n const state = this._baseState\n\n assert(state.use === null)\n state.contains = item\n\n return this\n}\n\n//\n// Decoding\n//\n\nNode.prototype._decode = function decode (input, options) {\n const state = this._baseState\n\n // Decode root node\n if (state.parent === null) { return input.wrapResult(state.children[0]._decode(input, options)) }\n\n let result = state.default\n let present = true\n\n let prevKey = null\n if (state.key !== null) { prevKey = input.enterKey(state.key) }\n\n // Check if tag is there\n if (state.optional) {\n let tag = null\n if (state.explicit !== null) { tag = state.explicit } else if (state.implicit !== null) { tag = state.implicit } else if (state.tag !== null) { tag = state.tag }\n\n if (tag === null && !state.any) {\n // Trial and Error\n const save = input.save()\n try {\n if (state.choice === null) { this._decodeGeneric(state.tag, input, options) } else { this._decodeChoice(input, options) }\n present = true\n } catch (e) {\n present = false\n }\n input.restore(save)\n } else {\n present = this._peekTag(input, tag, state.any)\n\n if (input.isError(present)) { return present }\n }\n }\n\n // Push object on stack\n let prevObj\n if (state.obj && present) { prevObj = input.enterObject() }\n\n if (present) {\n // Unwrap explicit values\n if (state.explicit !== null) {\n const explicit = this._decodeTag(input, state.explicit)\n if (input.isError(explicit)) { return explicit }\n input = explicit\n }\n\n const start = input.offset\n\n // Unwrap implicit and normal values\n if (state.use === null && state.choice === null) {\n let save\n if (state.any) { save = input.save() }\n const body = this._decodeTag(\n input,\n state.implicit !== null ? state.implicit : state.tag,\n state.any\n )\n if (input.isError(body)) { return body }\n\n if (state.any) { result = input.raw(save) } else { input = body }\n }\n\n if (options && options.track && state.tag !== null) { options.track(input.path(), start, input.length, 'tagged') }\n\n if (options && options.track && state.tag !== null) { options.track(input.path(), input.offset, input.length, 'content') }\n\n // Select proper method for tag\n if (state.any) {\n // no-op\n } else if (state.choice === null) {\n result = this._decodeGeneric(state.tag, input, options)\n } else {\n result = this._decodeChoice(input, options)\n }\n\n if (input.isError(result)) { return result }\n\n // Decode children\n if (!state.any && state.choice === null && state.children !== null) {\n state.children.forEach(function decodeChildren (child) {\n // NOTE: We are ignoring errors here, to let parser continue with other\n // parts of encoded data\n child._decode(input, options)\n })\n }\n\n // Decode contained/encoded by schema, only in bit or octet strings\n if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) {\n const data = new DecoderBuffer(result)\n result = this._getUse(state.contains, input._reporterState.obj)\n ._decode(data, options)\n }\n }\n\n // Pop object\n if (state.obj && present) { result = input.leaveObject(prevObj) }\n\n // Set key\n if (state.key !== null && (result !== null || present === true)) { input.leaveKey(prevKey, state.key, result) } else if (prevKey !== null) { input.exitKey(prevKey) }\n\n return result\n}\n\nNode.prototype._decodeGeneric = function decodeGeneric (tag, input, options) {\n const state = this._baseState\n\n if (tag === 'seq' || tag === 'set') { return null }\n if (tag === 'seqof' || tag === 'setof') { return this._decodeList(input, tag, state.args[0], options) } else if (/str$/.test(tag)) { return this._decodeStr(input, tag, options) } else if (tag === 'objid' && state.args) { return this._decodeObjid(input, state.args[0], state.args[1], options) } else if (tag === 'objid') { return this._decodeObjid(input, null, null, options) } else if (tag === 'gentime' || tag === 'utctime') { return this._decodeTime(input, tag, options) } else if (tag === 'null_') { return this._decodeNull(input, options) } else if (tag === 'bool') { return this._decodeBool(input, options) } else if (tag === 'objDesc') { return this._decodeStr(input, tag, options) } else if (tag === 'int' || tag === 'enum') { return this._decodeInt(input, state.args && state.args[0], options) }\n\n if (state.use !== null) {\n return this._getUse(state.use, input._reporterState.obj)\n ._decode(input, options)\n } else {\n return input.error(`unknown tag: ${tag}`)\n }\n}\n\nNode.prototype._getUse = function _getUse (entity, obj) {\n const state = this._baseState\n // Create altered use decoder if implicit is set\n state.useDecoder = this._use(entity, obj)\n assert(state.useDecoder._baseState.parent === null)\n state.useDecoder = state.useDecoder._baseState.children[0]\n if (state.implicit !== state.useDecoder._baseState.implicit) {\n state.useDecoder = state.useDecoder.clone()\n state.useDecoder._baseState.implicit = state.implicit\n }\n return state.useDecoder\n}\n\nNode.prototype._decodeChoice = function decodeChoice (input, options) {\n const state = this._baseState\n let result = null\n let match = false\n\n Object.keys(state.choice).some(function (key) {\n const save = input.save()\n const node = state.choice[key]\n try {\n const value = node._decode(input, options)\n if (input.isError(value)) { return false }\n\n result = { type: key, value: value }\n match = true\n } catch (e) {\n input.restore(save)\n return false\n }\n return true\n }, this)\n\n if (!match) { return input.error('Choice not matched') }\n\n return result\n}\n\n//\n// Encoding\n//\n\nNode.prototype._createEncoderBuffer = function createEncoderBuffer (data) {\n return new EncoderBuffer(data, this.reporter)\n}\n\nNode.prototype._encode = function encode (data, reporter, parent) {\n const state = this._baseState\n if (state.default !== null && state.default === data) { return }\n\n const result = this._encodeValue(data, reporter, parent)\n if (result === undefined) { return }\n\n if (this._skipDefault(result, reporter, parent)) { return }\n\n return result\n}\n\nNode.prototype._encodeValue = function encode (data, reporter, parent) {\n const state = this._baseState\n\n // Decode root node\n if (state.parent === null) { return state.children[0]._encode(data, reporter || new Reporter()) }\n\n let result = null\n\n // Set reporter to share it with a child class\n this.reporter = reporter\n\n // Check if data is there\n if (state.optional && data === undefined) {\n if (state.default !== null) { data = state.default } else { return }\n }\n\n // Encode children first\n let content = null\n let primitive = false\n if (state.any) {\n // Anything that was given is translated to buffer\n result = this._createEncoderBuffer(data)\n } else if (state.choice) {\n result = this._encodeChoice(data, reporter)\n } else if (state.contains) {\n content = this._getUse(state.contains, parent)._encode(data, reporter)\n primitive = true\n } else if (state.children) {\n content = state.children.map(function (child) {\n if (child._baseState.tag === 'null_') { return child._encode(null, reporter, data) }\n\n if (child._baseState.key === null) { return reporter.error('Child should have a key') }\n const prevKey = reporter.enterKey(child._baseState.key)\n\n if (typeof data !== 'object') { return reporter.error('Child expected, but input is not object') }\n\n const res = child._encode(data[child._baseState.key], reporter, data)\n reporter.leaveKey(prevKey)\n\n return res\n }, this).filter(function (child) {\n return child\n })\n content = this._createEncoderBuffer(content)\n } else {\n if (state.tag === 'seqof' || state.tag === 'setof') {\n if (!(state.args && state.args.length === 1)) { return reporter.error(`Too many args for: ${state.tag}`) }\n\n if (!Array.isArray(data)) { return reporter.error('seqof/setof, but data is not Array') }\n\n const child = this.clone()\n child._baseState.implicit = null\n content = this._createEncoderBuffer(data.map(function (item) {\n const state = this._baseState\n\n return this._getUse(state.args[0], data)._encode(item, reporter)\n }, child))\n } else if (state.use !== null) {\n result = this._getUse(state.use, parent)._encode(data, reporter)\n } else {\n content = this._encodePrimitive(state.tag, data)\n primitive = true\n }\n }\n\n // Encode data itself\n if (!state.any && state.choice === null) {\n const tag = state.implicit !== null ? state.implicit : state.tag\n const cls = state.implicit === null ? 'universal' : 'context'\n\n if (tag === null) {\n if (state.use === null) { reporter.error('Tag could be omitted only for .use()') }\n } else {\n if (state.use === null) { result = this._encodeComposite(tag, primitive, cls, content) }\n }\n }\n\n // Wrap in explicit\n if (state.explicit !== null) { result = this._encodeComposite(state.explicit, false, 'context', result) }\n\n return result\n}\n\nNode.prototype._encodeChoice = function encodeChoice (data, reporter) {\n const state = this._baseState\n\n const node = state.choice[data.type]\n if (!node) {\n assert(\n false,\n `${data.type} not found in ${JSON.stringify(Object.keys(state.choice))}`\n )\n }\n return node._encode(data.value, reporter)\n}\n\nNode.prototype._encodePrimitive = function encodePrimitive (tag, data) {\n const state = this._baseState\n\n if (/str$/.test(tag)) { return this._encodeStr(data, tag) } else if (tag === 'objid' && state.args) { return this._encodeObjid(data, state.reverseArgs[0], state.args[1]) } else if (tag === 'objid') { return this._encodeObjid(data, null, null) } else if (tag === 'gentime' || tag === 'utctime') { return this._encodeTime(data, tag) } else if (tag === 'null_') { return this._encodeNull() } else if (tag === 'int' || tag === 'enum') { return this._encodeInt(data, state.args && state.reverseArgs[0]) } else if (tag === 'bool') { return this._encodeBool(data) } else if (tag === 'objDesc') { return this._encodeStr(data, tag) } else { throw new Error(`Unsupported tag: ${tag}`) }\n}\n\nNode.prototype._isNumstr = function isNumstr (str) {\n return /^[0-9 ]*$/.test(str)\n}\n\nNode.prototype._isPrintstr = function isPrintstr (str) {\n return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(str)\n}\n\nmodule.exports = Node\n","const { inherits } = require('util')\n\nfunction Reporter (options) {\n this._reporterState = {\n obj: null,\n path: [],\n options: options || {},\n errors: []\n }\n}\n\nReporter.prototype.isError = function isError (obj) {\n return obj instanceof ReporterError\n}\n\nReporter.prototype.save = function save () {\n const state = this._reporterState\n\n return { obj: state.obj, pathLen: state.path.length }\n}\n\nReporter.prototype.restore = function restore (data) {\n const state = this._reporterState\n\n state.obj = data.obj\n state.path = state.path.slice(0, data.pathLen)\n}\n\nReporter.prototype.enterKey = function enterKey (key) {\n return this._reporterState.path.push(key)\n}\n\nReporter.prototype.exitKey = function exitKey (index) {\n const state = this._reporterState\n\n state.path = state.path.slice(0, index - 1)\n}\n\nReporter.prototype.leaveKey = function leaveKey (index, key, value) {\n const state = this._reporterState\n\n this.exitKey(index)\n if (state.obj !== null) { state.obj[key] = value }\n}\n\nReporter.prototype.path = function path () {\n return this._reporterState.path.join('/')\n}\n\nReporter.prototype.enterObject = function enterObject () {\n const state = this._reporterState\n\n const prev = state.obj\n state.obj = {}\n return prev\n}\n\nReporter.prototype.leaveObject = function leaveObject (prev) {\n const state = this._reporterState\n\n const now = state.obj\n state.obj = prev\n return now\n}\n\nReporter.prototype.error = function error (msg) {\n let err\n const state = this._reporterState\n\n const inherited = msg instanceof ReporterError\n if (inherited) {\n err = msg\n } else {\n err = new ReporterError(state.path.map(function (elem) {\n return `[${JSON.stringify(elem)}]`\n }).join(''), msg.message || msg, msg.stack)\n }\n\n if (!state.options.partial) { throw err }\n\n if (!inherited) { state.errors.push(err) }\n\n return err\n}\n\nReporter.prototype.wrapResult = function wrapResult (result) {\n const state = this._reporterState\n if (!state.options.partial) { return result }\n\n return {\n result: this.isError(result) ? null : result,\n errors: state.errors\n }\n}\n\nfunction ReporterError (path, msg) {\n this.path = path\n this.rethrow(msg)\n}\ninherits(ReporterError, Error)\n\nReporterError.prototype.rethrow = function rethrow (msg) {\n this.message = `${msg} at: ${this.path || '(shallow)'}`\n if (Error.captureStackTrace) { Error.captureStackTrace(this, ReporterError) }\n\n if (!this.stack) {\n try {\n // IE only adds stack when thrown\n throw new Error(this.message)\n } catch (e) {\n this.stack = e.stack\n }\n }\n return this\n}\n\nexports.Reporter = Reporter\n","// Helper\nfunction reverse (map) {\n const res = {}\n\n Object.keys(map).forEach(function (key) {\n // Convert key to integer if it is stringified\n if ((key | 0) == key) { key = key | 0 } // eslint-disable-line eqeqeq\n\n const value = map[key]\n res[value] = key\n })\n\n return res\n}\n\nexports.tagClass = {\n 0: 'universal',\n 1: 'application',\n 2: 'context',\n 3: 'private'\n}\nexports.tagClassByName = reverse(exports.tagClass)\n\nexports.tag = {\n 0x00: 'end',\n 0x01: 'bool',\n 0x02: 'int',\n 0x03: 'bitstr',\n 0x04: 'octstr',\n 0x05: 'null_',\n 0x06: 'objid',\n 0x07: 'objDesc',\n 0x08: 'external',\n 0x09: 'real',\n 0x0a: 'enum',\n 0x0b: 'embed',\n 0x0c: 'utf8str',\n 0x0d: 'relativeOid',\n 0x10: 'seq',\n 0x11: 'set',\n 0x12: 'numstr',\n 0x13: 'printstr',\n 0x14: 't61str',\n 0x15: 'videostr',\n 0x16: 'ia5str',\n 0x17: 'utctime',\n 0x18: 'gentime',\n 0x19: 'graphstr',\n 0x1a: 'iso646str',\n 0x1b: 'genstr',\n 0x1c: 'unistr',\n 0x1d: 'charstr',\n 0x1e: 'bmpstr'\n}\nexports.tagByName = reverse(exports.tag)\n","module.exports = {\n der: require('./der')\n}\n","/* global BigInt */\nconst { inherits } = require('util')\n\nconst { DecoderBuffer } = require('../base/buffer')\nconst Node = require('../base/node')\n\n// Import DER constants\nconst der = require('../constants/der')\n\nfunction DERDecoder (entity) {\n this.enc = 'der'\n this.name = entity.name\n this.entity = entity\n\n // Construct base tree\n this.tree = new DERNode()\n this.tree._init(entity.body)\n}\n\nDERDecoder.prototype.decode = function decode (data, options) {\n if (!DecoderBuffer.isDecoderBuffer(data)) {\n data = new DecoderBuffer(data, options)\n }\n\n return this.tree._decode(data, options)\n}\n\n// Tree methods\n\nfunction DERNode (parent) {\n Node.call(this, 'der', parent)\n}\ninherits(DERNode, Node)\n\nDERNode.prototype._peekTag = function peekTag (buffer, tag, any) {\n if (buffer.isEmpty()) { return false }\n\n const state = buffer.save()\n const decodedTag = derDecodeTag(buffer, `Failed to peek tag: \"${tag}\"`)\n if (buffer.isError(decodedTag)) { return decodedTag }\n\n buffer.restore(state)\n\n return decodedTag.tag === tag || decodedTag.tagStr === tag || (decodedTag.tagStr + 'of') === tag || any\n}\n\nDERNode.prototype._decodeTag = function decodeTag (buffer, tag, any) {\n const decodedTag = derDecodeTag(buffer,\n `Failed to decode tag of \"${tag}\"`)\n if (buffer.isError(decodedTag)) { return decodedTag }\n\n let len = derDecodeLen(buffer,\n decodedTag.primitive,\n `Failed to get length of \"${tag}\"`)\n\n // Failure\n if (buffer.isError(len)) { return len }\n\n if (!any &&\n decodedTag.tag !== tag &&\n decodedTag.tagStr !== tag &&\n decodedTag.tagStr + 'of' !== tag) {\n return buffer.error(`Failed to match tag: \"${tag}\"`)\n }\n\n if (decodedTag.primitive || len !== null) { return buffer.skip(len, `Failed to match body of: \"${tag}\"`) }\n\n // Indefinite length... find END tag\n const state = buffer.save()\n const res = this._skipUntilEnd(\n buffer,\n `Failed to skip indefinite length body: \"${this.tag}\"`)\n if (buffer.isError(res)) { return res }\n\n len = buffer.offset - state.offset\n buffer.restore(state)\n return buffer.skip(len, `Failed to match body of: \"${tag}\"`)\n}\n\nDERNode.prototype._skipUntilEnd = function skipUntilEnd (buffer, fail) {\n for (;;) {\n const tag = derDecodeTag(buffer, fail)\n if (buffer.isError(tag)) { return tag }\n const len = derDecodeLen(buffer, tag.primitive, fail)\n if (buffer.isError(len)) { return len }\n\n let res\n if (tag.primitive || len !== null) { res = buffer.skip(len) } else { res = this._skipUntilEnd(buffer, fail) }\n\n // Failure\n if (buffer.isError(res)) { return res }\n\n if (tag.tagStr === 'end') { break }\n }\n}\n\nDERNode.prototype._decodeList = function decodeList (buffer, tag, decoder,\n options) {\n const result = []\n while (!buffer.isEmpty()) {\n const possibleEnd = this._peekTag(buffer, 'end')\n if (buffer.isError(possibleEnd)) { return possibleEnd }\n\n const res = decoder.decode(buffer, 'der', options)\n if (buffer.isError(res) && possibleEnd) { break }\n result.push(res)\n }\n return result\n}\n\nDERNode.prototype._decodeStr = function decodeStr (buffer, tag) {\n if (tag === 'bitstr') {\n const unused = buffer.readUInt8()\n if (buffer.isError(unused)) { return unused }\n return { unused: unused, data: buffer.raw() }\n } else if (tag === 'bmpstr') {\n const raw = buffer.raw()\n if (raw.length % 2 === 1) { return buffer.error('Decoding of string type: bmpstr length mismatch') }\n\n let str = ''\n for (let i = 0; i < raw.length / 2; i++) {\n str += String.fromCharCode(raw.readUInt16BE(i * 2))\n }\n return str\n } else if (tag === 'numstr') {\n const numstr = buffer.raw().toString('ascii')\n if (!this._isNumstr(numstr)) {\n return buffer.error('Decoding of string type: numstr unsupported characters')\n }\n return numstr\n } else if (tag === 'octstr') {\n return buffer.raw()\n } else if (tag === 'objDesc') {\n return buffer.raw()\n } else if (tag === 'printstr') {\n const printstr = buffer.raw().toString('ascii')\n if (!this._isPrintstr(printstr)) {\n return buffer.error('Decoding of string type: printstr unsupported characters')\n }\n return printstr\n } else if (/str$/.test(tag)) {\n return buffer.raw().toString()\n } else {\n return buffer.error(`Decoding of string type: ${tag} unsupported`)\n }\n}\n\nDERNode.prototype._decodeObjid = function decodeObjid (buffer, values, relative) {\n let result\n const identifiers = []\n let ident = 0\n let subident = 0\n while (!buffer.isEmpty()) {\n subident = buffer.readUInt8()\n ident <<= 7\n ident |= subident & 0x7f\n if ((subident & 0x80) === 0) {\n identifiers.push(ident)\n ident = 0\n }\n }\n if (subident & 0x80) { identifiers.push(ident) }\n\n const first = (identifiers[0] / 40) | 0\n const second = identifiers[0] % 40\n\n if (relative) { result = identifiers } else { result = [first, second].concat(identifiers.slice(1)) }\n\n if (values) {\n let tmp = values[result.join(' ')]\n if (tmp === undefined) { tmp = values[result.join('.')] }\n if (tmp !== undefined) { result = tmp }\n }\n\n return result\n}\n\nDERNode.prototype._decodeTime = function decodeTime (buffer, tag) {\n const str = buffer.raw().toString()\n\n let year\n let mon\n let day\n let hour\n let min\n let sec\n if (tag === 'gentime') {\n year = str.slice(0, 4) | 0\n mon = str.slice(4, 6) | 0\n day = str.slice(6, 8) | 0\n hour = str.slice(8, 10) | 0\n min = str.slice(10, 12) | 0\n sec = str.slice(12, 14) | 0\n } else if (tag === 'utctime') {\n year = str.slice(0, 2) | 0\n mon = str.slice(2, 4) | 0\n day = str.slice(4, 6) | 0\n hour = str.slice(6, 8) | 0\n min = str.slice(8, 10) | 0\n sec = str.slice(10, 12) | 0\n if (year < 70) { year = 2000 + year } else { year = 1900 + year }\n } else {\n return buffer.error(`Decoding ${tag} time is not supported yet`)\n }\n\n return Date.UTC(year, mon - 1, day, hour, min, sec, 0)\n}\n\nDERNode.prototype._decodeNull = function decodeNull () {\n return null\n}\n\nDERNode.prototype._decodeBool = function decodeBool (buffer) {\n const res = buffer.readUInt8()\n if (buffer.isError(res)) { return res } else { return res !== 0 }\n}\n\nDERNode.prototype._decodeInt = function decodeInt (buffer, values) {\n // Bigint, return as it is (assume big endian)\n const raw = buffer.raw()\n let res = BigInt(`0x${raw.toString('hex')}`)\n\n if (values) {\n res = values[res.toString(10)] || res\n }\n\n return res\n}\n\nDERNode.prototype._use = function use (entity, obj) {\n if (typeof entity === 'function') { entity = entity(obj) }\n return entity._getDecoder('der').tree\n}\n\n// Utility methods\n\nfunction derDecodeTag (buf, fail) {\n let tag = buf.readUInt8(fail)\n if (buf.isError(tag)) { return tag }\n\n const cls = der.tagClass[tag >> 6]\n const primitive = (tag & 0x20) === 0\n\n // Multi-octet tag - load\n if ((tag & 0x1f) === 0x1f) {\n let oct = tag\n tag = 0\n while ((oct & 0x80) === 0x80) {\n oct = buf.readUInt8(fail)\n if (buf.isError(oct)) { return oct }\n\n tag <<= 7\n tag |= oct & 0x7f\n }\n } else {\n tag &= 0x1f\n }\n const tagStr = der.tag[tag]\n\n return {\n cls: cls,\n primitive: primitive,\n tag: tag,\n tagStr: tagStr\n }\n}\n\nfunction derDecodeLen (buf, primitive, fail) {\n let len = buf.readUInt8(fail)\n if (buf.isError(len)) { return len }\n\n // Indefinite form\n if (!primitive && len === 0x80) { return null }\n\n // Definite form\n if ((len & 0x80) === 0) {\n // Short form\n return len\n }\n\n // Long form\n const num = len & 0x7f\n if (num > 4) { return buf.error('length octect is too long') }\n\n len = 0\n for (let i = 0; i < num; i++) {\n len <<= 8\n const j = buf.readUInt8(fail)\n if (buf.isError(j)) { return j }\n len |= j\n }\n\n return len\n}\n\nmodule.exports = DERDecoder\n","module.exports = {\n der: require('./der'),\n pem: require('./pem')\n}\n","const { inherits } = require('util')\n\nconst DERDecoder = require('./der')\n\nfunction PEMDecoder (entity) {\n DERDecoder.call(this, entity)\n this.enc = 'pem'\n}\ninherits(PEMDecoder, DERDecoder)\n\nPEMDecoder.prototype.decode = function decode (data, options) {\n const lines = data.toString().split(/[\\r\\n]+/g)\n\n const label = options.label.toUpperCase()\n\n const re = /^-----(BEGIN|END) ([^-]+)-----$/\n let start = -1\n let end = -1\n for (let i = 0; i < lines.length; i++) {\n const match = lines[i].match(re)\n if (match === null) { continue }\n\n if (match[2] !== label) { continue }\n\n if (start === -1) {\n if (match[1] !== 'BEGIN') { break }\n start = i\n } else {\n if (match[1] !== 'END') { break }\n end = i\n break\n }\n }\n if (start === -1 || end === -1) { throw new Error(`PEM section not found for: ${label}`) }\n\n const base64 = lines.slice(start + 1, end).join('')\n // Remove excessive symbols\n base64.replace(/[^a-z0-9+/=]+/gi, '')\n\n const input = Buffer.from(base64, 'base64')\n return DERDecoder.prototype.decode.call(this, input, options)\n}\n\nmodule.exports = PEMDecoder\n","/* global BigInt */\nconst { inherits } = require('util')\n\nconst Node = require('../base/node')\nconst der = require('../constants/der')\n\nfunction DEREncoder (entity) {\n this.enc = 'der'\n this.name = entity.name\n this.entity = entity\n\n // Construct base tree\n this.tree = new DERNode()\n this.tree._init(entity.body)\n}\n\nDEREncoder.prototype.encode = function encode (data, reporter) {\n return this.tree._encode(data, reporter).join()\n}\n\n// Tree methods\n\nfunction DERNode (parent) {\n Node.call(this, 'der', parent)\n}\ninherits(DERNode, Node)\n\nDERNode.prototype._encodeComposite = function encodeComposite (tag,\n primitive,\n cls,\n content) {\n const encodedTag = encodeTag(tag, primitive, cls, this.reporter)\n\n // Short form\n if (content.length < 0x80) {\n const header = Buffer.alloc(2)\n header[0] = encodedTag\n header[1] = content.length\n return this._createEncoderBuffer([header, content])\n }\n\n // Long form\n // Count octets required to store length\n let lenOctets = 1\n for (let i = content.length; i >= 0x100; i >>= 8) { lenOctets++ }\n\n const header = Buffer.alloc(1 + 1 + lenOctets)\n header[0] = encodedTag\n header[1] = 0x80 | lenOctets\n\n for (let i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8) { header[i] = j & 0xff }\n\n return this._createEncoderBuffer([header, content])\n}\n\nDERNode.prototype._encodeStr = function encodeStr (str, tag) {\n if (tag === 'bitstr') {\n return this._createEncoderBuffer([str.unused | 0, str.data])\n } else if (tag === 'bmpstr') {\n const buf = Buffer.alloc(str.length * 2)\n for (let i = 0; i < str.length; i++) {\n buf.writeUInt16BE(str.charCodeAt(i), i * 2)\n }\n return this._createEncoderBuffer(buf)\n } else if (tag === 'numstr') {\n if (!this._isNumstr(str)) {\n return this.reporter.error('Encoding of string type: numstr supports only digits and space')\n }\n return this._createEncoderBuffer(str)\n } else if (tag === 'printstr') {\n if (!this._isPrintstr(str)) {\n return this.reporter.error('Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark')\n }\n return this._createEncoderBuffer(str)\n } else if (/str$/.test(tag)) {\n return this._createEncoderBuffer(str)\n } else if (tag === 'objDesc') {\n return this._createEncoderBuffer(str)\n } else {\n return this.reporter.error(`Encoding of string type: ${tag} unsupported`)\n }\n}\n\nDERNode.prototype._encodeObjid = function encodeObjid (id, values, relative) {\n if (typeof id === 'string') {\n if (!values) { return this.reporter.error('string objid given, but no values map found') }\n if (!Object.prototype.hasOwnProperty.call(values, id)) { return this.reporter.error('objid not found in values map') }\n id = values[id].split(/[\\s.]+/g)\n for (let i = 0; i < id.length; i++) { id[i] |= 0 }\n } else if (Array.isArray(id)) {\n id = id.slice()\n for (let i = 0; i < id.length; i++) { id[i] |= 0 }\n }\n\n if (!Array.isArray(id)) {\n return this.reporter.error(`objid() should be either array or string, got: ${JSON.stringify(id)}`)\n }\n\n if (!relative) {\n if (id[1] >= 40) { return this.reporter.error('Second objid identifier OOB') }\n id.splice(0, 2, id[0] * 40 + id[1])\n }\n\n // Count number of octets\n let size = 0\n for (let i = 0; i < id.length; i++) {\n let ident = id[i]\n for (size++; ident >= 0x80; ident >>= 7) { size++ }\n }\n\n const objid = Buffer.alloc(size)\n let offset = objid.length - 1\n for (let i = id.length - 1; i >= 0; i--) {\n let ident = id[i]\n objid[offset--] = ident & 0x7f\n while ((ident >>= 7) > 0) { objid[offset--] = 0x80 | (ident & 0x7f) }\n }\n\n return this._createEncoderBuffer(objid)\n}\n\nfunction two (num) {\n if (num < 10) { return `0${num}` } else { return num }\n}\n\nDERNode.prototype._encodeTime = function encodeTime (time, tag) {\n let str\n const date = new Date(time)\n\n if (tag === 'gentime') {\n str = [\n two(date.getUTCFullYear()),\n two(date.getUTCMonth() + 1),\n two(date.getUTCDate()),\n two(date.getUTCHours()),\n two(date.getUTCMinutes()),\n two(date.getUTCSeconds()),\n 'Z'\n ].join('')\n } else if (tag === 'utctime') {\n str = [\n two(date.getUTCFullYear() % 100),\n two(date.getUTCMonth() + 1),\n two(date.getUTCDate()),\n two(date.getUTCHours()),\n two(date.getUTCMinutes()),\n two(date.getUTCSeconds()),\n 'Z'\n ].join('')\n } else {\n this.reporter.error(`Encoding ${tag} time is not supported yet`)\n }\n\n return this._encodeStr(str, 'octstr')\n}\n\nDERNode.prototype._encodeNull = function encodeNull () {\n return this._createEncoderBuffer('')\n}\n\nfunction bnToBuf (bn) {\n var hex = BigInt(bn).toString(16)\n if (hex.length % 2) { hex = '0' + hex }\n\n var len = hex.length / 2\n var u8 = new Uint8Array(len)\n\n var i = 0\n var j = 0\n while (i < len) {\n u8[i] = parseInt(hex.slice(j, j + 2), 16)\n i += 1\n j += 2\n }\n\n return u8\n}\n\nDERNode.prototype._encodeInt = function encodeInt (num, values) {\n if (typeof num === 'string') {\n if (!values) { return this.reporter.error('String int or enum given, but no values map') }\n if (!Object.prototype.hasOwnProperty.call(values, num)) {\n return this.reporter.error(`Values map doesn't contain: ${JSON.stringify(num)}`)\n }\n num = values[num]\n }\n\n if (typeof num === 'bigint') {\n const numArray = [...bnToBuf(num)]\n if (numArray[0] & 0x80) {\n numArray.unshift(0)\n }\n num = Buffer.from(numArray)\n }\n\n if (Buffer.isBuffer(num)) {\n let size = num.length\n if (num.length === 0) { size++ }\n\n const out = Buffer.alloc(size)\n num.copy(out)\n if (num.length === 0) { out[0] = 0 }\n return this._createEncoderBuffer(out)\n }\n\n if (num < 0x80) { return this._createEncoderBuffer(num) }\n\n if (num < 0x100) { return this._createEncoderBuffer([0, num]) }\n\n let size = 1\n for (let i = num; i >= 0x100; i >>= 8) { size++ }\n\n const out = new Array(size)\n for (let i = out.length - 1; i >= 0; i--) {\n out[i] = num & 0xff\n num >>= 8\n }\n if (out[0] & 0x80) {\n out.unshift(0)\n }\n\n return this._createEncoderBuffer(Buffer.from(out))\n}\n\nDERNode.prototype._encodeBool = function encodeBool (value) {\n return this._createEncoderBuffer(value ? 0xff : 0)\n}\n\nDERNode.prototype._use = function use (entity, obj) {\n if (typeof entity === 'function') { entity = entity(obj) }\n return entity._getEncoder('der').tree\n}\n\nDERNode.prototype._skipDefault = function skipDefault (dataBuffer, reporter, parent) {\n const state = this._baseState\n let i\n if (state.default === null) { return false }\n\n const data = dataBuffer.join()\n if (state.defaultBuffer === undefined) { state.defaultBuffer = this._encodeValue(state.default, reporter, parent).join() }\n\n if (data.length !== state.defaultBuffer.length) { return false }\n\n for (i = 0; i < data.length; i++) {\n if (data[i] !== state.defaultBuffer[i]) { return false }\n }\n\n return true\n}\n\n// Utility methods\n\nfunction encodeTag (tag, primitive, cls, reporter) {\n let res\n\n if (tag === 'seqof') { tag = 'seq' } else if (tag === 'setof') { tag = 'set' }\n\n if (Object.prototype.hasOwnProperty.call(der.tagByName, tag)) { res = der.tagByName[tag] } else if (typeof tag === 'number' && (tag | 0) === tag) { res = tag } else { return reporter.error(`Unknown tag: ${tag}`) }\n\n if (res >= 0x1f) { return reporter.error('Multi-octet tag encoding unsupported') }\n\n if (!primitive) { res |= 0x20 }\n\n res |= (der.tagClassByName[cls || 'universal'] << 6)\n\n return res\n}\n\nmodule.exports = DEREncoder\n","module.exports = {\n der: require('./der'),\n pem: require('./pem')\n}\n","const { inherits } = require('util')\n\nconst DEREncoder = require('./der')\n\nfunction PEMEncoder (entity) {\n DEREncoder.call(this, entity)\n this.enc = 'pem'\n}\ninherits(PEMEncoder, DEREncoder)\n\nPEMEncoder.prototype.encode = function encode (data, options) {\n const buf = DEREncoder.prototype.encode.call(this, data)\n\n const p = buf.toString('base64')\n const out = [`-----BEGIN ${options.label}-----`]\n for (let i = 0; i < p.length; i += 64) { out.push(p.slice(i, i + 64)) }\n out.push(`-----END ${options.label}-----`)\n return out.join('\\n')\n}\n\nmodule.exports = PEMEncoder\n","\"use strict\";\n/// \n/// \n/// \n/// \nObject.defineProperty(exports, \"__esModule\", { value: true });\n// TODO: Use the `URL` global when targeting Node.js 10\n// tslint:disable-next-line\nconst URLGlobal = typeof URL === 'undefined' ? require('url').URL : URL;\nconst toString = Object.prototype.toString;\nconst isOfType = (type) => (value) => typeof value === type;\nconst isBuffer = (input) => !is.nullOrUndefined(input) && !is.nullOrUndefined(input.constructor) && is.function_(input.constructor.isBuffer) && input.constructor.isBuffer(input);\nconst getObjectType = (value) => {\n const objectName = toString.call(value).slice(8, -1);\n if (objectName) {\n return objectName;\n }\n return null;\n};\nconst isObjectOfType = (type) => (value) => getObjectType(value) === type;\nfunction is(value) {\n switch (value) {\n case null:\n return \"null\" /* null */;\n case true:\n case false:\n return \"boolean\" /* boolean */;\n default:\n }\n switch (typeof value) {\n case 'undefined':\n return \"undefined\" /* undefined */;\n case 'string':\n return \"string\" /* string */;\n case 'number':\n return \"number\" /* number */;\n case 'symbol':\n return \"symbol\" /* symbol */;\n default:\n }\n if (is.function_(value)) {\n return \"Function\" /* Function */;\n }\n if (is.observable(value)) {\n return \"Observable\" /* Observable */;\n }\n if (Array.isArray(value)) {\n return \"Array\" /* Array */;\n }\n if (isBuffer(value)) {\n return \"Buffer\" /* Buffer */;\n }\n const tagType = getObjectType(value);\n if (tagType) {\n return tagType;\n }\n if (value instanceof String || value instanceof Boolean || value instanceof Number) {\n throw new TypeError('Please don\\'t use object wrappers for primitive types');\n }\n return \"Object\" /* Object */;\n}\n(function (is) {\n // tslint:disable-next-line:strict-type-predicates\n const isObject = (value) => typeof value === 'object';\n // tslint:disable:variable-name\n is.undefined = isOfType('undefined');\n is.string = isOfType('string');\n is.number = isOfType('number');\n is.function_ = isOfType('function');\n // tslint:disable-next-line:strict-type-predicates\n is.null_ = (value) => value === null;\n is.class_ = (value) => is.function_(value) && value.toString().startsWith('class ');\n is.boolean = (value) => value === true || value === false;\n is.symbol = isOfType('symbol');\n // tslint:enable:variable-name\n is.numericString = (value) => is.string(value) && value.length > 0 && !Number.isNaN(Number(value));\n is.array = Array.isArray;\n is.buffer = isBuffer;\n is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value);\n is.object = (value) => !is.nullOrUndefined(value) && (is.function_(value) || isObject(value));\n is.iterable = (value) => !is.nullOrUndefined(value) && is.function_(value[Symbol.iterator]);\n is.asyncIterable = (value) => !is.nullOrUndefined(value) && is.function_(value[Symbol.asyncIterator]);\n is.generator = (value) => is.iterable(value) && is.function_(value.next) && is.function_(value.throw);\n is.nativePromise = (value) => isObjectOfType(\"Promise\" /* Promise */)(value);\n const hasPromiseAPI = (value) => !is.null_(value) &&\n isObject(value) &&\n is.function_(value.then) &&\n is.function_(value.catch);\n is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value);\n is.generatorFunction = isObjectOfType(\"GeneratorFunction\" /* GeneratorFunction */);\n is.asyncFunction = isObjectOfType(\"AsyncFunction\" /* AsyncFunction */);\n is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty('prototype');\n is.regExp = isObjectOfType(\"RegExp\" /* RegExp */);\n is.date = isObjectOfType(\"Date\" /* Date */);\n is.error = isObjectOfType(\"Error\" /* Error */);\n is.map = (value) => isObjectOfType(\"Map\" /* Map */)(value);\n is.set = (value) => isObjectOfType(\"Set\" /* Set */)(value);\n is.weakMap = (value) => isObjectOfType(\"WeakMap\" /* WeakMap */)(value);\n is.weakSet = (value) => isObjectOfType(\"WeakSet\" /* WeakSet */)(value);\n is.int8Array = isObjectOfType(\"Int8Array\" /* Int8Array */);\n is.uint8Array = isObjectOfType(\"Uint8Array\" /* Uint8Array */);\n is.uint8ClampedArray = isObjectOfType(\"Uint8ClampedArray\" /* Uint8ClampedArray */);\n is.int16Array = isObjectOfType(\"Int16Array\" /* Int16Array */);\n is.uint16Array = isObjectOfType(\"Uint16Array\" /* Uint16Array */);\n is.int32Array = isObjectOfType(\"Int32Array\" /* Int32Array */);\n is.uint32Array = isObjectOfType(\"Uint32Array\" /* Uint32Array */);\n is.float32Array = isObjectOfType(\"Float32Array\" /* Float32Array */);\n is.float64Array = isObjectOfType(\"Float64Array\" /* Float64Array */);\n is.arrayBuffer = isObjectOfType(\"ArrayBuffer\" /* ArrayBuffer */);\n is.sharedArrayBuffer = isObjectOfType(\"SharedArrayBuffer\" /* SharedArrayBuffer */);\n is.dataView = isObjectOfType(\"DataView\" /* DataView */);\n is.directInstanceOf = (instance, klass) => Object.getPrototypeOf(instance) === klass.prototype;\n is.urlInstance = (value) => isObjectOfType(\"URL\" /* URL */)(value);\n is.urlString = (value) => {\n if (!is.string(value)) {\n return false;\n }\n try {\n new URLGlobal(value); // tslint:disable-line no-unused-expression\n return true;\n }\n catch (_a) {\n return false;\n }\n };\n is.truthy = (value) => Boolean(value);\n is.falsy = (value) => !value;\n is.nan = (value) => Number.isNaN(value);\n const primitiveTypes = new Set([\n 'undefined',\n 'string',\n 'number',\n 'boolean',\n 'symbol'\n ]);\n is.primitive = (value) => is.null_(value) || primitiveTypes.has(typeof value);\n is.integer = (value) => Number.isInteger(value);\n is.safeInteger = (value) => Number.isSafeInteger(value);\n is.plainObject = (value) => {\n // From: https://github.com/sindresorhus/is-plain-obj/blob/master/index.js\n let prototype;\n return getObjectType(value) === \"Object\" /* Object */ &&\n (prototype = Object.getPrototypeOf(value), prototype === null || // tslint:disable-line:ban-comma-operator\n prototype === Object.getPrototypeOf({}));\n };\n const typedArrayTypes = new Set([\n \"Int8Array\" /* Int8Array */,\n \"Uint8Array\" /* Uint8Array */,\n \"Uint8ClampedArray\" /* Uint8ClampedArray */,\n \"Int16Array\" /* Int16Array */,\n \"Uint16Array\" /* Uint16Array */,\n \"Int32Array\" /* Int32Array */,\n \"Uint32Array\" /* Uint32Array */,\n \"Float32Array\" /* Float32Array */,\n \"Float64Array\" /* Float64Array */\n ]);\n is.typedArray = (value) => {\n const objectType = getObjectType(value);\n if (objectType === null) {\n return false;\n }\n return typedArrayTypes.has(objectType);\n };\n const isValidLength = (value) => is.safeInteger(value) && value > -1;\n is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length);\n is.inRange = (value, range) => {\n if (is.number(range)) {\n return value >= Math.min(0, range) && value <= Math.max(range, 0);\n }\n if (is.array(range) && range.length === 2) {\n return value >= Math.min(...range) && value <= Math.max(...range);\n }\n throw new TypeError(`Invalid range: ${JSON.stringify(range)}`);\n };\n const NODE_TYPE_ELEMENT = 1;\n const DOM_PROPERTIES_TO_CHECK = [\n 'innerHTML',\n 'ownerDocument',\n 'style',\n 'attributes',\n 'nodeValue'\n ];\n is.domElement = (value) => is.object(value) && value.nodeType === NODE_TYPE_ELEMENT && is.string(value.nodeName) &&\n !is.plainObject(value) && DOM_PROPERTIES_TO_CHECK.every(property => property in value);\n is.observable = (value) => {\n if (!value) {\n return false;\n }\n if (value[Symbol.observable] && value === value[Symbol.observable]()) {\n return true;\n }\n if (value['@@observable'] && value === value['@@observable']()) {\n return true;\n }\n return false;\n };\n is.nodeStream = (value) => !is.nullOrUndefined(value) && isObject(value) && is.function_(value.pipe) && !is.observable(value);\n is.infinite = (value) => value === Infinity || value === -Infinity;\n const isAbsoluteMod2 = (rem) => (value) => is.integer(value) && Math.abs(value % 2) === rem;\n is.even = isAbsoluteMod2(0);\n is.odd = isAbsoluteMod2(1);\n const isWhiteSpaceString = (value) => is.string(value) && /\\S/.test(value) === false;\n is.emptyArray = (value) => is.array(value) && value.length === 0;\n is.nonEmptyArray = (value) => is.array(value) && value.length > 0;\n is.emptyString = (value) => is.string(value) && value.length === 0;\n is.nonEmptyString = (value) => is.string(value) && value.length > 0;\n is.emptyStringOrWhitespace = (value) => is.emptyString(value) || isWhiteSpaceString(value);\n is.emptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length === 0;\n is.nonEmptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length > 0;\n is.emptySet = (value) => is.set(value) && value.size === 0;\n is.nonEmptySet = (value) => is.set(value) && value.size > 0;\n is.emptyMap = (value) => is.map(value) && value.size === 0;\n is.nonEmptyMap = (value) => is.map(value) && value.size > 0;\n const predicateOnArray = (method, predicate, values) => {\n if (is.function_(predicate) === false) {\n throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`);\n }\n if (values.length === 0) {\n throw new TypeError('Invalid number of values');\n }\n return method.call(values, predicate);\n };\n // tslint:disable variable-name\n is.any = (predicate, ...values) => predicateOnArray(Array.prototype.some, predicate, values);\n is.all = (predicate, ...values) => predicateOnArray(Array.prototype.every, predicate, values);\n // tslint:enable variable-name\n})(is || (is = {}));\n// Some few keywords are reserved, but we'll populate them for Node.js users\n// See https://github.com/Microsoft/TypeScript/issues/2536\nObject.defineProperties(is, {\n class: {\n value: is.class_\n },\n function: {\n value: is.function_\n },\n null: {\n value: is.null_\n }\n});\nexports.default = is;\n// For CommonJS default export support\nmodule.exports = is;\nmodule.exports.default = is;\n//# sourceMappingURL=index.js.map","'use strict';\nconst deferToConnect = require('defer-to-connect');\n\nmodule.exports = request => {\n\tconst timings = {\n\t\tstart: Date.now(),\n\t\tsocket: null,\n\t\tlookup: null,\n\t\tconnect: null,\n\t\tupload: null,\n\t\tresponse: null,\n\t\tend: null,\n\t\terror: null,\n\t\tphases: {\n\t\t\twait: null,\n\t\t\tdns: null,\n\t\t\ttcp: null,\n\t\t\trequest: null,\n\t\t\tfirstByte: null,\n\t\t\tdownload: null,\n\t\t\ttotal: null\n\t\t}\n\t};\n\n\tconst handleError = origin => {\n\t\tconst emit = origin.emit.bind(origin);\n\t\torigin.emit = (event, ...args) => {\n\t\t\t// Catches the `error` event\n\t\t\tif (event === 'error') {\n\t\t\t\ttimings.error = Date.now();\n\t\t\t\ttimings.phases.total = timings.error - timings.start;\n\n\t\t\t\torigin.emit = emit;\n\t\t\t}\n\n\t\t\t// Saves the original behavior\n\t\t\treturn emit(event, ...args);\n\t\t};\n\t};\n\n\tlet uploadFinished = false;\n\tconst onUpload = () => {\n\t\ttimings.upload = Date.now();\n\t\ttimings.phases.request = timings.upload - timings.connect;\n\t};\n\n\thandleError(request);\n\n\trequest.once('socket', socket => {\n\t\ttimings.socket = Date.now();\n\t\ttimings.phases.wait = timings.socket - timings.start;\n\n\t\tconst lookupListener = () => {\n\t\t\ttimings.lookup = Date.now();\n\t\t\ttimings.phases.dns = timings.lookup - timings.socket;\n\t\t};\n\n\t\tsocket.once('lookup', lookupListener);\n\n\t\tdeferToConnect(socket, () => {\n\t\t\ttimings.connect = Date.now();\n\n\t\t\tif (timings.lookup === null) {\n\t\t\t\tsocket.removeListener('lookup', lookupListener);\n\t\t\t\ttimings.lookup = timings.connect;\n\t\t\t\ttimings.phases.dns = timings.lookup - timings.socket;\n\t\t\t}\n\n\t\t\ttimings.phases.tcp = timings.connect - timings.lookup;\n\n\t\t\tif (uploadFinished && !timings.upload) {\n\t\t\t\tonUpload();\n\t\t\t}\n\t\t});\n\t});\n\n\trequest.once('finish', () => {\n\t\tuploadFinished = true;\n\n\t\tif (timings.connect) {\n\t\t\tonUpload();\n\t\t}\n\t});\n\n\trequest.once('response', response => {\n\t\ttimings.response = Date.now();\n\t\ttimings.phases.firstByte = timings.response - timings.upload;\n\n\t\thandleError(response);\n\n\t\tresponse.once('end', () => {\n\t\t\ttimings.end = Date.now();\n\t\t\ttimings.phases.download = timings.end - timings.response;\n\t\t\ttimings.phases.total = timings.end - timings.start;\n\t\t});\n\t});\n\n\treturn timings;\n};\n","\"use strict\";\n\nconst atob = require(\"./lib/atob\");\nconst btoa = require(\"./lib/btoa\");\n\nmodule.exports = {\n atob,\n btoa\n};\n","\"use strict\";\n\n/**\n * Implementation of atob() according to the HTML and Infra specs, except that\n * instead of throwing INVALID_CHARACTER_ERR we return null.\n */\nfunction atob(data) {\n // Web IDL requires DOMStrings to just be converted using ECMAScript\n // ToString, which in our case amounts to using a template literal.\n data = `${data}`;\n // \"Remove all ASCII whitespace from data.\"\n data = data.replace(/[ \\t\\n\\f\\r]/g, \"\");\n // \"If data's length divides by 4 leaving no remainder, then: if data ends\n // with one or two U+003D (=) code points, then remove them from data.\"\n if (data.length % 4 === 0) {\n data = data.replace(/==?$/, \"\");\n }\n // \"If data's length divides by 4 leaving a remainder of 1, then return\n // failure.\"\n //\n // \"If data contains a code point that is not one of\n //\n // U+002B (+)\n // U+002F (/)\n // ASCII alphanumeric\n //\n // then return failure.\"\n if (data.length % 4 === 1 || /[^+/0-9A-Za-z]/.test(data)) {\n return null;\n }\n // \"Let output be an empty byte sequence.\"\n let output = \"\";\n // \"Let buffer be an empty buffer that can have bits appended to it.\"\n //\n // We append bits via left-shift and or. accumulatedBits is used to track\n // when we've gotten to 24 bits.\n let buffer = 0;\n let accumulatedBits = 0;\n // \"Let position be a position variable for data, initially pointing at the\n // start of data.\"\n //\n // \"While position does not point past the end of data:\"\n for (let i = 0; i < data.length; i++) {\n // \"Find the code point pointed to by position in the second column of\n // Table 1: The Base 64 Alphabet of RFC 4648. Let n be the number given in\n // the first cell of the same row.\n //\n // \"Append to buffer the six bits corresponding to n, most significant bit\n // first.\"\n //\n // atobLookup() implements the table from RFC 4648.\n buffer <<= 6;\n buffer |= atobLookup(data[i]);\n accumulatedBits += 6;\n // \"If buffer has accumulated 24 bits, interpret them as three 8-bit\n // big-endian numbers. Append three bytes with values equal to those\n // numbers to output, in the same order, and then empty buffer.\"\n if (accumulatedBits === 24) {\n output += String.fromCharCode((buffer & 0xff0000) >> 16);\n output += String.fromCharCode((buffer & 0xff00) >> 8);\n output += String.fromCharCode(buffer & 0xff);\n buffer = accumulatedBits = 0;\n }\n // \"Advance position by 1.\"\n }\n // \"If buffer is not empty, it contains either 12 or 18 bits. If it contains\n // 12 bits, then discard the last four and interpret the remaining eight as\n // an 8-bit big-endian number. If it contains 18 bits, then discard the last\n // two and interpret the remaining 16 as two 8-bit big-endian numbers. Append\n // the one or two bytes with values equal to those one or two numbers to\n // output, in the same order.\"\n if (accumulatedBits === 12) {\n buffer >>= 4;\n output += String.fromCharCode(buffer);\n } else if (accumulatedBits === 18) {\n buffer >>= 2;\n output += String.fromCharCode((buffer & 0xff00) >> 8);\n output += String.fromCharCode(buffer & 0xff);\n }\n // \"Return output.\"\n return output;\n}\n/**\n * A lookup table for atob(), which converts an ASCII character to the\n * corresponding six-bit number.\n */\n\nconst keystr =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\nfunction atobLookup(chr) {\n const index = keystr.indexOf(chr);\n // Throw exception if character is not in the lookup string; should not be hit in tests\n return index < 0 ? undefined : index;\n}\n\nmodule.exports = atob;\n","\"use strict\";\n\n/**\n * btoa() as defined by the HTML and Infra specs, which mostly just references\n * RFC 4648.\n */\nfunction btoa(s) {\n let i;\n // String conversion as required by Web IDL.\n s = `${s}`;\n // \"The btoa() method must throw an \"InvalidCharacterError\" DOMException if\n // data contains any character whose code point is greater than U+00FF.\"\n for (i = 0; i < s.length; i++) {\n if (s.charCodeAt(i) > 255) {\n return null;\n }\n }\n let out = \"\";\n for (i = 0; i < s.length; i += 3) {\n const groupsOfSix = [undefined, undefined, undefined, undefined];\n groupsOfSix[0] = s.charCodeAt(i) >> 2;\n groupsOfSix[1] = (s.charCodeAt(i) & 0x03) << 4;\n if (s.length > i + 1) {\n groupsOfSix[1] |= s.charCodeAt(i + 1) >> 4;\n groupsOfSix[2] = (s.charCodeAt(i + 1) & 0x0f) << 2;\n }\n if (s.length > i + 2) {\n groupsOfSix[2] |= s.charCodeAt(i + 2) >> 6;\n groupsOfSix[3] = s.charCodeAt(i + 2) & 0x3f;\n }\n for (let j = 0; j < groupsOfSix.length; j++) {\n if (typeof groupsOfSix[j] === \"undefined\") {\n out += \"=\";\n } else {\n out += btoaLookup(groupsOfSix[j]);\n }\n }\n }\n return out;\n}\n\n/**\n * Lookup table for btoa(), which converts a six-bit number into the\n * corresponding ASCII character.\n */\nconst keystr =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\nfunction btoaLookup(index) {\n if (index >= 0 && index < 64) {\n return keystr[index];\n }\n\n // Throw INVALID_CHARACTER_ERR exception here -- won't be hit in the tests.\n return undefined;\n}\n\nmodule.exports = btoa;\n","'use strict';\nconst indentString = require('indent-string');\nconst cleanStack = require('clean-stack');\n\nconst cleanInternalStack = stack => stack.replace(/\\s+at .*aggregate-error\\/index.js:\\d+:\\d+\\)?/g, '');\n\nclass AggregateError extends Error {\n\tconstructor(errors) {\n\t\tif (!Array.isArray(errors)) {\n\t\t\tthrow new TypeError(`Expected input to be an Array, got ${typeof errors}`);\n\t\t}\n\n\t\terrors = [...errors].map(error => {\n\t\t\tif (error instanceof Error) {\n\t\t\t\treturn error;\n\t\t\t}\n\n\t\t\tif (error !== null && typeof error === 'object') {\n\t\t\t\t// Handle plain error objects with message property and/or possibly other metadata\n\t\t\t\treturn Object.assign(new Error(error.message), error);\n\t\t\t}\n\n\t\t\treturn new Error(error);\n\t\t});\n\n\t\tlet message = errors\n\t\t\t.map(error => {\n\t\t\t\t// The `stack` property is not standardized, so we can't assume it exists\n\t\t\t\treturn typeof error.stack === 'string' ? cleanInternalStack(cleanStack(error.stack)) : String(error);\n\t\t\t})\n\t\t\t.join('\\n');\n\t\tmessage = '\\n' + indentString(message, 4);\n\t\tsuper(message);\n\n\t\tthis.name = 'AggregateError';\n\n\t\tObject.defineProperty(this, '_errors', {value: errors});\n\t}\n\n\t* [Symbol.iterator]() {\n\t\tfor (const error of this._errors) {\n\t\t\tyield error;\n\t\t}\n\t}\n}\n\nmodule.exports = AggregateError;\n","'use strict';\n\nvar compileSchema = require('./compile')\n , resolve = require('./compile/resolve')\n , Cache = require('./cache')\n , SchemaObject = require('./compile/schema_obj')\n , stableStringify = require('fast-json-stable-stringify')\n , formats = require('./compile/formats')\n , rules = require('./compile/rules')\n , $dataMetaSchema = require('./data')\n , util = require('./compile/util');\n\nmodule.exports = Ajv;\n\nAjv.prototype.validate = validate;\nAjv.prototype.compile = compile;\nAjv.prototype.addSchema = addSchema;\nAjv.prototype.addMetaSchema = addMetaSchema;\nAjv.prototype.validateSchema = validateSchema;\nAjv.prototype.getSchema = getSchema;\nAjv.prototype.removeSchema = removeSchema;\nAjv.prototype.addFormat = addFormat;\nAjv.prototype.errorsText = errorsText;\n\nAjv.prototype._addSchema = _addSchema;\nAjv.prototype._compile = _compile;\n\nAjv.prototype.compileAsync = require('./compile/async');\nvar customKeyword = require('./keyword');\nAjv.prototype.addKeyword = customKeyword.add;\nAjv.prototype.getKeyword = customKeyword.get;\nAjv.prototype.removeKeyword = customKeyword.remove;\nAjv.prototype.validateKeyword = customKeyword.validate;\n\nvar errorClasses = require('./compile/error_classes');\nAjv.ValidationError = errorClasses.Validation;\nAjv.MissingRefError = errorClasses.MissingRef;\nAjv.$dataMetaSchema = $dataMetaSchema;\n\nvar META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema';\n\nvar META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ];\nvar META_SUPPORT_DATA = ['/properties'];\n\n/**\n * Creates validator instance.\n * Usage: `Ajv(opts)`\n * @param {Object} opts optional options\n * @return {Object} ajv instance\n */\nfunction Ajv(opts) {\n if (!(this instanceof Ajv)) return new Ajv(opts);\n opts = this._opts = util.copy(opts) || {};\n setLogger(this);\n this._schemas = {};\n this._refs = {};\n this._fragments = {};\n this._formats = formats(opts.format);\n\n this._cache = opts.cache || new Cache;\n this._loadingSchemas = {};\n this._compilations = [];\n this.RULES = rules();\n this._getId = chooseGetId(opts);\n\n opts.loopRequired = opts.loopRequired || Infinity;\n if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;\n if (opts.serialize === undefined) opts.serialize = stableStringify;\n this._metaOpts = getMetaSchemaOptions(this);\n\n if (opts.formats) addInitialFormats(this);\n if (opts.keywords) addInitialKeywords(this);\n addDefaultMetaSchema(this);\n if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta);\n if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}});\n addInitialSchemas(this);\n}\n\n\n\n/**\n * Validate data using schema\n * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize.\n * @this Ajv\n * @param {String|Object} schemaKeyRef key, ref or schema object\n * @param {Any} data to be validated\n * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).\n */\nfunction validate(schemaKeyRef, data) {\n var v;\n if (typeof schemaKeyRef == 'string') {\n v = this.getSchema(schemaKeyRef);\n if (!v) throw new Error('no schema with key or ref \"' + schemaKeyRef + '\"');\n } else {\n var schemaObj = this._addSchema(schemaKeyRef);\n v = schemaObj.validate || this._compile(schemaObj);\n }\n\n var valid = v(data);\n if (v.$async !== true) this.errors = v.errors;\n return valid;\n}\n\n\n/**\n * Create validating function for passed schema.\n * @this Ajv\n * @param {Object} schema schema object\n * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.\n * @return {Function} validating function\n */\nfunction compile(schema, _meta) {\n var schemaObj = this._addSchema(schema, undefined, _meta);\n return schemaObj.validate || this._compile(schemaObj);\n}\n\n\n/**\n * Adds schema to the instance.\n * @this Ajv\n * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.\n * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.\n * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.\n * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.\n * @return {Ajv} this for method chaining\n */\nfunction addSchema(schema, key, _skipValidation, _meta) {\n if (Array.isArray(schema)){\n for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used.\n * @param {Object} options optional options with properties `separator` and `dataVar`.\n * @return {String} human readable string with all errors descriptions\n */\nfunction errorsText(errors, options) {\n errors = errors || this.errors;\n if (!errors) return 'No errors';\n options = options || {};\n var separator = options.separator === undefined ? ', ' : options.separator;\n var dataVar = options.dataVar === undefined ? 'data' : options.dataVar;\n\n var text = '';\n for (var i=0; i%\\\\^`{|}]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i;\n// For the source: https://gist.github.com/dperini/729294\n// For test cases: https://mathiasbynens.be/demo/url-regex\n// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983.\n// var URL = /^(?:(?:https?|ftp):\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!10(?:\\.\\d{1,3}){3})(?!127(?:\\.\\d{1,3}){3})(?!169\\.254(?:\\.\\d{1,3}){2})(?!192\\.168(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-)*[a-z\\u{00a1}-\\u{ffff}0-9]+)(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-)*[a-z\\u{00a1}-\\u{ffff}0-9]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu;\nvar URL = /^(?:(?:http[s\\u017F]?|ftp):\\/\\/)(?:(?:[\\0-\\x08\\x0E-\\x1F!-\\x9F\\xA1-\\u167F\\u1681-\\u1FFF\\u200B-\\u2027\\u202A-\\u202E\\u2030-\\u205E\\u2060-\\u2FFF\\u3001-\\uD7FF\\uE000-\\uFEFE\\uFF00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])+(?::(?:[\\0-\\x08\\x0E-\\x1F!-\\x9F\\xA1-\\u167F\\u1681-\\u1FFF\\u200B-\\u2027\\u202A-\\u202E\\u2030-\\u205E\\u2060-\\u2FFF\\u3001-\\uD7FF\\uE000-\\uFEFE\\uFF00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])*)?@)?(?:(?!10(?:\\.[0-9]{1,3}){3})(?!127(?:\\.[0-9]{1,3}){3})(?!169\\.254(?:\\.[0-9]{1,3}){2})(?!192\\.168(?:\\.[0-9]{1,3}){2})(?!172\\.(?:1[6-9]|2[0-9]|3[01])(?:\\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\\xA1-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])+-)*(?:[0-9a-z\\xA1-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])+)(?:\\.(?:(?:[0-9a-z\\xA1-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])+-)*(?:[0-9a-z\\xA1-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])+)*(?:\\.(?:(?:[a-z\\xA1-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\\/(?:[\\0-\\x08\\x0E-\\x1F!-\\x9F\\xA1-\\u167F\\u1681-\\u1FFF\\u200B-\\u2027\\u202A-\\u202E\\u2030-\\u205E\\u2060-\\u2FFF\\u3001-\\uD7FF\\uE000-\\uFEFE\\uFF00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])*)?$/i;\nvar UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;\nvar JSON_POINTER = /^(?:\\/(?:[^~/]|~0|~1)*)*$/;\nvar JSON_POINTER_URI_FRAGMENT = /^#(?:\\/(?:[a-z0-9_\\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;\nvar RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/;\n\n\nmodule.exports = formats;\n\nfunction formats(mode) {\n mode = mode == 'full' ? 'full' : 'fast';\n return util.copy(formats[mode]);\n}\n\n\nformats.fast = {\n // date: http://tools.ietf.org/html/rfc3339#section-5.6\n date: /^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d$/,\n // date-time: http://tools.ietf.org/html/rfc3339#section-5.6\n time: /^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)?$/i,\n 'date-time': /^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d[t\\s](?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i,\n // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js\n uri: /^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/)?[^\\s]*$/i,\n 'uri-reference': /^(?:(?:[a-z][a-z0-9+\\-.]*:)?\\/?\\/)?(?:[^\\\\\\s#][^\\s#]*)?(?:#[^\\\\\\s]*)?$/i,\n 'uri-template': URITEMPLATE,\n url: URL,\n // email (sources from jsen validator):\n // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363\n // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation')\n email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,\n hostname: HOSTNAME,\n // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html\n ipv4: /^(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$/,\n // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses\n ipv6: /^\\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(?:%.+)?\\s*$/i,\n regex: regex,\n // uuid: http://tools.ietf.org/html/rfc4122\n uuid: UUID,\n // JSON-pointer: https://tools.ietf.org/html/rfc6901\n // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A\n 'json-pointer': JSON_POINTER,\n 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,\n // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00\n 'relative-json-pointer': RELATIVE_JSON_POINTER\n};\n\n\nformats.full = {\n date: date,\n time: time,\n 'date-time': date_time,\n uri: uri,\n 'uri-reference': URIREF,\n 'uri-template': URITEMPLATE,\n url: URL,\n email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,\n hostname: HOSTNAME,\n ipv4: /^(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$/,\n ipv6: /^\\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(?:%.+)?\\s*$/i,\n regex: regex,\n uuid: UUID,\n 'json-pointer': JSON_POINTER,\n 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,\n 'relative-json-pointer': RELATIVE_JSON_POINTER\n};\n\n\nfunction isLeapYear(year) {\n // https://tools.ietf.org/html/rfc3339#appendix-C\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\n\n\nfunction date(str) {\n // full-date from http://tools.ietf.org/html/rfc3339#section-5.6\n var matches = str.match(DATE);\n if (!matches) return false;\n\n var year = +matches[1];\n var month = +matches[2];\n var day = +matches[3];\n\n return month >= 1 && month <= 12 && day >= 1 &&\n day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]);\n}\n\n\nfunction time(str, full) {\n var matches = str.match(TIME);\n if (!matches) return false;\n\n var hour = matches[1];\n var minute = matches[2];\n var second = matches[3];\n var timeZone = matches[5];\n return ((hour <= 23 && minute <= 59 && second <= 59) ||\n (hour == 23 && minute == 59 && second == 60)) &&\n (!full || timeZone);\n}\n\n\nvar DATE_TIME_SEPARATOR = /t|\\s/i;\nfunction date_time(str) {\n // http://tools.ietf.org/html/rfc3339#section-5.6\n var dateTime = str.split(DATE_TIME_SEPARATOR);\n return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true);\n}\n\n\nvar NOT_URI_FRAGMENT = /\\/|:/;\nfunction uri(str) {\n // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required \".\"\n return NOT_URI_FRAGMENT.test(str) && URI.test(str);\n}\n\n\nvar Z_ANCHOR = /[^\\\\]\\\\Z/;\nfunction regex(str) {\n if (Z_ANCHOR.test(str)) return false;\n try {\n new RegExp(str);\n return true;\n } catch(e) {\n return false;\n }\n}\n","'use strict';\n\nvar resolve = require('./resolve')\n , util = require('./util')\n , errorClasses = require('./error_classes')\n , stableStringify = require('fast-json-stable-stringify');\n\nvar validateGenerator = require('../dotjs/validate');\n\n/**\n * Functions below are used inside compiled validations function\n */\n\nvar ucs2length = util.ucs2length;\nvar equal = require('fast-deep-equal');\n\n// this error is thrown by async schemas to return validation errors via exception\nvar ValidationError = errorClasses.Validation;\n\nmodule.exports = compile;\n\n\n/**\n * Compiles schema to validation function\n * @this Ajv\n * @param {Object} schema schema object\n * @param {Object} root object with information about the root schema for this schema\n * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution\n * @param {String} baseId base ID for IDs in the schema\n * @return {Function} validation function\n */\nfunction compile(schema, root, localRefs, baseId) {\n /* jshint validthis: true, evil: true */\n /* eslint no-shadow: 0 */\n var self = this\n , opts = this._opts\n , refVal = [ undefined ]\n , refs = {}\n , patterns = []\n , patternsHash = {}\n , defaults = []\n , defaultsHash = {}\n , customRules = [];\n\n root = root || { schema: schema, refVal: refVal, refs: refs };\n\n var c = checkCompiling.call(this, schema, root, baseId);\n var compilation = this._compilations[c.index];\n if (c.compiling) return (compilation.callValidate = callValidate);\n\n var formats = this._formats;\n var RULES = this.RULES;\n\n try {\n var v = localCompile(schema, root, localRefs, baseId);\n compilation.validate = v;\n var cv = compilation.callValidate;\n if (cv) {\n cv.schema = v.schema;\n cv.errors = null;\n cv.refs = v.refs;\n cv.refVal = v.refVal;\n cv.root = v.root;\n cv.$async = v.$async;\n if (opts.sourceCode) cv.source = v.source;\n }\n return v;\n } finally {\n endCompiling.call(this, schema, root, baseId);\n }\n\n /* @this {*} - custom context, see passContext option */\n function callValidate() {\n /* jshint validthis: true */\n var validate = compilation.validate;\n var result = validate.apply(this, arguments);\n callValidate.errors = validate.errors;\n return result;\n }\n\n function localCompile(_schema, _root, localRefs, baseId) {\n var isRoot = !_root || (_root && _root.schema == _schema);\n if (_root.schema != root.schema)\n return compile.call(self, _schema, _root, localRefs, baseId);\n\n var $async = _schema.$async === true;\n\n var sourceCode = validateGenerator({\n isTop: true,\n schema: _schema,\n isRoot: isRoot,\n baseId: baseId,\n root: _root,\n schemaPath: '',\n errSchemaPath: '#',\n errorPath: '\"\"',\n MissingRefError: errorClasses.MissingRef,\n RULES: RULES,\n validate: validateGenerator,\n util: util,\n resolve: resolve,\n resolveRef: resolveRef,\n usePattern: usePattern,\n useDefault: useDefault,\n useCustomRule: useCustomRule,\n opts: opts,\n formats: formats,\n logger: self.logger,\n self: self\n });\n\n sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)\n + vars(defaults, defaultCode) + vars(customRules, customRuleCode)\n + sourceCode;\n\n if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema);\n // console.log('\\n\\n\\n *** \\n', JSON.stringify(sourceCode));\n var validate;\n try {\n var makeValidate = new Function(\n 'self',\n 'RULES',\n 'formats',\n 'root',\n 'refVal',\n 'defaults',\n 'customRules',\n 'equal',\n 'ucs2length',\n 'ValidationError',\n sourceCode\n );\n\n validate = makeValidate(\n self,\n RULES,\n formats,\n root,\n refVal,\n defaults,\n customRules,\n equal,\n ucs2length,\n ValidationError\n );\n\n refVal[0] = validate;\n } catch(e) {\n self.logger.error('Error compiling schema, function code:', sourceCode);\n throw e;\n }\n\n validate.schema = _schema;\n validate.errors = null;\n validate.refs = refs;\n validate.refVal = refVal;\n validate.root = isRoot ? validate : _root;\n if ($async) validate.$async = true;\n if (opts.sourceCode === true) {\n validate.source = {\n code: sourceCode,\n patterns: patterns,\n defaults: defaults\n };\n }\n\n return validate;\n }\n\n function resolveRef(baseId, ref, isRoot) {\n ref = resolve.url(baseId, ref);\n var refIndex = refs[ref];\n var _refVal, refCode;\n if (refIndex !== undefined) {\n _refVal = refVal[refIndex];\n refCode = 'refVal[' + refIndex + ']';\n return resolvedRef(_refVal, refCode);\n }\n if (!isRoot && root.refs) {\n var rootRefId = root.refs[ref];\n if (rootRefId !== undefined) {\n _refVal = root.refVal[rootRefId];\n refCode = addLocalRef(ref, _refVal);\n return resolvedRef(_refVal, refCode);\n }\n }\n\n refCode = addLocalRef(ref);\n var v = resolve.call(self, localCompile, root, ref);\n if (v === undefined) {\n var localSchema = localRefs && localRefs[ref];\n if (localSchema) {\n v = resolve.inlineRef(localSchema, opts.inlineRefs)\n ? localSchema\n : compile.call(self, localSchema, root, localRefs, baseId);\n }\n }\n\n if (v === undefined) {\n removeLocalRef(ref);\n } else {\n replaceLocalRef(ref, v);\n return resolvedRef(v, refCode);\n }\n }\n\n function addLocalRef(ref, v) {\n var refId = refVal.length;\n refVal[refId] = v;\n refs[ref] = refId;\n return 'refVal' + refId;\n }\n\n function removeLocalRef(ref) {\n delete refs[ref];\n }\n\n function replaceLocalRef(ref, v) {\n var refId = refs[ref];\n refVal[refId] = v;\n }\n\n function resolvedRef(refVal, code) {\n return typeof refVal == 'object' || typeof refVal == 'boolean'\n ? { code: code, schema: refVal, inline: true }\n : { code: code, $async: refVal && !!refVal.$async };\n }\n\n function usePattern(regexStr) {\n var index = patternsHash[regexStr];\n if (index === undefined) {\n index = patternsHash[regexStr] = patterns.length;\n patterns[index] = regexStr;\n }\n return 'pattern' + index;\n }\n\n function useDefault(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n return '' + value;\n case 'string':\n return util.toQuotedString(value);\n case 'object':\n if (value === null) return 'null';\n var valueStr = stableStringify(value);\n var index = defaultsHash[valueStr];\n if (index === undefined) {\n index = defaultsHash[valueStr] = defaults.length;\n defaults[index] = value;\n }\n return 'default' + index;\n }\n }\n\n function useCustomRule(rule, schema, parentSchema, it) {\n if (self._opts.validateSchema !== false) {\n var deps = rule.definition.dependencies;\n if (deps && !deps.every(function(keyword) {\n return Object.prototype.hasOwnProperty.call(parentSchema, keyword);\n }))\n throw new Error('parent schema must have all required keywords: ' + deps.join(','));\n\n var validateSchema = rule.definition.validateSchema;\n if (validateSchema) {\n var valid = validateSchema(schema);\n if (!valid) {\n var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);\n if (self._opts.validateSchema == 'log') self.logger.error(message);\n else throw new Error(message);\n }\n }\n }\n\n var compile = rule.definition.compile\n , inline = rule.definition.inline\n , macro = rule.definition.macro;\n\n var validate;\n if (compile) {\n validate = compile.call(self, schema, parentSchema, it);\n } else if (macro) {\n validate = macro.call(self, schema, parentSchema, it);\n if (opts.validateSchema !== false) self.validateSchema(validate, true);\n } else if (inline) {\n validate = inline.call(self, it, rule.keyword, schema, parentSchema);\n } else {\n validate = rule.definition.validate;\n if (!validate) return;\n }\n\n if (validate === undefined)\n throw new Error('custom keyword \"' + rule.keyword + '\"failed to compile');\n\n var index = customRules.length;\n customRules[index] = validate;\n\n return {\n code: 'customRule' + index,\n validate: validate\n };\n }\n}\n\n\n/**\n * Checks if the schema is currently compiled\n * @this Ajv\n * @param {Object} schema schema to compile\n * @param {Object} root root object\n * @param {String} baseId base schema ID\n * @return {Object} object with properties \"index\" (compilation index) and \"compiling\" (boolean)\n */\nfunction checkCompiling(schema, root, baseId) {\n /* jshint validthis: true */\n var index = compIndex.call(this, schema, root, baseId);\n if (index >= 0) return { index: index, compiling: true };\n index = this._compilations.length;\n this._compilations[index] = {\n schema: schema,\n root: root,\n baseId: baseId\n };\n return { index: index, compiling: false };\n}\n\n\n/**\n * Removes the schema from the currently compiled list\n * @this Ajv\n * @param {Object} schema schema to compile\n * @param {Object} root root object\n * @param {String} baseId base schema ID\n */\nfunction endCompiling(schema, root, baseId) {\n /* jshint validthis: true */\n var i = compIndex.call(this, schema, root, baseId);\n if (i >= 0) this._compilations.splice(i, 1);\n}\n\n\n/**\n * Index of schema compilation in the currently compiled list\n * @this Ajv\n * @param {Object} schema schema to compile\n * @param {Object} root root object\n * @param {String} baseId base schema ID\n * @return {Integer} compilation index\n */\nfunction compIndex(schema, root, baseId) {\n /* jshint validthis: true */\n for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) {\n // high surrogate, and there is a next character\n value = str.charCodeAt(pos);\n if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate\n }\n }\n return length;\n};\n","'use strict';\n\n\nmodule.exports = {\n copy: copy,\n checkDataType: checkDataType,\n checkDataTypes: checkDataTypes,\n coerceToTypes: coerceToTypes,\n toHash: toHash,\n getProperty: getProperty,\n escapeQuotes: escapeQuotes,\n equal: require('fast-deep-equal'),\n ucs2length: require('./ucs2length'),\n varOccurences: varOccurences,\n varReplace: varReplace,\n schemaHasRules: schemaHasRules,\n schemaHasRulesExcept: schemaHasRulesExcept,\n schemaUnknownRules: schemaUnknownRules,\n toQuotedString: toQuotedString,\n getPathExpr: getPathExpr,\n getPath: getPath,\n getData: getData,\n unescapeFragment: unescapeFragment,\n unescapeJsonPointer: unescapeJsonPointer,\n escapeFragment: escapeFragment,\n escapeJsonPointer: escapeJsonPointer\n};\n\n\nfunction copy(o, to) {\n to = to || {};\n for (var key in o) to[key] = o[key];\n return to;\n}\n\n\nfunction checkDataType(dataType, data, strictNumbers, negate) {\n var EQUAL = negate ? ' !== ' : ' === '\n , AND = negate ? ' || ' : ' && '\n , OK = negate ? '!' : ''\n , NOT = negate ? '' : '!';\n switch (dataType) {\n case 'null': return data + EQUAL + 'null';\n case 'array': return OK + 'Array.isArray(' + data + ')';\n case 'object': return '(' + OK + data + AND +\n 'typeof ' + data + EQUAL + '\"object\"' + AND +\n NOT + 'Array.isArray(' + data + '))';\n case 'integer': return '(typeof ' + data + EQUAL + '\"number\"' + AND +\n NOT + '(' + data + ' % 1)' +\n AND + data + EQUAL + data +\n (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')';\n case 'number': return '(typeof ' + data + EQUAL + '\"' + dataType + '\"' +\n (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')';\n default: return 'typeof ' + data + EQUAL + '\"' + dataType + '\"';\n }\n}\n\n\nfunction checkDataTypes(dataTypes, data, strictNumbers) {\n switch (dataTypes.length) {\n case 1: return checkDataType(dataTypes[0], data, strictNumbers, true);\n default:\n var code = '';\n var types = toHash(dataTypes);\n if (types.array && types.object) {\n code = types.null ? '(': '(!' + data + ' || ';\n code += 'typeof ' + data + ' !== \"object\")';\n delete types.null;\n delete types.array;\n delete types.object;\n }\n if (types.number) delete types.integer;\n for (var t in types)\n code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true);\n\n return code;\n }\n}\n\n\nvar COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]);\nfunction coerceToTypes(optionCoerceTypes, dataTypes) {\n if (Array.isArray(dataTypes)) {\n var types = [];\n for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl);\n return paths[lvl - up];\n }\n\n if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl);\n data = 'data' + ((lvl - up) || '');\n if (!jsonPointer) return data;\n }\n\n var expr = data;\n var segments = jsonPointer.split('/');\n for (var i=0; i',\n $notOp = $isMax ? '>' : '<',\n $errorKeyword = undefined;\n if (!($isData || typeof $schema == 'number' || $schema === undefined)) {\n throw new Error($keyword + ' must be number');\n }\n if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) {\n throw new Error($exclusiveKeyword + ' must be number or boolean');\n }\n if ($isDataExcl) {\n var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),\n $exclusive = 'exclusive' + $lvl,\n $exclType = 'exclType' + $lvl,\n $exclIsNumber = 'exclIsNumber' + $lvl,\n $opExpr = 'op' + $lvl,\n $opStr = '\\' + ' + $opExpr + ' + \\'';\n out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';\n $schemaValueExcl = 'schemaExcl' + $lvl;\n out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \\'boolean\\' && ' + ($exclType) + ' != \\'undefined\\' && ' + ($exclType) + ' != \\'number\\') { ';\n var $errorKeyword = $exclusiveKeyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_exclusiveLimit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'' + ($exclusiveKeyword) + ' should be boolean\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' ' + ($exclType) + ' == \\'number\\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \\'' + ($op) + '\\' : \\'' + ($op) + '=\\'; ';\n if ($schema === undefined) {\n $errorKeyword = $exclusiveKeyword;\n $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;\n $schemaValue = $schemaValueExcl;\n $isData = $isDataExcl;\n }\n } else {\n var $exclIsNumber = typeof $schemaExcl == 'number',\n $opStr = $op;\n if ($exclIsNumber && $isData) {\n var $opExpr = '\\'' + $opStr + '\\'';\n out += ' if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { ';\n } else {\n if ($exclIsNumber && $schema === undefined) {\n $exclusive = true;\n $errorKeyword = $exclusiveKeyword;\n $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;\n $schemaValue = $schemaExcl;\n $notOp += '=';\n } else {\n if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);\n if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {\n $exclusive = true;\n $errorKeyword = $exclusiveKeyword;\n $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;\n $notOp += '=';\n } else {\n $exclusive = false;\n $opStr += '=';\n }\n }\n var $opExpr = '\\'' + $opStr + '\\'';\n out += ' if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { ';\n }\n }\n $errorKeyword = $errorKeyword || $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be ' + ($opStr) + ' ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue);\n } else {\n out += '' + ($schemaValue) + '\\'';\n }\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate__limitItems(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n if (!($isData || typeof $schema == 'number')) {\n throw new Error($keyword + ' must be number');\n }\n var $op = $keyword == 'maxItems' ? '>' : '<';\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { ';\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limitItems') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have ';\n if ($keyword == 'maxItems') {\n out += 'more';\n } else {\n out += 'fewer';\n }\n out += ' than ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + ($schema);\n }\n out += ' items\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate__limitLength(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n if (!($isData || typeof $schema == 'number')) {\n throw new Error($keyword + ' must be number');\n }\n var $op = $keyword == 'maxLength' ? '>' : '<';\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n if (it.opts.unicode === false) {\n out += ' ' + ($data) + '.length ';\n } else {\n out += ' ucs2length(' + ($data) + ') ';\n }\n out += ' ' + ($op) + ' ' + ($schemaValue) + ') { ';\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limitLength') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT be ';\n if ($keyword == 'maxLength') {\n out += 'longer';\n } else {\n out += 'shorter';\n }\n out += ' than ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + ($schema);\n }\n out += ' characters\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate__limitProperties(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n if (!($isData || typeof $schema == 'number')) {\n throw new Error($keyword + ' must be number');\n }\n var $op = $keyword == 'maxProperties' ? '>' : '<';\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { ';\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limitProperties') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have ';\n if ($keyword == 'maxProperties') {\n out += 'more';\n } else {\n out += 'fewer';\n }\n out += ' than ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + ($schema);\n }\n out += ' properties\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_allOf(it, $keyword, $ruleType) {\n var out = ' ';\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $currentBaseId = $it.baseId,\n $allSchemasEmpty = true;\n var arr1 = $schema;\n if (arr1) {\n var $sch, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $sch = arr1[$i += 1];\n if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {\n $allSchemasEmpty = false;\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n if ($breakOnError) {\n if ($allSchemasEmpty) {\n out += ' if (true) { ';\n } else {\n out += ' ' + ($closingBraces.slice(0, -1)) + ' ';\n }\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_anyOf(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $noEmptySchema = $schema.every(function($sch) {\n return (it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all));\n });\n if ($noEmptySchema) {\n var $currentBaseId = $it.baseId;\n out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n var arr1 = $schema;\n if (arr1) {\n var $sch, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $sch = arr1[$i += 1];\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { ';\n $closingBraces += '}';\n }\n }\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('anyOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match some schema in anyOf\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError(vErrors); ';\n } else {\n out += ' validate.errors = vErrors; return false; ';\n }\n }\n out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n if (it.opts.allErrors) {\n out += ' } ';\n }\n } else {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_comment(it, $keyword, $ruleType) {\n var out = ' ';\n var $schema = it.schema[$keyword];\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $comment = it.util.toQuotedString($schema);\n if (it.opts.$comment === true) {\n out += ' console.log(' + ($comment) + ');';\n } else if (typeof it.opts.$comment == 'function') {\n out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_const(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n if (!$isData) {\n out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';\n }\n out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('const') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be equal to constant\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' }';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_contains(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $idx = 'i' + $lvl,\n $dataNxt = $it.dataLevel = it.dataLevel + 1,\n $nextData = 'data' + $dataNxt,\n $currentBaseId = it.baseId,\n $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all));\n out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';\n if ($nonEmptySchema) {\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);\n var $passData = $data + '[' + $idx + ']';\n $it.dataPathArr[$dataNxt] = $idx;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n out += ' if (' + ($nextValid) + ') break; } ';\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {';\n } else {\n out += ' if (' + ($data) + '.length == 0) {';\n }\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('contains') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should contain a valid item\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { ';\n if ($nonEmptySchema) {\n out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n }\n if (it.opts.allErrors) {\n out += ' } ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_custom(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n var $rule = this,\n $definition = 'definition' + $lvl,\n $rDef = $rule.definition,\n $closingBraces = '';\n var $compile, $inline, $macro, $ruleValidate, $validateCode;\n if ($isData && $rDef.$data) {\n $validateCode = 'keywordValidate' + $lvl;\n var $validateSchema = $rDef.validateSchema;\n out += ' var ' + ($definition) + ' = RULES.custom[\\'' + ($keyword) + '\\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;';\n } else {\n $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);\n if (!$ruleValidate) return;\n $schemaValue = 'validate.schema' + $schemaPath;\n $validateCode = $ruleValidate.code;\n $compile = $rDef.compile;\n $inline = $rDef.inline;\n $macro = $rDef.macro;\n }\n var $ruleErrs = $validateCode + '.errors',\n $i = 'i' + $lvl,\n $ruleErr = 'ruleErr' + $lvl,\n $asyncKeyword = $rDef.async;\n if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema');\n if (!($inline || $macro)) {\n out += '' + ($ruleErrs) + ' = null;';\n }\n out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';\n if ($isData && $rDef.$data) {\n $closingBraces += '}';\n out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { ';\n if ($validateSchema) {\n $closingBraces += '}';\n out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { ';\n }\n }\n if ($inline) {\n if ($rDef.statements) {\n out += ' ' + ($ruleValidate.validate) + ' ';\n } else {\n out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; ';\n }\n } else if ($macro) {\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n $it.schema = $ruleValidate.validate;\n $it.schemaPath = '';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n var $code = it.validate($it).replace(/validate\\.schema/g, $validateCode);\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' ' + ($code);\n } else {\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = '';\n out += ' ' + ($validateCode) + '.call( ';\n if (it.opts.passContext) {\n out += 'this';\n } else {\n out += 'self';\n }\n if ($compile || $rDef.schema === false) {\n out += ' , ' + ($data) + ' ';\n } else {\n out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' ';\n }\n out += ' , (dataPath || \\'\\')';\n if (it.errorPath != '\"\"') {\n out += ' + ' + (it.errorPath);\n }\n var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',\n $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';\n out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) ';\n var def_callRuleValidate = out;\n out = $$outStack.pop();\n if ($rDef.errors === false) {\n out += ' ' + ($valid) + ' = ';\n if ($asyncKeyword) {\n out += 'await ';\n }\n out += '' + (def_callRuleValidate) + '; ';\n } else {\n if ($asyncKeyword) {\n $ruleErrs = 'customErrors' + $lvl;\n out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } ';\n } else {\n out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; ';\n }\n }\n }\n if ($rDef.modifying) {\n out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];';\n }\n out += '' + ($closingBraces);\n if ($rDef.valid) {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n } else {\n out += ' if ( ';\n if ($rDef.valid === undefined) {\n out += ' !';\n if ($macro) {\n out += '' + ($nextValid);\n } else {\n out += '' + ($valid);\n }\n } else {\n out += ' ' + (!$rDef.valid) + ' ';\n }\n out += ') { ';\n $errorKeyword = $rule.keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = '';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'custom') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \\'' + ($rule.keyword) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should pass \"' + ($rule.keyword) + '\" keyword validation\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n var def_customError = out;\n out = $$outStack.pop();\n if ($inline) {\n if ($rDef.errors) {\n if ($rDef.errors != 'full') {\n out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {\n out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';\n if ($ownProperties) {\n out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($property)) + '\\') ';\n }\n out += ') { ';\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + it.util.getProperty($property);\n $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n out += ' } ';\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_enum(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n var $i = 'i' + $lvl,\n $vSchema = 'schema' + $lvl;\n if (!$isData) {\n out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';';\n }\n out += 'var ' + ($valid) + ';';\n if ($isData) {\n out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';\n }\n out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }';\n if ($isData) {\n out += ' } ';\n }\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('enum') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be equal to one of the allowed values\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' }';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_format(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n if (it.opts.format === false) {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n return out;\n }\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n var $unknownFormats = it.opts.unknownFormats,\n $allowUnknown = Array.isArray($unknownFormats);\n if ($isData) {\n var $format = 'format' + $lvl,\n $isObject = 'isObject' + $lvl,\n $formatType = 'formatType' + $lvl;\n out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \\'object\\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \\'string\\'; if (' + ($isObject) + ') { ';\n if (it.async) {\n out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; ';\n }\n out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'string\\') || ';\n }\n out += ' (';\n if ($unknownFormats != 'ignore') {\n out += ' (' + ($schemaValue) + ' && !' + ($format) + ' ';\n if ($allowUnknown) {\n out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 ';\n }\n out += ') || ';\n }\n out += ' (' + ($format) + ' && ' + ($formatType) + ' == \\'' + ($ruleType) + '\\' && !(typeof ' + ($format) + ' == \\'function\\' ? ';\n if (it.async) {\n out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) ';\n } else {\n out += ' ' + ($format) + '(' + ($data) + ') ';\n }\n out += ' : ' + ($format) + '.test(' + ($data) + '))))) {';\n } else {\n var $format = it.formats[$schema];\n if (!$format) {\n if ($unknownFormats == 'ignore') {\n it.logger.warn('unknown format \"' + $schema + '\" ignored in schema at path \"' + it.errSchemaPath + '\"');\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n return out;\n } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n return out;\n } else {\n throw new Error('unknown format \"' + $schema + '\" is used in schema at path \"' + it.errSchemaPath + '\"');\n }\n }\n var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate;\n var $formatType = $isObject && $format.type || 'string';\n if ($isObject) {\n var $async = $format.async === true;\n $format = $format.validate;\n }\n if ($formatType != $ruleType) {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n return out;\n }\n if ($async) {\n if (!it.async) throw new Error('async format in sync schema');\n var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';\n out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { ';\n } else {\n out += ' if (! ';\n var $formatRef = 'formats' + it.util.getProperty($schema);\n if ($isObject) $formatRef += '.validate';\n if (typeof $format == 'function') {\n out += ' ' + ($formatRef) + '(' + ($data) + ') ';\n } else {\n out += ' ' + ($formatRef) + '.test(' + ($data) + ') ';\n }\n out += ') { ';\n }\n }\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('format') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: ';\n if ($isData) {\n out += '' + ($schemaValue);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match format \"';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + (it.util.escapeQuotes($schema));\n }\n out += '\"\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_if(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $thenSch = it.schema['then'],\n $elseSch = it.schema['else'],\n $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)),\n $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)),\n $currentBaseId = $it.baseId;\n if ($thenPresent || $elsePresent) {\n var $ifClause;\n $it.createErrors = false;\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n $it.createErrors = true;\n out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n it.compositeRule = $it.compositeRule = $wasComposite;\n if ($thenPresent) {\n out += ' if (' + ($nextValid) + ') { ';\n $it.schema = it.schema['then'];\n $it.schemaPath = it.schemaPath + '.then';\n $it.errSchemaPath = it.errSchemaPath + '/then';\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n out += ' ' + ($valid) + ' = ' + ($nextValid) + '; ';\n if ($thenPresent && $elsePresent) {\n $ifClause = 'ifClause' + $lvl;\n out += ' var ' + ($ifClause) + ' = \\'then\\'; ';\n } else {\n $ifClause = '\\'then\\'';\n }\n out += ' } ';\n if ($elsePresent) {\n out += ' else { ';\n }\n } else {\n out += ' if (!' + ($nextValid) + ') { ';\n }\n if ($elsePresent) {\n $it.schema = it.schema['else'];\n $it.schemaPath = it.schemaPath + '.else';\n $it.errSchemaPath = it.errSchemaPath + '/else';\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n out += ' ' + ($valid) + ' = ' + ($nextValid) + '; ';\n if ($thenPresent && $elsePresent) {\n $ifClause = 'ifClause' + $lvl;\n out += ' var ' + ($ifClause) + ' = \\'else\\'; ';\n } else {\n $ifClause = '\\'else\\'';\n }\n out += ' } ';\n }\n out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('if') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match \"\\' + ' + ($ifClause) + ' + \\'\" schema\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError(vErrors); ';\n } else {\n out += ' validate.errors = vErrors; return false; ';\n }\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n } else {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n }\n return out;\n}\n","'use strict';\n\n//all requires must be explicit because browserify won't work with dynamic requires\nmodule.exports = {\n '$ref': require('./ref'),\n allOf: require('./allOf'),\n anyOf: require('./anyOf'),\n '$comment': require('./comment'),\n const: require('./const'),\n contains: require('./contains'),\n dependencies: require('./dependencies'),\n 'enum': require('./enum'),\n format: require('./format'),\n 'if': require('./if'),\n items: require('./items'),\n maximum: require('./_limit'),\n minimum: require('./_limit'),\n maxItems: require('./_limitItems'),\n minItems: require('./_limitItems'),\n maxLength: require('./_limitLength'),\n minLength: require('./_limitLength'),\n maxProperties: require('./_limitProperties'),\n minProperties: require('./_limitProperties'),\n multipleOf: require('./multipleOf'),\n not: require('./not'),\n oneOf: require('./oneOf'),\n pattern: require('./pattern'),\n properties: require('./properties'),\n propertyNames: require('./propertyNames'),\n required: require('./required'),\n uniqueItems: require('./uniqueItems'),\n validate: require('./validate')\n};\n","'use strict';\nmodule.exports = function generate_items(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $idx = 'i' + $lvl,\n $dataNxt = $it.dataLevel = it.dataLevel + 1,\n $nextData = 'data' + $dataNxt,\n $currentBaseId = it.baseId;\n out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';\n if (Array.isArray($schema)) {\n var $additionalItems = it.schema.additionalItems;\n if ($additionalItems === false) {\n out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; ';\n var $currErrSchemaPath = $errSchemaPath;\n $errSchemaPath = it.errSchemaPath + '/additionalItems';\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('additionalItems') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have more than ' + ($schema.length) + ' items\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n $errSchemaPath = $currErrSchemaPath;\n if ($breakOnError) {\n $closingBraces += '}';\n out += ' else { ';\n }\n }\n var arr1 = $schema;\n if (arr1) {\n var $sch, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $sch = arr1[$i += 1];\n if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {\n out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { ';\n var $passData = $data + '[' + $i + ']';\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);\n $it.dataPathArr[$dataNxt] = $i;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) {\n $it.schema = $additionalItems;\n $it.schemaPath = it.schemaPath + '.additionalItems';\n $it.errSchemaPath = it.errSchemaPath + '/additionalItems';\n out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);\n var $passData = $data + '[' + $idx + ']';\n $it.dataPathArr[$dataNxt] = $idx;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!' + ($nextValid) + ') break; ';\n }\n out += ' } } ';\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) {\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);\n var $passData = $data + '[' + $idx + ']';\n $it.dataPathArr[$dataNxt] = $idx;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!' + ($nextValid) + ') break; ';\n }\n out += ' }';\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_multipleOf(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n if (!($isData || typeof $schema == 'number')) {\n throw new Error($keyword + ' must be number');\n }\n out += 'var division' + ($lvl) + ';if (';\n if ($isData) {\n out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \\'number\\' || ';\n }\n out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', ';\n if (it.opts.multipleOfPrecision) {\n out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' ';\n } else {\n out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') ';\n }\n out += ' ) ';\n if ($isData) {\n out += ' ) ';\n }\n out += ' ) { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('multipleOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be multiple of ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue);\n } else {\n out += '' + ($schemaValue) + '\\'';\n }\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_not(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) {\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n out += ' var ' + ($errs) + ' = errors; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n $it.createErrors = false;\n var $allErrorsOption;\n if ($it.opts.allErrors) {\n $allErrorsOption = $it.opts.allErrors;\n $it.opts.allErrors = false;\n }\n out += ' ' + (it.validate($it)) + ' ';\n $it.createErrors = true;\n if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' if (' + ($nextValid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('not') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT be valid\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n if (it.opts.allErrors) {\n out += ' } ';\n }\n } else {\n out += ' var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('not') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT be valid\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n if ($breakOnError) {\n out += ' if (false) { ';\n }\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_oneOf(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $currentBaseId = $it.baseId,\n $prevValid = 'prevValid' + $lvl,\n $passingSchemas = 'passingSchemas' + $lvl;\n out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n var arr1 = $schema;\n if (arr1) {\n var $sch, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $sch = arr1[$i += 1];\n if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n } else {\n out += ' var ' + ($nextValid) + ' = true; ';\n }\n if ($i) {\n out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { ';\n $closingBraces += '}';\n }\n out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }';\n }\n }\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('oneOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match exactly one schema in oneOf\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError(vErrors); ';\n } else {\n out += ' validate.errors = vErrors; return false; ';\n }\n }\n out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }';\n if (it.opts.allErrors) {\n out += ' } ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_pattern(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema);\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'string\\') || ';\n }\n out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('pattern') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: ';\n if ($isData) {\n out += '' + ($schemaValue);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match pattern \"';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + (it.util.escapeQuotes($schema));\n }\n out += '\"\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_properties(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $key = 'key' + $lvl,\n $idx = 'idx' + $lvl,\n $dataNxt = $it.dataLevel = it.dataLevel + 1,\n $nextData = 'data' + $dataNxt,\n $dataProperties = 'dataProperties' + $lvl;\n var $schemaKeys = Object.keys($schema || {}).filter(notProto),\n $pProperties = it.schema.patternProperties || {},\n $pPropertyKeys = Object.keys($pProperties).filter(notProto),\n $aProperties = it.schema.additionalProperties,\n $someProperties = $schemaKeys.length || $pPropertyKeys.length,\n $noAdditional = $aProperties === false,\n $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length,\n $removeAdditional = it.opts.removeAdditional,\n $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional,\n $ownProperties = it.opts.ownProperties,\n $currentBaseId = it.baseId;\n var $required = it.schema.required;\n if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) {\n var $requiredHash = it.util.toHash($required);\n }\n\n function notProto(p) {\n return p !== '__proto__';\n }\n out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;';\n if ($ownProperties) {\n out += ' var ' + ($dataProperties) + ' = undefined;';\n }\n if ($checkAdditional) {\n if ($ownProperties) {\n out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';\n } else {\n out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';\n }\n if ($someProperties) {\n out += ' var isAdditional' + ($lvl) + ' = !(false ';\n if ($schemaKeys.length) {\n if ($schemaKeys.length > 8) {\n out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') ';\n } else {\n var arr1 = $schemaKeys;\n if (arr1) {\n var $propertyKey, i1 = -1,\n l1 = arr1.length - 1;\n while (i1 < l1) {\n $propertyKey = arr1[i1 += 1];\n out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' ';\n }\n }\n }\n }\n if ($pPropertyKeys.length) {\n var arr2 = $pPropertyKeys;\n if (arr2) {\n var $pProperty, $i = -1,\n l2 = arr2.length - 1;\n while ($i < l2) {\n $pProperty = arr2[$i += 1];\n out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') ';\n }\n }\n }\n out += ' ); if (isAdditional' + ($lvl) + ') { ';\n }\n if ($removeAdditional == 'all') {\n out += ' delete ' + ($data) + '[' + ($key) + ']; ';\n } else {\n var $currentErrorPath = it.errorPath;\n var $additionalProperty = '\\' + ' + $key + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);\n }\n if ($noAdditional) {\n if ($removeAdditional) {\n out += ' delete ' + ($data) + '[' + ($key) + ']; ';\n } else {\n out += ' ' + ($nextValid) + ' = false; ';\n var $currErrSchemaPath = $errSchemaPath;\n $errSchemaPath = it.errSchemaPath + '/additionalProperties';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('additionalProperties') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \\'' + ($additionalProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is an invalid additional property';\n } else {\n out += 'should NOT have additional properties';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n $errSchemaPath = $currErrSchemaPath;\n if ($breakOnError) {\n out += ' break; ';\n }\n }\n } else if ($additionalIsSchema) {\n if ($removeAdditional == 'failing') {\n out += ' var ' + ($errs) + ' = errors; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n $it.schema = $aProperties;\n $it.schemaPath = it.schemaPath + '.additionalProperties';\n $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';\n $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);\n var $passData = $data + '[' + $key + ']';\n $it.dataPathArr[$dataNxt] = $key;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } ';\n it.compositeRule = $it.compositeRule = $wasComposite;\n } else {\n $it.schema = $aProperties;\n $it.schemaPath = it.schemaPath + '.additionalProperties';\n $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';\n $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);\n var $passData = $data + '[' + $key + ']';\n $it.dataPathArr[$dataNxt] = $key;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!' + ($nextValid) + ') break; ';\n }\n }\n }\n it.errorPath = $currentErrorPath;\n }\n if ($someProperties) {\n out += ' } ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n var $useDefaults = it.opts.useDefaults && !it.compositeRule;\n if ($schemaKeys.length) {\n var arr3 = $schemaKeys;\n if (arr3) {\n var $propertyKey, i3 = -1,\n l3 = arr3.length - 1;\n while (i3 < l3) {\n $propertyKey = arr3[i3 += 1];\n var $sch = $schema[$propertyKey];\n if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {\n var $prop = it.util.getProperty($propertyKey),\n $passData = $data + $prop,\n $hasDefault = $useDefaults && $sch.default !== undefined;\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + $prop;\n $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);\n $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);\n $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n $code = it.util.varReplace($code, $nextData, $passData);\n var $useData = $passData;\n } else {\n var $useData = $nextData;\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ';\n }\n if ($hasDefault) {\n out += ' ' + ($code) + ' ';\n } else {\n if ($requiredHash && $requiredHash[$propertyKey]) {\n out += ' if ( ' + ($useData) + ' === undefined ';\n if ($ownProperties) {\n out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($propertyKey)) + '\\') ';\n }\n out += ') { ' + ($nextValid) + ' = false; ';\n var $currentErrorPath = it.errorPath,\n $currErrSchemaPath = $errSchemaPath,\n $missingProperty = it.util.escapeQuotes($propertyKey);\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);\n }\n $errSchemaPath = it.errSchemaPath + '/required';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n $errSchemaPath = $currErrSchemaPath;\n it.errorPath = $currentErrorPath;\n out += ' } else { ';\n } else {\n if ($breakOnError) {\n out += ' if ( ' + ($useData) + ' === undefined ';\n if ($ownProperties) {\n out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($propertyKey)) + '\\') ';\n }\n out += ') { ' + ($nextValid) + ' = true; } else { ';\n } else {\n out += ' if (' + ($useData) + ' !== undefined ';\n if ($ownProperties) {\n out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($propertyKey)) + '\\') ';\n }\n out += ' ) { ';\n }\n }\n out += ' ' + ($code) + ' } ';\n }\n }\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n if ($pPropertyKeys.length) {\n var arr4 = $pPropertyKeys;\n if (arr4) {\n var $pProperty, i4 = -1,\n l4 = arr4.length - 1;\n while (i4 < l4) {\n $pProperty = arr4[i4 += 1];\n var $sch = $pProperties[$pProperty];\n if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {\n $it.schema = $sch;\n $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);\n $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);\n if ($ownProperties) {\n out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';\n } else {\n out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';\n }\n out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);\n var $passData = $data + '[' + $key + ']';\n $it.dataPathArr[$dataNxt] = $key;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!' + ($nextValid) + ') break; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else ' + ($nextValid) + ' = true; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_propertyNames(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n out += 'var ' + ($errs) + ' = errors;';\n if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) {\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n var $key = 'key' + $lvl,\n $idx = 'idx' + $lvl,\n $i = 'i' + $lvl,\n $invalidName = '\\' + ' + $key + ' + \\'',\n $dataNxt = $it.dataLevel = it.dataLevel + 1,\n $nextData = 'data' + $dataNxt,\n $dataProperties = 'dataProperties' + $lvl,\n $ownProperties = it.opts.ownProperties,\n $currentBaseId = it.baseId;\n if ($ownProperties) {\n out += ' var ' + ($dataProperties) + ' = undefined; ';\n }\n if ($ownProperties) {\n out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';\n } else {\n out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';\n }\n out += ' var startErrs' + ($lvl) + ' = errors; ';\n var $passData = $key;\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' 0) || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) {\n $required[$required.length] = $property;\n }\n }\n }\n } else {\n var $required = $schema;\n }\n }\n if ($isData || $required.length) {\n var $currentErrorPath = it.errorPath,\n $loopRequired = $isData || $required.length >= it.opts.loopRequired,\n $ownProperties = it.opts.ownProperties;\n if ($breakOnError) {\n out += ' var missing' + ($lvl) + '; ';\n if ($loopRequired) {\n if (!$isData) {\n out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';\n }\n var $i = 'i' + $lvl,\n $propertyPath = 'schema' + $lvl + '[' + $i + ']',\n $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);\n }\n out += ' var ' + ($valid) + ' = true; ';\n if ($isData) {\n out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';\n }\n out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined ';\n if ($ownProperties) {\n out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';\n }\n out += '; if (!' + ($valid) + ') break; } ';\n if ($isData) {\n out += ' } ';\n }\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { ';\n } else {\n out += ' if ( ';\n var arr2 = $required;\n if (arr2) {\n var $propertyKey, $i = -1,\n l2 = arr2.length - 1;\n while ($i < l2) {\n $propertyKey = arr2[$i += 1];\n if ($i) {\n out += ' || ';\n }\n var $prop = it.util.getProperty($propertyKey),\n $useData = $data + $prop;\n out += ' ( ( ' + ($useData) + ' === undefined ';\n if ($ownProperties) {\n out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($propertyKey)) + '\\') ';\n }\n out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) ';\n }\n }\n out += ') { ';\n var $propertyPath = 'missing' + $lvl,\n $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;\n }\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { ';\n }\n } else {\n if ($loopRequired) {\n if (!$isData) {\n out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';\n }\n var $i = 'i' + $lvl,\n $propertyPath = 'schema' + $lvl + '[' + $i + ']',\n $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);\n }\n if ($isData) {\n out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { ';\n }\n out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined ';\n if ($ownProperties) {\n out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';\n }\n out += ') { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ';\n if ($isData) {\n out += ' } ';\n }\n } else {\n var arr3 = $required;\n if (arr3) {\n var $propertyKey, i3 = -1,\n l3 = arr3.length - 1;\n while (i3 < l3) {\n $propertyKey = arr3[i3 += 1];\n var $prop = it.util.getProperty($propertyKey),\n $missingProperty = it.util.escapeQuotes($propertyKey),\n $useData = $data + $prop;\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);\n }\n out += ' if ( ' + ($useData) + ' === undefined ';\n if ($ownProperties) {\n out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($propertyKey)) + '\\') ';\n }\n out += ') { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';\n }\n }\n }\n }\n it.errorPath = $currentErrorPath;\n } else if ($breakOnError) {\n out += ' if (true) {';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_uniqueItems(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n if (($schema || $isData) && it.opts.uniqueItems !== false) {\n if ($isData) {\n out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \\'boolean\\') ' + ($valid) + ' = false; else { ';\n }\n out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { ';\n var $itemType = it.schema.items && it.schema.items.type,\n $typeIsArray = Array.isArray($itemType);\n if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) {\n out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } ';\n } else {\n out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; ';\n var $method = 'checkDataType' + ($typeIsArray ? 's' : '');\n out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; ';\n if ($typeIsArray) {\n out += ' if (typeof item == \\'string\\') item = \\'\"\\' + item; ';\n }\n out += ' if (typeof itemIndices[item] == \\'number\\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } ';\n }\n out += ' } ';\n if ($isData) {\n out += ' } ';\n }\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('uniqueItems') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have duplicate items (items ## \\' + j + \\' and \\' + i + \\' are identical)\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n } else {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_validate(it, $keyword, $ruleType) {\n var out = '';\n var $async = it.schema.$async === true,\n $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'),\n $id = it.self._getId(it.schema);\n if (it.opts.strictKeywords) {\n var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords);\n if ($unknownKwd) {\n var $keywordsMsg = 'unknown keyword: ' + $unknownKwd;\n if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg);\n else throw new Error($keywordsMsg);\n }\n }\n if (it.isTop) {\n out += ' var validate = ';\n if ($async) {\n it.async = true;\n out += 'async ';\n }\n out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \\'use strict\\'; ';\n if ($id && (it.opts.sourceCode || it.opts.processCode)) {\n out += ' ' + ('/\\*# sourceURL=' + $id + ' */') + ' ';\n }\n }\n if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) {\n var $keyword = 'false schema';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n if (it.schema === false) {\n if (it.isTop) {\n $breakOnError = true;\n } else {\n out += ' var ' + ($valid) + ' = false; ';\n }\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'false schema') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'boolean schema is false\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n } else {\n if (it.isTop) {\n if ($async) {\n out += ' return data; ';\n } else {\n out += ' validate.errors = null; return true; ';\n }\n } else {\n out += ' var ' + ($valid) + ' = true; ';\n }\n }\n if (it.isTop) {\n out += ' }; return validate; ';\n }\n return out;\n }\n if (it.isTop) {\n var $top = it.isTop,\n $lvl = it.level = 0,\n $dataLvl = it.dataLevel = 0,\n $data = 'data';\n it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema));\n it.baseId = it.baseId || it.rootId;\n delete it.isTop;\n it.dataPathArr = [\"\"];\n if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) {\n var $defaultMsg = 'default is ignored in the schema root';\n if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);\n else throw new Error($defaultMsg);\n }\n out += ' var vErrors = null; ';\n out += ' var errors = 0; ';\n out += ' if (rootData === undefined) rootData = data; ';\n } else {\n var $lvl = it.level,\n $dataLvl = it.dataLevel,\n $data = 'data' + ($dataLvl || '');\n if ($id) it.baseId = it.resolve.url(it.baseId, $id);\n if ($async && !it.async) throw new Error('async schema in sync schema');\n out += ' var errs_' + ($lvl) + ' = errors;';\n }\n var $valid = 'valid' + $lvl,\n $breakOnError = !it.opts.allErrors,\n $closingBraces1 = '',\n $closingBraces2 = '';\n var $errorKeyword;\n var $typeSchema = it.schema.type,\n $typeIsArray = Array.isArray($typeSchema);\n if ($typeSchema && it.opts.nullable && it.schema.nullable === true) {\n if ($typeIsArray) {\n if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null');\n } else if ($typeSchema != 'null') {\n $typeSchema = [$typeSchema, 'null'];\n $typeIsArray = true;\n }\n }\n if ($typeIsArray && $typeSchema.length == 1) {\n $typeSchema = $typeSchema[0];\n $typeIsArray = false;\n }\n if (it.schema.$ref && $refKeywords) {\n if (it.opts.extendRefs == 'fail') {\n throw new Error('$ref: validation keywords used in schema at path \"' + it.errSchemaPath + '\" (see option extendRefs)');\n } else if (it.opts.extendRefs !== true) {\n $refKeywords = false;\n it.logger.warn('$ref: keywords ignored in schema at path \"' + it.errSchemaPath + '\"');\n }\n }\n if (it.schema.$comment && it.opts.$comment) {\n out += ' ' + (it.RULES.all.$comment.code(it, '$comment'));\n }\n if ($typeSchema) {\n if (it.opts.coerceTypes) {\n var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema);\n }\n var $rulesGroup = it.RULES.types[$typeSchema];\n if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) {\n var $schemaPath = it.schemaPath + '.type',\n $errSchemaPath = it.errSchemaPath + '/type';\n var $schemaPath = it.schemaPath + '.type',\n $errSchemaPath = it.errSchemaPath + '/type',\n $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';\n out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { ';\n if ($coerceToTypes) {\n var $dataType = 'dataType' + $lvl,\n $coerced = 'coerced' + $lvl;\n out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; ';\n if (it.opts.coerceTypes == 'array') {\n out += ' if (' + ($dataType) + ' == \\'object\\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } ';\n }\n out += ' if (' + ($coerced) + ' !== undefined) ; ';\n var arr1 = $coerceToTypes;\n if (arr1) {\n var $type, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $type = arr1[$i += 1];\n if ($type == 'string') {\n out += ' else if (' + ($dataType) + ' == \\'number\\' || ' + ($dataType) + ' == \\'boolean\\') ' + ($coerced) + ' = \\'\\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \\'\\'; ';\n } else if ($type == 'number' || $type == 'integer') {\n out += ' else if (' + ($dataType) + ' == \\'boolean\\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \\'string\\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' ';\n if ($type == 'integer') {\n out += ' && !(' + ($data) + ' % 1)';\n }\n out += ')) ' + ($coerced) + ' = +' + ($data) + '; ';\n } else if ($type == 'boolean') {\n out += ' else if (' + ($data) + ' === \\'false\\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \\'true\\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; ';\n } else if ($type == 'null') {\n out += ' else if (' + ($data) + ' === \\'\\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; ';\n } else if (it.opts.coerceTypes == 'array' && $type == 'array') {\n out += ' else if (' + ($dataType) + ' == \\'string\\' || ' + ($dataType) + ' == \\'number\\' || ' + ($dataType) + ' == \\'boolean\\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; ';\n }\n }\n }\n out += ' else { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'type') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \\'';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be ';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } if (' + ($coerced) + ' !== undefined) { ';\n var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',\n $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';\n out += ' ' + ($data) + ' = ' + ($coerced) + '; ';\n if (!$dataLvl) {\n out += 'if (' + ($parentData) + ' !== undefined)';\n }\n out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } ';\n } else {\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'type') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \\'';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be ';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n }\n out += ' } ';\n }\n }\n if (it.schema.$ref && !$refKeywords) {\n out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' ';\n if ($breakOnError) {\n out += ' } if (errors === ';\n if ($top) {\n out += '0';\n } else {\n out += 'errs_' + ($lvl);\n }\n out += ') { ';\n $closingBraces2 += '}';\n }\n } else {\n var arr2 = it.RULES;\n if (arr2) {\n var $rulesGroup, i2 = -1,\n l2 = arr2.length - 1;\n while (i2 < l2) {\n $rulesGroup = arr2[i2 += 1];\n if ($shouldUseGroup($rulesGroup)) {\n if ($rulesGroup.type) {\n out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers)) + ') { ';\n }\n if (it.opts.useDefaults) {\n if ($rulesGroup.type == 'object' && it.schema.properties) {\n var $schema = it.schema.properties,\n $schemaKeys = Object.keys($schema);\n var arr3 = $schemaKeys;\n if (arr3) {\n var $propertyKey, i3 = -1,\n l3 = arr3.length - 1;\n while (i3 < l3) {\n $propertyKey = arr3[i3 += 1];\n var $sch = $schema[$propertyKey];\n if ($sch.default !== undefined) {\n var $passData = $data + it.util.getProperty($propertyKey);\n if (it.compositeRule) {\n if (it.opts.strictDefaults) {\n var $defaultMsg = 'default is ignored for: ' + $passData;\n if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);\n else throw new Error($defaultMsg);\n }\n } else {\n out += ' if (' + ($passData) + ' === undefined ';\n if (it.opts.useDefaults == 'empty') {\n out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \\'\\' ';\n }\n out += ' ) ' + ($passData) + ' = ';\n if (it.opts.useDefaults == 'shared') {\n out += ' ' + (it.useDefault($sch.default)) + ' ';\n } else {\n out += ' ' + (JSON.stringify($sch.default)) + ' ';\n }\n out += '; ';\n }\n }\n }\n }\n } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) {\n var arr4 = it.schema.items;\n if (arr4) {\n var $sch, $i = -1,\n l4 = arr4.length - 1;\n while ($i < l4) {\n $sch = arr4[$i += 1];\n if ($sch.default !== undefined) {\n var $passData = $data + '[' + $i + ']';\n if (it.compositeRule) {\n if (it.opts.strictDefaults) {\n var $defaultMsg = 'default is ignored for: ' + $passData;\n if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);\n else throw new Error($defaultMsg);\n }\n } else {\n out += ' if (' + ($passData) + ' === undefined ';\n if (it.opts.useDefaults == 'empty') {\n out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \\'\\' ';\n }\n out += ' ) ' + ($passData) + ' = ';\n if (it.opts.useDefaults == 'shared') {\n out += ' ' + (it.useDefault($sch.default)) + ' ';\n } else {\n out += ' ' + (JSON.stringify($sch.default)) + ' ';\n }\n out += '; ';\n }\n }\n }\n }\n }\n }\n var arr5 = $rulesGroup.rules;\n if (arr5) {\n var $rule, i5 = -1,\n l5 = arr5.length - 1;\n while (i5 < l5) {\n $rule = arr5[i5 += 1];\n if ($shouldUseRule($rule)) {\n var $code = $rule.code(it, $rule.keyword, $rulesGroup.type);\n if ($code) {\n out += ' ' + ($code) + ' ';\n if ($breakOnError) {\n $closingBraces1 += '}';\n }\n }\n }\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces1) + ' ';\n $closingBraces1 = '';\n }\n if ($rulesGroup.type) {\n out += ' } ';\n if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) {\n out += ' else { ';\n var $schemaPath = it.schemaPath + '.type',\n $errSchemaPath = it.errSchemaPath + '/type';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'type') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \\'';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be ';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n }\n }\n if ($breakOnError) {\n out += ' if (errors === ';\n if ($top) {\n out += '0';\n } else {\n out += 'errs_' + ($lvl);\n }\n out += ') { ';\n $closingBraces2 += '}';\n }\n }\n }\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces2) + ' ';\n }\n if ($top) {\n if ($async) {\n out += ' if (errors === 0) return data; ';\n out += ' else throw new ValidationError(vErrors); ';\n } else {\n out += ' validate.errors = vErrors; ';\n out += ' return errors === 0; ';\n }\n out += ' }; return validate;';\n } else {\n out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';';\n }\n\n function $shouldUseGroup($rulesGroup) {\n var rules = $rulesGroup.rules;\n for (var i = 0; i < rules.length; i++)\n if ($shouldUseRule(rules[i])) return true;\n }\n\n function $shouldUseRule($rule) {\n return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule));\n }\n\n function $ruleImplementsSomeKeyword($rule) {\n var impl = $rule.implements;\n for (var i = 0; i < impl.length; i++)\n if (it.schema[impl[i]] !== undefined) return true;\n }\n return out;\n}\n","'use strict';\n\nvar IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;\nvar customRuleCode = require('./dotjs/custom');\nvar definitionSchema = require('./definition_schema');\n\nmodule.exports = {\n add: addKeyword,\n get: getKeyword,\n remove: removeKeyword,\n validate: validateKeyword\n};\n\n\n/**\n * Define custom keyword\n * @this Ajv\n * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords).\n * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.\n * @return {Ajv} this for method chaining\n */\nfunction addKeyword(keyword, definition) {\n /* jshint validthis: true */\n /* eslint no-shadow: 0 */\n var RULES = this.RULES;\n if (RULES.keywords[keyword])\n throw new Error('Keyword ' + keyword + ' is already defined');\n\n if (!IDENTIFIER.test(keyword))\n throw new Error('Keyword ' + keyword + ' is not a valid identifier');\n\n if (definition) {\n this.validateKeyword(definition, true);\n\n var dataType = definition.type;\n if (Array.isArray(dataType)) {\n for (var i=0; i All rights reserved.\n\n\nmodule.exports = {\n\n newInvalidAsn1Error: function (msg) {\n var e = new Error();\n e.name = 'InvalidAsn1Error';\n e.message = msg || '';\n return e;\n }\n\n};\n","// Copyright 2011 Mark Cavage All rights reserved.\n\nvar errors = require('./errors');\nvar types = require('./types');\n\nvar Reader = require('./reader');\nvar Writer = require('./writer');\n\n\n// --- Exports\n\nmodule.exports = {\n\n Reader: Reader,\n\n Writer: Writer\n\n};\n\nfor (var t in types) {\n if (types.hasOwnProperty(t))\n module.exports[t] = types[t];\n}\nfor (var e in errors) {\n if (errors.hasOwnProperty(e))\n module.exports[e] = errors[e];\n}\n","// Copyright 2011 Mark Cavage All rights reserved.\n\nvar assert = require('assert');\nvar Buffer = require('safer-buffer').Buffer;\n\nvar ASN1 = require('./types');\nvar errors = require('./errors');\n\n\n// --- Globals\n\nvar newInvalidAsn1Error = errors.newInvalidAsn1Error;\n\n\n\n// --- API\n\nfunction Reader(data) {\n if (!data || !Buffer.isBuffer(data))\n throw new TypeError('data must be a node Buffer');\n\n this._buf = data;\n this._size = data.length;\n\n // These hold the \"current\" state\n this._len = 0;\n this._offset = 0;\n}\n\nObject.defineProperty(Reader.prototype, 'length', {\n enumerable: true,\n get: function () { return (this._len); }\n});\n\nObject.defineProperty(Reader.prototype, 'offset', {\n enumerable: true,\n get: function () { return (this._offset); }\n});\n\nObject.defineProperty(Reader.prototype, 'remain', {\n get: function () { return (this._size - this._offset); }\n});\n\nObject.defineProperty(Reader.prototype, 'buffer', {\n get: function () { return (this._buf.slice(this._offset)); }\n});\n\n\n/**\n * Reads a single byte and advances offset; you can pass in `true` to make this\n * a \"peek\" operation (i.e., get the byte, but don't advance the offset).\n *\n * @param {Boolean} peek true means don't move offset.\n * @return {Number} the next byte, null if not enough data.\n */\nReader.prototype.readByte = function (peek) {\n if (this._size - this._offset < 1)\n return null;\n\n var b = this._buf[this._offset] & 0xff;\n\n if (!peek)\n this._offset += 1;\n\n return b;\n};\n\n\nReader.prototype.peek = function () {\n return this.readByte(true);\n};\n\n\n/**\n * Reads a (potentially) variable length off the BER buffer. This call is\n * not really meant to be called directly, as callers have to manipulate\n * the internal buffer afterwards.\n *\n * As a result of this call, you can call `Reader.length`, until the\n * next thing called that does a readLength.\n *\n * @return {Number} the amount of offset to advance the buffer.\n * @throws {InvalidAsn1Error} on bad ASN.1\n */\nReader.prototype.readLength = function (offset) {\n if (offset === undefined)\n offset = this._offset;\n\n if (offset >= this._size)\n return null;\n\n var lenB = this._buf[offset++] & 0xff;\n if (lenB === null)\n return null;\n\n if ((lenB & 0x80) === 0x80) {\n lenB &= 0x7f;\n\n if (lenB === 0)\n throw newInvalidAsn1Error('Indefinite length not supported');\n\n if (lenB > 4)\n throw newInvalidAsn1Error('encoding too long');\n\n if (this._size - offset < lenB)\n return null;\n\n this._len = 0;\n for (var i = 0; i < lenB; i++)\n this._len = (this._len << 8) + (this._buf[offset++] & 0xff);\n\n } else {\n // Wasn't a variable length\n this._len = lenB;\n }\n\n return offset;\n};\n\n\n/**\n * Parses the next sequence in this BER buffer.\n *\n * To get the length of the sequence, call `Reader.length`.\n *\n * @return {Number} the sequence's tag.\n */\nReader.prototype.readSequence = function (tag) {\n var seq = this.peek();\n if (seq === null)\n return null;\n if (tag !== undefined && tag !== seq)\n throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +\n ': got 0x' + seq.toString(16));\n\n var o = this.readLength(this._offset + 1); // stored in `length`\n if (o === null)\n return null;\n\n this._offset = o;\n return seq;\n};\n\n\nReader.prototype.readInt = function () {\n return this._readTag(ASN1.Integer);\n};\n\n\nReader.prototype.readBoolean = function () {\n return (this._readTag(ASN1.Boolean) === 0 ? false : true);\n};\n\n\nReader.prototype.readEnumeration = function () {\n return this._readTag(ASN1.Enumeration);\n};\n\n\nReader.prototype.readString = function (tag, retbuf) {\n if (!tag)\n tag = ASN1.OctetString;\n\n var b = this.peek();\n if (b === null)\n return null;\n\n if (b !== tag)\n throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +\n ': got 0x' + b.toString(16));\n\n var o = this.readLength(this._offset + 1); // stored in `length`\n\n if (o === null)\n return null;\n\n if (this.length > this._size - o)\n return null;\n\n this._offset = o;\n\n if (this.length === 0)\n return retbuf ? Buffer.alloc(0) : '';\n\n var str = this._buf.slice(this._offset, this._offset + this.length);\n this._offset += this.length;\n\n return retbuf ? str : str.toString('utf8');\n};\n\nReader.prototype.readOID = function (tag) {\n if (!tag)\n tag = ASN1.OID;\n\n var b = this.readString(tag, true);\n if (b === null)\n return null;\n\n var values = [];\n var value = 0;\n\n for (var i = 0; i < b.length; i++) {\n var byte = b[i] & 0xff;\n\n value <<= 7;\n value += byte & 0x7f;\n if ((byte & 0x80) === 0) {\n values.push(value);\n value = 0;\n }\n }\n\n value = values.shift();\n values.unshift(value % 40);\n values.unshift((value / 40) >> 0);\n\n return values.join('.');\n};\n\n\nReader.prototype._readTag = function (tag) {\n assert.ok(tag !== undefined);\n\n var b = this.peek();\n\n if (b === null)\n return null;\n\n if (b !== tag)\n throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +\n ': got 0x' + b.toString(16));\n\n var o = this.readLength(this._offset + 1); // stored in `length`\n if (o === null)\n return null;\n\n if (this.length > 4)\n throw newInvalidAsn1Error('Integer too long: ' + this.length);\n\n if (this.length > this._size - o)\n return null;\n this._offset = o;\n\n var fb = this._buf[this._offset];\n var value = 0;\n\n for (var i = 0; i < this.length; i++) {\n value <<= 8;\n value |= (this._buf[this._offset++] & 0xff);\n }\n\n if ((fb & 0x80) === 0x80 && i !== 4)\n value -= (1 << (i * 8));\n\n return value >> 0;\n};\n\n\n\n// --- Exported API\n\nmodule.exports = Reader;\n","// Copyright 2011 Mark Cavage All rights reserved.\n\n\nmodule.exports = {\n EOC: 0,\n Boolean: 1,\n Integer: 2,\n BitString: 3,\n OctetString: 4,\n Null: 5,\n OID: 6,\n ObjectDescriptor: 7,\n External: 8,\n Real: 9, // float\n Enumeration: 10,\n PDV: 11,\n Utf8String: 12,\n RelativeOID: 13,\n Sequence: 16,\n Set: 17,\n NumericString: 18,\n PrintableString: 19,\n T61String: 20,\n VideotexString: 21,\n IA5String: 22,\n UTCTime: 23,\n GeneralizedTime: 24,\n GraphicString: 25,\n VisibleString: 26,\n GeneralString: 28,\n UniversalString: 29,\n CharacterString: 30,\n BMPString: 31,\n Constructor: 32,\n Context: 128\n};\n","// Copyright 2011 Mark Cavage All rights reserved.\n\nvar assert = require('assert');\nvar Buffer = require('safer-buffer').Buffer;\nvar ASN1 = require('./types');\nvar errors = require('./errors');\n\n\n// --- Globals\n\nvar newInvalidAsn1Error = errors.newInvalidAsn1Error;\n\nvar DEFAULT_OPTS = {\n size: 1024,\n growthFactor: 8\n};\n\n\n// --- Helpers\n\nfunction merge(from, to) {\n assert.ok(from);\n assert.equal(typeof (from), 'object');\n assert.ok(to);\n assert.equal(typeof (to), 'object');\n\n var keys = Object.getOwnPropertyNames(from);\n keys.forEach(function (key) {\n if (to[key])\n return;\n\n var value = Object.getOwnPropertyDescriptor(from, key);\n Object.defineProperty(to, key, value);\n });\n\n return to;\n}\n\n\n\n// --- API\n\nfunction Writer(options) {\n options = merge(DEFAULT_OPTS, options || {});\n\n this._buf = Buffer.alloc(options.size || 1024);\n this._size = this._buf.length;\n this._offset = 0;\n this._options = options;\n\n // A list of offsets in the buffer where we need to insert\n // sequence tag/len pairs.\n this._seq = [];\n}\n\nObject.defineProperty(Writer.prototype, 'buffer', {\n get: function () {\n if (this._seq.length)\n throw newInvalidAsn1Error(this._seq.length + ' unended sequence(s)');\n\n return (this._buf.slice(0, this._offset));\n }\n});\n\nWriter.prototype.writeByte = function (b) {\n if (typeof (b) !== 'number')\n throw new TypeError('argument must be a Number');\n\n this._ensure(1);\n this._buf[this._offset++] = b;\n};\n\n\nWriter.prototype.writeInt = function (i, tag) {\n if (typeof (i) !== 'number')\n throw new TypeError('argument must be a Number');\n if (typeof (tag) !== 'number')\n tag = ASN1.Integer;\n\n var sz = 4;\n\n while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000 >> 0)) &&\n (sz > 1)) {\n sz--;\n i <<= 8;\n }\n\n if (sz > 4)\n throw newInvalidAsn1Error('BER ints cannot be > 0xffffffff');\n\n this._ensure(2 + sz);\n this._buf[this._offset++] = tag;\n this._buf[this._offset++] = sz;\n\n while (sz-- > 0) {\n this._buf[this._offset++] = ((i & 0xff000000) >>> 24);\n i <<= 8;\n }\n\n};\n\n\nWriter.prototype.writeNull = function () {\n this.writeByte(ASN1.Null);\n this.writeByte(0x00);\n};\n\n\nWriter.prototype.writeEnumeration = function (i, tag) {\n if (typeof (i) !== 'number')\n throw new TypeError('argument must be a Number');\n if (typeof (tag) !== 'number')\n tag = ASN1.Enumeration;\n\n return this.writeInt(i, tag);\n};\n\n\nWriter.prototype.writeBoolean = function (b, tag) {\n if (typeof (b) !== 'boolean')\n throw new TypeError('argument must be a Boolean');\n if (typeof (tag) !== 'number')\n tag = ASN1.Boolean;\n\n this._ensure(3);\n this._buf[this._offset++] = tag;\n this._buf[this._offset++] = 0x01;\n this._buf[this._offset++] = b ? 0xff : 0x00;\n};\n\n\nWriter.prototype.writeString = function (s, tag) {\n if (typeof (s) !== 'string')\n throw new TypeError('argument must be a string (was: ' + typeof (s) + ')');\n if (typeof (tag) !== 'number')\n tag = ASN1.OctetString;\n\n var len = Buffer.byteLength(s);\n this.writeByte(tag);\n this.writeLength(len);\n if (len) {\n this._ensure(len);\n this._buf.write(s, this._offset);\n this._offset += len;\n }\n};\n\n\nWriter.prototype.writeBuffer = function (buf, tag) {\n if (typeof (tag) !== 'number')\n throw new TypeError('tag must be a number');\n if (!Buffer.isBuffer(buf))\n throw new TypeError('argument must be a buffer');\n\n this.writeByte(tag);\n this.writeLength(buf.length);\n this._ensure(buf.length);\n buf.copy(this._buf, this._offset, 0, buf.length);\n this._offset += buf.length;\n};\n\n\nWriter.prototype.writeStringArray = function (strings) {\n if ((!strings instanceof Array))\n throw new TypeError('argument must be an Array[String]');\n\n var self = this;\n strings.forEach(function (s) {\n self.writeString(s);\n });\n};\n\n// This is really to solve DER cases, but whatever for now\nWriter.prototype.writeOID = function (s, tag) {\n if (typeof (s) !== 'string')\n throw new TypeError('argument must be a string');\n if (typeof (tag) !== 'number')\n tag = ASN1.OID;\n\n if (!/^([0-9]+\\.){3,}[0-9]+$/.test(s))\n throw new Error('argument is not a valid OID string');\n\n function encodeOctet(bytes, octet) {\n if (octet < 128) {\n bytes.push(octet);\n } else if (octet < 16384) {\n bytes.push((octet >>> 7) | 0x80);\n bytes.push(octet & 0x7F);\n } else if (octet < 2097152) {\n bytes.push((octet >>> 14) | 0x80);\n bytes.push(((octet >>> 7) | 0x80) & 0xFF);\n bytes.push(octet & 0x7F);\n } else if (octet < 268435456) {\n bytes.push((octet >>> 21) | 0x80);\n bytes.push(((octet >>> 14) | 0x80) & 0xFF);\n bytes.push(((octet >>> 7) | 0x80) & 0xFF);\n bytes.push(octet & 0x7F);\n } else {\n bytes.push(((octet >>> 28) | 0x80) & 0xFF);\n bytes.push(((octet >>> 21) | 0x80) & 0xFF);\n bytes.push(((octet >>> 14) | 0x80) & 0xFF);\n bytes.push(((octet >>> 7) | 0x80) & 0xFF);\n bytes.push(octet & 0x7F);\n }\n }\n\n var tmp = s.split('.');\n var bytes = [];\n bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10));\n tmp.slice(2).forEach(function (b) {\n encodeOctet(bytes, parseInt(b, 10));\n });\n\n var self = this;\n this._ensure(2 + bytes.length);\n this.writeByte(tag);\n this.writeLength(bytes.length);\n bytes.forEach(function (b) {\n self.writeByte(b);\n });\n};\n\n\nWriter.prototype.writeLength = function (len) {\n if (typeof (len) !== 'number')\n throw new TypeError('argument must be a Number');\n\n this._ensure(4);\n\n if (len <= 0x7f) {\n this._buf[this._offset++] = len;\n } else if (len <= 0xff) {\n this._buf[this._offset++] = 0x81;\n this._buf[this._offset++] = len;\n } else if (len <= 0xffff) {\n this._buf[this._offset++] = 0x82;\n this._buf[this._offset++] = len >> 8;\n this._buf[this._offset++] = len;\n } else if (len <= 0xffffff) {\n this._buf[this._offset++] = 0x83;\n this._buf[this._offset++] = len >> 16;\n this._buf[this._offset++] = len >> 8;\n this._buf[this._offset++] = len;\n } else {\n throw newInvalidAsn1Error('Length too long (> 4 bytes)');\n }\n};\n\nWriter.prototype.startSequence = function (tag) {\n if (typeof (tag) !== 'number')\n tag = ASN1.Sequence | ASN1.Constructor;\n\n this.writeByte(tag);\n this._seq.push(this._offset);\n this._ensure(3);\n this._offset += 3;\n};\n\n\nWriter.prototype.endSequence = function () {\n var seq = this._seq.pop();\n var start = seq + 3;\n var len = this._offset - start;\n\n if (len <= 0x7f) {\n this._shift(start, len, -2);\n this._buf[seq] = len;\n } else if (len <= 0xff) {\n this._shift(start, len, -1);\n this._buf[seq] = 0x81;\n this._buf[seq + 1] = len;\n } else if (len <= 0xffff) {\n this._buf[seq] = 0x82;\n this._buf[seq + 1] = len >> 8;\n this._buf[seq + 2] = len;\n } else if (len <= 0xffffff) {\n this._shift(start, len, 1);\n this._buf[seq] = 0x83;\n this._buf[seq + 1] = len >> 16;\n this._buf[seq + 2] = len >> 8;\n this._buf[seq + 3] = len;\n } else {\n throw newInvalidAsn1Error('Sequence too long');\n }\n};\n\n\nWriter.prototype._shift = function (start, len, shift) {\n assert.ok(start !== undefined);\n assert.ok(len !== undefined);\n assert.ok(shift);\n\n this._buf.copy(this._buf, start + shift, start, start + len);\n this._offset += shift;\n};\n\nWriter.prototype._ensure = function (len) {\n assert.ok(len);\n\n if (this._size - this._offset < len) {\n var sz = this._size * this._options.growthFactor;\n if (sz - this._offset < len)\n sz += len;\n\n var buf = Buffer.alloc(sz);\n\n this._buf.copy(buf, 0, 0, this._offset);\n this._buf = buf;\n this._size = sz;\n }\n};\n\n\n\n// --- Exported API\n\nmodule.exports = Writer;\n","// Copyright 2011 Mark Cavage All rights reserved.\n\n// If you have no idea what ASN.1 or BER is, see this:\n// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc\n\nvar Ber = require('./ber/index');\n\n\n\n// --- Exported API\n\nmodule.exports = {\n\n Ber: Ber,\n\n BerReader: Ber.Reader,\n\n BerWriter: Ber.Writer\n\n};\n","// Copyright (c) 2012, Mark Cavage. All rights reserved.\n// Copyright 2015 Joyent, Inc.\n\nvar assert = require('assert');\nvar Stream = require('stream').Stream;\nvar util = require('util');\n\n\n///--- Globals\n\n/* JSSTYLED */\nvar UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;\n\n\n///--- Internal\n\nfunction _capitalize(str) {\n return (str.charAt(0).toUpperCase() + str.slice(1));\n}\n\nfunction _toss(name, expected, oper, arg, actual) {\n throw new assert.AssertionError({\n message: util.format('%s (%s) is required', name, expected),\n actual: (actual === undefined) ? typeof (arg) : actual(arg),\n expected: expected,\n operator: oper || '===',\n stackStartFunction: _toss.caller\n });\n}\n\nfunction _getClass(arg) {\n return (Object.prototype.toString.call(arg).slice(8, -1));\n}\n\nfunction noop() {\n // Why even bother with asserts?\n}\n\n\n///--- Exports\n\nvar types = {\n bool: {\n check: function (arg) { return typeof (arg) === 'boolean'; }\n },\n func: {\n check: function (arg) { return typeof (arg) === 'function'; }\n },\n string: {\n check: function (arg) { return typeof (arg) === 'string'; }\n },\n object: {\n check: function (arg) {\n return typeof (arg) === 'object' && arg !== null;\n }\n },\n number: {\n check: function (arg) {\n return typeof (arg) === 'number' && !isNaN(arg);\n }\n },\n finite: {\n check: function (arg) {\n return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg);\n }\n },\n buffer: {\n check: function (arg) { return Buffer.isBuffer(arg); },\n operator: 'Buffer.isBuffer'\n },\n array: {\n check: function (arg) { return Array.isArray(arg); },\n operator: 'Array.isArray'\n },\n stream: {\n check: function (arg) { return arg instanceof Stream; },\n operator: 'instanceof',\n actual: _getClass\n },\n date: {\n check: function (arg) { return arg instanceof Date; },\n operator: 'instanceof',\n actual: _getClass\n },\n regexp: {\n check: function (arg) { return arg instanceof RegExp; },\n operator: 'instanceof',\n actual: _getClass\n },\n uuid: {\n check: function (arg) {\n return typeof (arg) === 'string' && UUID_REGEXP.test(arg);\n },\n operator: 'isUUID'\n }\n};\n\nfunction _setExports(ndebug) {\n var keys = Object.keys(types);\n var out;\n\n /* re-export standard assert */\n if (process.env.NODE_NDEBUG) {\n out = noop;\n } else {\n out = function (arg, msg) {\n if (!arg) {\n _toss(msg, 'true', arg);\n }\n };\n }\n\n /* standard checks */\n keys.forEach(function (k) {\n if (ndebug) {\n out[k] = noop;\n return;\n }\n var type = types[k];\n out[k] = function (arg, msg) {\n if (!type.check(arg)) {\n _toss(msg, k, type.operator, arg, type.actual);\n }\n };\n });\n\n /* optional checks */\n keys.forEach(function (k) {\n var name = 'optional' + _capitalize(k);\n if (ndebug) {\n out[name] = noop;\n return;\n }\n var type = types[k];\n out[name] = function (arg, msg) {\n if (arg === undefined || arg === null) {\n return;\n }\n if (!type.check(arg)) {\n _toss(msg, k, type.operator, arg, type.actual);\n }\n };\n });\n\n /* arrayOf checks */\n keys.forEach(function (k) {\n var name = 'arrayOf' + _capitalize(k);\n if (ndebug) {\n out[name] = noop;\n return;\n }\n var type = types[k];\n var expected = '[' + k + ']';\n out[name] = function (arg, msg) {\n if (!Array.isArray(arg)) {\n _toss(msg, expected, type.operator, arg, type.actual);\n }\n var i;\n for (i = 0; i < arg.length; i++) {\n if (!type.check(arg[i])) {\n _toss(msg, expected, type.operator, arg, type.actual);\n }\n }\n };\n });\n\n /* optionalArrayOf checks */\n keys.forEach(function (k) {\n var name = 'optionalArrayOf' + _capitalize(k);\n if (ndebug) {\n out[name] = noop;\n return;\n }\n var type = types[k];\n var expected = '[' + k + ']';\n out[name] = function (arg, msg) {\n if (arg === undefined || arg === null) {\n return;\n }\n if (!Array.isArray(arg)) {\n _toss(msg, expected, type.operator, arg, type.actual);\n }\n var i;\n for (i = 0; i < arg.length; i++) {\n if (!type.check(arg[i])) {\n _toss(msg, expected, type.operator, arg, type.actual);\n }\n }\n };\n });\n\n /* re-export built-in assertions */\n Object.keys(assert).forEach(function (k) {\n if (k === 'AssertionError') {\n out[k] = assert[k];\n return;\n }\n if (ndebug) {\n out[k] = noop;\n return;\n }\n out[k] = assert[k];\n });\n\n /* export ourselves (for unit tests _only_) */\n out._setExports = _setExports;\n\n return out;\n}\n\nmodule.exports = _setExports(process.env.NODE_NDEBUG);\n","'use strict';\n\nfunction Queue(options) {\n if (!(this instanceof Queue)) {\n return new Queue(options);\n }\n\n options = options || {};\n this.concurrency = options.concurrency || Infinity;\n this.pending = 0;\n this.jobs = [];\n this.cbs = [];\n this._done = done.bind(this);\n}\n\nvar arrayAddMethods = [\n 'push',\n 'unshift',\n 'splice'\n];\n\narrayAddMethods.forEach(function(method) {\n Queue.prototype[method] = function() {\n var methodResult = Array.prototype[method].apply(this.jobs, arguments);\n this._run();\n return methodResult;\n };\n});\n\nObject.defineProperty(Queue.prototype, 'length', {\n get: function() {\n return this.pending + this.jobs.length;\n }\n});\n\nQueue.prototype._run = function() {\n if (this.pending === this.concurrency) {\n return;\n }\n if (this.jobs.length) {\n var job = this.jobs.shift();\n this.pending++;\n job(this._done);\n this._run();\n }\n\n if (this.pending === 0) {\n while (this.cbs.length !== 0) {\n var cb = this.cbs.pop();\n process.nextTick(cb);\n }\n }\n};\n\nQueue.prototype.onDone = function(cb) {\n if (typeof cb === 'function') {\n this.cbs.push(cb);\n this._run();\n }\n};\n\nfunction done() {\n this.pending--;\n this._run();\n}\n\nmodule.exports = Queue;\n","module.exports =\n{\n parallel : require('./parallel.js'),\n serial : require('./serial.js'),\n serialOrdered : require('./serialOrdered.js')\n};\n","// API\nmodule.exports = abort;\n\n/**\n * Aborts leftover active jobs\n *\n * @param {object} state - current state object\n */\nfunction abort(state)\n{\n Object.keys(state.jobs).forEach(clean.bind(state));\n\n // reset leftover jobs\n state.jobs = {};\n}\n\n/**\n * Cleans up leftover job by invoking abort function for the provided job id\n *\n * @this state\n * @param {string|number} key - job id to abort\n */\nfunction clean(key)\n{\n if (typeof this.jobs[key] == 'function')\n {\n this.jobs[key]();\n }\n}\n","var defer = require('./defer.js');\n\n// API\nmodule.exports = async;\n\n/**\n * Runs provided callback asynchronously\n * even if callback itself is not\n *\n * @param {function} callback - callback to invoke\n * @returns {function} - augmented callback\n */\nfunction async(callback)\n{\n var isAsync = false;\n\n // check if async happened\n defer(function() { isAsync = true; });\n\n return function async_callback(err, result)\n {\n if (isAsync)\n {\n callback(err, result);\n }\n else\n {\n defer(function nextTick_callback()\n {\n callback(err, result);\n });\n }\n };\n}\n","module.exports = defer;\n\n/**\n * Runs provided function on next iteration of the event loop\n *\n * @param {function} fn - function to run\n */\nfunction defer(fn)\n{\n var nextTick = typeof setImmediate == 'function'\n ? setImmediate\n : (\n typeof process == 'object' && typeof process.nextTick == 'function'\n ? process.nextTick\n : null\n );\n\n if (nextTick)\n {\n nextTick(fn);\n }\n else\n {\n setTimeout(fn, 0);\n }\n}\n","var async = require('./async.js')\n , abort = require('./abort.js')\n ;\n\n// API\nmodule.exports = iterate;\n\n/**\n * Iterates over each job object\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {object} state - current job status\n * @param {function} callback - invoked when all elements processed\n */\nfunction iterate(list, iterator, state, callback)\n{\n // store current index\n var key = state['keyedList'] ? state['keyedList'][state.index] : state.index;\n\n state.jobs[key] = runJob(iterator, key, list[key], function(error, output)\n {\n // don't repeat yourself\n // skip secondary callbacks\n if (!(key in state.jobs))\n {\n return;\n }\n\n // clean up jobs\n delete state.jobs[key];\n\n if (error)\n {\n // don't process rest of the results\n // stop still active jobs\n // and reset the list\n abort(state);\n }\n else\n {\n state.results[key] = output;\n }\n\n // return salvaged results\n callback(error, state.results);\n });\n}\n\n/**\n * Runs iterator over provided job element\n *\n * @param {function} iterator - iterator to invoke\n * @param {string|number} key - key/index of the element in the list of jobs\n * @param {mixed} item - job description\n * @param {function} callback - invoked after iterator is done with the job\n * @returns {function|mixed} - job abort function or something else\n */\nfunction runJob(iterator, key, item, callback)\n{\n var aborter;\n\n // allow shortcut if iterator expects only two arguments\n if (iterator.length == 2)\n {\n aborter = iterator(item, async(callback));\n }\n // otherwise go with full three arguments\n else\n {\n aborter = iterator(item, key, async(callback));\n }\n\n return aborter;\n}\n","// API\nmodule.exports = state;\n\n/**\n * Creates initial state object\n * for iteration over list\n *\n * @param {array|object} list - list to iterate over\n * @param {function|null} sortMethod - function to use for keys sort,\n * or `null` to keep them as is\n * @returns {object} - initial state object\n */\nfunction state(list, sortMethod)\n{\n var isNamedList = !Array.isArray(list)\n , initState =\n {\n index : 0,\n keyedList: isNamedList || sortMethod ? Object.keys(list) : null,\n jobs : {},\n results : isNamedList ? {} : [],\n size : isNamedList ? Object.keys(list).length : list.length\n }\n ;\n\n if (sortMethod)\n {\n // sort array keys based on it's values\n // sort object's keys just on own merit\n initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)\n {\n return sortMethod(list[a], list[b]);\n });\n }\n\n return initState;\n}\n","var abort = require('./abort.js')\n , async = require('./async.js')\n ;\n\n// API\nmodule.exports = terminator;\n\n/**\n * Terminates jobs in the attached state context\n *\n * @this AsyncKitState#\n * @param {function} callback - final callback to invoke after termination\n */\nfunction terminator(callback)\n{\n if (!Object.keys(this.jobs).length)\n {\n return;\n }\n\n // fast forward iteration index\n this.index = this.size;\n\n // abort jobs\n abort(this);\n\n // send back results we have so far\n async(callback)(null, this.results);\n}\n","var iterate = require('./lib/iterate.js')\n , initState = require('./lib/state.js')\n , terminator = require('./lib/terminator.js')\n ;\n\n// Public API\nmodule.exports = parallel;\n\n/**\n * Runs iterator over provided array elements in parallel\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction parallel(list, iterator, callback)\n{\n var state = initState(list);\n\n while (state.index < (state['keyedList'] || list).length)\n {\n iterate(list, iterator, state, function(error, result)\n {\n if (error)\n {\n callback(error, result);\n return;\n }\n\n // looks like it's the last one\n if (Object.keys(state.jobs).length === 0)\n {\n callback(null, state.results);\n return;\n }\n });\n\n state.index++;\n }\n\n return terminator.bind(state, callback);\n}\n","var serialOrdered = require('./serialOrdered.js');\n\n// Public API\nmodule.exports = serial;\n\n/**\n * Runs iterator over provided array elements in series\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction serial(list, iterator, callback)\n{\n return serialOrdered(list, iterator, null, callback);\n}\n","var iterate = require('./lib/iterate.js')\n , initState = require('./lib/state.js')\n , terminator = require('./lib/terminator.js')\n ;\n\n// Public API\nmodule.exports = serialOrdered;\n// sorting helpers\nmodule.exports.ascending = ascending;\nmodule.exports.descending = descending;\n\n/**\n * Runs iterator over provided sorted array elements in series\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {function} sortMethod - custom sort function\n * @param {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction serialOrdered(list, iterator, sortMethod, callback)\n{\n var state = initState(list, sortMethod);\n\n iterate(list, iterator, state, function iteratorHandler(error, result)\n {\n if (error)\n {\n callback(error, result);\n return;\n }\n\n state.index++;\n\n // are we there yet?\n if (state.index < (state['keyedList'] || list).length)\n {\n iterate(list, iterator, state, iteratorHandler);\n return;\n }\n\n // done here\n callback(null, state.results);\n });\n\n return terminator.bind(state, callback);\n}\n\n/*\n * -- Sort methods\n */\n\n/**\n * sort helper to sort array elements in ascending order\n *\n * @param {mixed} a - an item to compare\n * @param {mixed} b - an item to compare\n * @returns {number} - comparison result\n */\nfunction ascending(a, b)\n{\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\n/**\n * sort helper to sort array elements in descending order\n *\n * @param {mixed} a - an item to compare\n * @param {mixed} b - an item to compare\n * @returns {number} - comparison result\n */\nfunction descending(a, b)\n{\n return -1 * ascending(a, b);\n}\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['accessanalyzer'] = {};\nAWS.AccessAnalyzer = Service.defineService('accessanalyzer', ['2019-11-01']);\nObject.defineProperty(apiLoader.services['accessanalyzer'], '2019-11-01', {\n get: function get() {\n var model = require('../apis/accessanalyzer-2019-11-01.min.json');\n model.paginators = require('../apis/accessanalyzer-2019-11-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AccessAnalyzer;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['acm'] = {};\nAWS.ACM = Service.defineService('acm', ['2015-12-08']);\nObject.defineProperty(apiLoader.services['acm'], '2015-12-08', {\n get: function get() {\n var model = require('../apis/acm-2015-12-08.min.json');\n model.paginators = require('../apis/acm-2015-12-08.paginators.json').pagination;\n model.waiters = require('../apis/acm-2015-12-08.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ACM;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['acmpca'] = {};\nAWS.ACMPCA = Service.defineService('acmpca', ['2017-08-22']);\nObject.defineProperty(apiLoader.services['acmpca'], '2017-08-22', {\n get: function get() {\n var model = require('../apis/acm-pca-2017-08-22.min.json');\n model.paginators = require('../apis/acm-pca-2017-08-22.paginators.json').pagination;\n model.waiters = require('../apis/acm-pca-2017-08-22.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ACMPCA;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['alexaforbusiness'] = {};\nAWS.AlexaForBusiness = Service.defineService('alexaforbusiness', ['2017-11-09']);\nObject.defineProperty(apiLoader.services['alexaforbusiness'], '2017-11-09', {\n get: function get() {\n var model = require('../apis/alexaforbusiness-2017-11-09.min.json');\n model.paginators = require('../apis/alexaforbusiness-2017-11-09.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AlexaForBusiness;\n","require('../lib/node_loader');\nmodule.exports = {\n ACM: require('./acm'),\n APIGateway: require('./apigateway'),\n ApplicationAutoScaling: require('./applicationautoscaling'),\n AppStream: require('./appstream'),\n AutoScaling: require('./autoscaling'),\n Batch: require('./batch'),\n Budgets: require('./budgets'),\n CloudDirectory: require('./clouddirectory'),\n CloudFormation: require('./cloudformation'),\n CloudFront: require('./cloudfront'),\n CloudHSM: require('./cloudhsm'),\n CloudSearch: require('./cloudsearch'),\n CloudSearchDomain: require('./cloudsearchdomain'),\n CloudTrail: require('./cloudtrail'),\n CloudWatch: require('./cloudwatch'),\n CloudWatchEvents: require('./cloudwatchevents'),\n CloudWatchLogs: require('./cloudwatchlogs'),\n CodeBuild: require('./codebuild'),\n CodeCommit: require('./codecommit'),\n CodeDeploy: require('./codedeploy'),\n CodePipeline: require('./codepipeline'),\n CognitoIdentity: require('./cognitoidentity'),\n CognitoIdentityServiceProvider: require('./cognitoidentityserviceprovider'),\n CognitoSync: require('./cognitosync'),\n ConfigService: require('./configservice'),\n CUR: require('./cur'),\n DataPipeline: require('./datapipeline'),\n DeviceFarm: require('./devicefarm'),\n DirectConnect: require('./directconnect'),\n DirectoryService: require('./directoryservice'),\n Discovery: require('./discovery'),\n DMS: require('./dms'),\n DynamoDB: require('./dynamodb'),\n DynamoDBStreams: require('./dynamodbstreams'),\n EC2: require('./ec2'),\n ECR: require('./ecr'),\n ECS: require('./ecs'),\n EFS: require('./efs'),\n ElastiCache: require('./elasticache'),\n ElasticBeanstalk: require('./elasticbeanstalk'),\n ELB: require('./elb'),\n ELBv2: require('./elbv2'),\n EMR: require('./emr'),\n ES: require('./es'),\n ElasticTranscoder: require('./elastictranscoder'),\n Firehose: require('./firehose'),\n GameLift: require('./gamelift'),\n Glacier: require('./glacier'),\n Health: require('./health'),\n IAM: require('./iam'),\n ImportExport: require('./importexport'),\n Inspector: require('./inspector'),\n Iot: require('./iot'),\n IotData: require('./iotdata'),\n Kinesis: require('./kinesis'),\n KinesisAnalytics: require('./kinesisanalytics'),\n KMS: require('./kms'),\n Lambda: require('./lambda'),\n LexRuntime: require('./lexruntime'),\n Lightsail: require('./lightsail'),\n MachineLearning: require('./machinelearning'),\n MarketplaceCommerceAnalytics: require('./marketplacecommerceanalytics'),\n MarketplaceMetering: require('./marketplacemetering'),\n MTurk: require('./mturk'),\n MobileAnalytics: require('./mobileanalytics'),\n OpsWorks: require('./opsworks'),\n OpsWorksCM: require('./opsworkscm'),\n Organizations: require('./organizations'),\n Pinpoint: require('./pinpoint'),\n Polly: require('./polly'),\n RDS: require('./rds'),\n Redshift: require('./redshift'),\n Rekognition: require('./rekognition'),\n ResourceGroupsTaggingAPI: require('./resourcegroupstaggingapi'),\n Route53: require('./route53'),\n Route53Domains: require('./route53domains'),\n S3: require('./s3'),\n S3Control: require('./s3control'),\n ServiceCatalog: require('./servicecatalog'),\n SES: require('./ses'),\n Shield: require('./shield'),\n SimpleDB: require('./simpledb'),\n SMS: require('./sms'),\n Snowball: require('./snowball'),\n SNS: require('./sns'),\n SQS: require('./sqs'),\n SSM: require('./ssm'),\n StorageGateway: require('./storagegateway'),\n StepFunctions: require('./stepfunctions'),\n STS: require('./sts'),\n Support: require('./support'),\n SWF: require('./swf'),\n XRay: require('./xray'),\n WAF: require('./waf'),\n WAFRegional: require('./wafregional'),\n WorkDocs: require('./workdocs'),\n WorkSpaces: require('./workspaces'),\n CodeStar: require('./codestar'),\n LexModelBuildingService: require('./lexmodelbuildingservice'),\n MarketplaceEntitlementService: require('./marketplaceentitlementservice'),\n Athena: require('./athena'),\n Greengrass: require('./greengrass'),\n DAX: require('./dax'),\n MigrationHub: require('./migrationhub'),\n CloudHSMV2: require('./cloudhsmv2'),\n Glue: require('./glue'),\n Mobile: require('./mobile'),\n Pricing: require('./pricing'),\n CostExplorer: require('./costexplorer'),\n MediaConvert: require('./mediaconvert'),\n MediaLive: require('./medialive'),\n MediaPackage: require('./mediapackage'),\n MediaStore: require('./mediastore'),\n MediaStoreData: require('./mediastoredata'),\n AppSync: require('./appsync'),\n GuardDuty: require('./guardduty'),\n MQ: require('./mq'),\n Comprehend: require('./comprehend'),\n IoTJobsDataPlane: require('./iotjobsdataplane'),\n KinesisVideoArchivedMedia: require('./kinesisvideoarchivedmedia'),\n KinesisVideoMedia: require('./kinesisvideomedia'),\n KinesisVideo: require('./kinesisvideo'),\n SageMakerRuntime: require('./sagemakerruntime'),\n SageMaker: require('./sagemaker'),\n Translate: require('./translate'),\n ResourceGroups: require('./resourcegroups'),\n AlexaForBusiness: require('./alexaforbusiness'),\n Cloud9: require('./cloud9'),\n ServerlessApplicationRepository: require('./serverlessapplicationrepository'),\n ServiceDiscovery: require('./servicediscovery'),\n WorkMail: require('./workmail'),\n AutoScalingPlans: require('./autoscalingplans'),\n TranscribeService: require('./transcribeservice'),\n Connect: require('./connect'),\n ACMPCA: require('./acmpca'),\n FMS: require('./fms'),\n SecretsManager: require('./secretsmanager'),\n IoTAnalytics: require('./iotanalytics'),\n IoT1ClickDevicesService: require('./iot1clickdevicesservice'),\n IoT1ClickProjects: require('./iot1clickprojects'),\n PI: require('./pi'),\n Neptune: require('./neptune'),\n MediaTailor: require('./mediatailor'),\n EKS: require('./eks'),\n Macie: require('./macie'),\n DLM: require('./dlm'),\n Signer: require('./signer'),\n Chime: require('./chime'),\n PinpointEmail: require('./pinpointemail'),\n RAM: require('./ram'),\n Route53Resolver: require('./route53resolver'),\n PinpointSMSVoice: require('./pinpointsmsvoice'),\n QuickSight: require('./quicksight'),\n RDSDataService: require('./rdsdataservice'),\n Amplify: require('./amplify'),\n DataSync: require('./datasync'),\n RoboMaker: require('./robomaker'),\n Transfer: require('./transfer'),\n GlobalAccelerator: require('./globalaccelerator'),\n ComprehendMedical: require('./comprehendmedical'),\n KinesisAnalyticsV2: require('./kinesisanalyticsv2'),\n MediaConnect: require('./mediaconnect'),\n FSx: require('./fsx'),\n SecurityHub: require('./securityhub'),\n AppMesh: require('./appmesh'),\n LicenseManager: require('./licensemanager'),\n Kafka: require('./kafka'),\n ApiGatewayManagementApi: require('./apigatewaymanagementapi'),\n ApiGatewayV2: require('./apigatewayv2'),\n DocDB: require('./docdb'),\n Backup: require('./backup'),\n WorkLink: require('./worklink'),\n Textract: require('./textract'),\n ManagedBlockchain: require('./managedblockchain'),\n MediaPackageVod: require('./mediapackagevod'),\n GroundStation: require('./groundstation'),\n IoTThingsGraph: require('./iotthingsgraph'),\n IoTEvents: require('./iotevents'),\n IoTEventsData: require('./ioteventsdata'),\n Personalize: require('./personalize'),\n PersonalizeEvents: require('./personalizeevents'),\n PersonalizeRuntime: require('./personalizeruntime'),\n ApplicationInsights: require('./applicationinsights'),\n ServiceQuotas: require('./servicequotas'),\n EC2InstanceConnect: require('./ec2instanceconnect'),\n EventBridge: require('./eventbridge'),\n LakeFormation: require('./lakeformation'),\n ForecastService: require('./forecastservice'),\n ForecastQueryService: require('./forecastqueryservice'),\n QLDB: require('./qldb'),\n QLDBSession: require('./qldbsession'),\n WorkMailMessageFlow: require('./workmailmessageflow'),\n CodeStarNotifications: require('./codestarnotifications'),\n SavingsPlans: require('./savingsplans'),\n SSO: require('./sso'),\n SSOOIDC: require('./ssooidc'),\n MarketplaceCatalog: require('./marketplacecatalog'),\n DataExchange: require('./dataexchange'),\n SESV2: require('./sesv2'),\n MigrationHubConfig: require('./migrationhubconfig'),\n ConnectParticipant: require('./connectparticipant'),\n AppConfig: require('./appconfig'),\n IoTSecureTunneling: require('./iotsecuretunneling'),\n WAFV2: require('./wafv2'),\n ElasticInference: require('./elasticinference'),\n Imagebuilder: require('./imagebuilder'),\n Schemas: require('./schemas'),\n AccessAnalyzer: require('./accessanalyzer'),\n CodeGuruReviewer: require('./codegurureviewer'),\n CodeGuruProfiler: require('./codeguruprofiler'),\n ComputeOptimizer: require('./computeoptimizer'),\n FraudDetector: require('./frauddetector'),\n Kendra: require('./kendra'),\n NetworkManager: require('./networkmanager'),\n Outposts: require('./outposts'),\n AugmentedAIRuntime: require('./augmentedairuntime'),\n EBS: require('./ebs'),\n KinesisVideoSignalingChannels: require('./kinesisvideosignalingchannels'),\n Detective: require('./detective'),\n CodeStarconnections: require('./codestarconnections'),\n Synthetics: require('./synthetics'),\n IoTSiteWise: require('./iotsitewise'),\n Macie2: require('./macie2'),\n CodeArtifact: require('./codeartifact'),\n Honeycode: require('./honeycode'),\n IVS: require('./ivs'),\n Braket: require('./braket'),\n IdentityStore: require('./identitystore'),\n Appflow: require('./appflow'),\n RedshiftData: require('./redshiftdata'),\n SSOAdmin: require('./ssoadmin'),\n TimestreamQuery: require('./timestreamquery'),\n TimestreamWrite: require('./timestreamwrite'),\n S3Outposts: require('./s3outposts'),\n DataBrew: require('./databrew'),\n ServiceCatalogAppRegistry: require('./servicecatalogappregistry'),\n NetworkFirewall: require('./networkfirewall'),\n MWAA: require('./mwaa'),\n AmplifyBackend: require('./amplifybackend'),\n AppIntegrations: require('./appintegrations'),\n ConnectContactLens: require('./connectcontactlens'),\n DevOpsGuru: require('./devopsguru'),\n ECRPUBLIC: require('./ecrpublic'),\n LookoutVision: require('./lookoutvision'),\n SageMakerFeatureStoreRuntime: require('./sagemakerfeaturestoreruntime'),\n CustomerProfiles: require('./customerprofiles'),\n AuditManager: require('./auditmanager'),\n EMRcontainers: require('./emrcontainers'),\n HealthLake: require('./healthlake'),\n SagemakerEdge: require('./sagemakeredge'),\n Amp: require('./amp'),\n GreengrassV2: require('./greengrassv2'),\n IotDeviceAdvisor: require('./iotdeviceadvisor'),\n IoTFleetHub: require('./iotfleethub'),\n IoTWireless: require('./iotwireless'),\n Location: require('./location'),\n WellArchitected: require('./wellarchitected'),\n LexModelsV2: require('./lexmodelsv2'),\n LexRuntimeV2: require('./lexruntimev2'),\n Fis: require('./fis'),\n LookoutMetrics: require('./lookoutmetrics'),\n Mgn: require('./mgn'),\n LookoutEquipment: require('./lookoutequipment')\n};","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['amp'] = {};\nAWS.Amp = Service.defineService('amp', ['2020-08-01']);\nObject.defineProperty(apiLoader.services['amp'], '2020-08-01', {\n get: function get() {\n var model = require('../apis/amp-2020-08-01.min.json');\n model.paginators = require('../apis/amp-2020-08-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Amp;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['amplify'] = {};\nAWS.Amplify = Service.defineService('amplify', ['2017-07-25']);\nObject.defineProperty(apiLoader.services['amplify'], '2017-07-25', {\n get: function get() {\n var model = require('../apis/amplify-2017-07-25.min.json');\n model.paginators = require('../apis/amplify-2017-07-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Amplify;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['amplifybackend'] = {};\nAWS.AmplifyBackend = Service.defineService('amplifybackend', ['2020-08-11']);\nObject.defineProperty(apiLoader.services['amplifybackend'], '2020-08-11', {\n get: function get() {\n var model = require('../apis/amplifybackend-2020-08-11.min.json');\n model.paginators = require('../apis/amplifybackend-2020-08-11.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AmplifyBackend;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['apigateway'] = {};\nAWS.APIGateway = Service.defineService('apigateway', ['2015-07-09']);\nrequire('../lib/services/apigateway');\nObject.defineProperty(apiLoader.services['apigateway'], '2015-07-09', {\n get: function get() {\n var model = require('../apis/apigateway-2015-07-09.min.json');\n model.paginators = require('../apis/apigateway-2015-07-09.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.APIGateway;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['apigatewaymanagementapi'] = {};\nAWS.ApiGatewayManagementApi = Service.defineService('apigatewaymanagementapi', ['2018-11-29']);\nObject.defineProperty(apiLoader.services['apigatewaymanagementapi'], '2018-11-29', {\n get: function get() {\n var model = require('../apis/apigatewaymanagementapi-2018-11-29.min.json');\n model.paginators = require('../apis/apigatewaymanagementapi-2018-11-29.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ApiGatewayManagementApi;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['apigatewayv2'] = {};\nAWS.ApiGatewayV2 = Service.defineService('apigatewayv2', ['2018-11-29']);\nObject.defineProperty(apiLoader.services['apigatewayv2'], '2018-11-29', {\n get: function get() {\n var model = require('../apis/apigatewayv2-2018-11-29.min.json');\n model.paginators = require('../apis/apigatewayv2-2018-11-29.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ApiGatewayV2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['appconfig'] = {};\nAWS.AppConfig = Service.defineService('appconfig', ['2019-10-09']);\nObject.defineProperty(apiLoader.services['appconfig'], '2019-10-09', {\n get: function get() {\n var model = require('../apis/appconfig-2019-10-09.min.json');\n model.paginators = require('../apis/appconfig-2019-10-09.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AppConfig;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['appflow'] = {};\nAWS.Appflow = Service.defineService('appflow', ['2020-08-23']);\nObject.defineProperty(apiLoader.services['appflow'], '2020-08-23', {\n get: function get() {\n var model = require('../apis/appflow-2020-08-23.min.json');\n model.paginators = require('../apis/appflow-2020-08-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Appflow;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['appintegrations'] = {};\nAWS.AppIntegrations = Service.defineService('appintegrations', ['2020-07-29']);\nObject.defineProperty(apiLoader.services['appintegrations'], '2020-07-29', {\n get: function get() {\n var model = require('../apis/appintegrations-2020-07-29.min.json');\n model.paginators = require('../apis/appintegrations-2020-07-29.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AppIntegrations;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['applicationautoscaling'] = {};\nAWS.ApplicationAutoScaling = Service.defineService('applicationautoscaling', ['2016-02-06']);\nObject.defineProperty(apiLoader.services['applicationautoscaling'], '2016-02-06', {\n get: function get() {\n var model = require('../apis/application-autoscaling-2016-02-06.min.json');\n model.paginators = require('../apis/application-autoscaling-2016-02-06.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ApplicationAutoScaling;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['applicationinsights'] = {};\nAWS.ApplicationInsights = Service.defineService('applicationinsights', ['2018-11-25']);\nObject.defineProperty(apiLoader.services['applicationinsights'], '2018-11-25', {\n get: function get() {\n var model = require('../apis/application-insights-2018-11-25.min.json');\n model.paginators = require('../apis/application-insights-2018-11-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ApplicationInsights;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['appmesh'] = {};\nAWS.AppMesh = Service.defineService('appmesh', ['2018-10-01', '2018-10-01*', '2019-01-25']);\nObject.defineProperty(apiLoader.services['appmesh'], '2018-10-01', {\n get: function get() {\n var model = require('../apis/appmesh-2018-10-01.min.json');\n model.paginators = require('../apis/appmesh-2018-10-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['appmesh'], '2019-01-25', {\n get: function get() {\n var model = require('../apis/appmesh-2019-01-25.min.json');\n model.paginators = require('../apis/appmesh-2019-01-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AppMesh;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['appstream'] = {};\nAWS.AppStream = Service.defineService('appstream', ['2016-12-01']);\nObject.defineProperty(apiLoader.services['appstream'], '2016-12-01', {\n get: function get() {\n var model = require('../apis/appstream-2016-12-01.min.json');\n model.paginators = require('../apis/appstream-2016-12-01.paginators.json').pagination;\n model.waiters = require('../apis/appstream-2016-12-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AppStream;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['appsync'] = {};\nAWS.AppSync = Service.defineService('appsync', ['2017-07-25']);\nObject.defineProperty(apiLoader.services['appsync'], '2017-07-25', {\n get: function get() {\n var model = require('../apis/appsync-2017-07-25.min.json');\n model.paginators = require('../apis/appsync-2017-07-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AppSync;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['athena'] = {};\nAWS.Athena = Service.defineService('athena', ['2017-05-18']);\nObject.defineProperty(apiLoader.services['athena'], '2017-05-18', {\n get: function get() {\n var model = require('../apis/athena-2017-05-18.min.json');\n model.paginators = require('../apis/athena-2017-05-18.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Athena;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['auditmanager'] = {};\nAWS.AuditManager = Service.defineService('auditmanager', ['2017-07-25']);\nObject.defineProperty(apiLoader.services['auditmanager'], '2017-07-25', {\n get: function get() {\n var model = require('../apis/auditmanager-2017-07-25.min.json');\n model.paginators = require('../apis/auditmanager-2017-07-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AuditManager;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['augmentedairuntime'] = {};\nAWS.AugmentedAIRuntime = Service.defineService('augmentedairuntime', ['2019-11-07']);\nObject.defineProperty(apiLoader.services['augmentedairuntime'], '2019-11-07', {\n get: function get() {\n var model = require('../apis/sagemaker-a2i-runtime-2019-11-07.min.json');\n model.paginators = require('../apis/sagemaker-a2i-runtime-2019-11-07.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AugmentedAIRuntime;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['autoscaling'] = {};\nAWS.AutoScaling = Service.defineService('autoscaling', ['2011-01-01']);\nObject.defineProperty(apiLoader.services['autoscaling'], '2011-01-01', {\n get: function get() {\n var model = require('../apis/autoscaling-2011-01-01.min.json');\n model.paginators = require('../apis/autoscaling-2011-01-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AutoScaling;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['autoscalingplans'] = {};\nAWS.AutoScalingPlans = Service.defineService('autoscalingplans', ['2018-01-06']);\nObject.defineProperty(apiLoader.services['autoscalingplans'], '2018-01-06', {\n get: function get() {\n var model = require('../apis/autoscaling-plans-2018-01-06.min.json');\n model.paginators = require('../apis/autoscaling-plans-2018-01-06.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AutoScalingPlans;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['backup'] = {};\nAWS.Backup = Service.defineService('backup', ['2018-11-15']);\nObject.defineProperty(apiLoader.services['backup'], '2018-11-15', {\n get: function get() {\n var model = require('../apis/backup-2018-11-15.min.json');\n model.paginators = require('../apis/backup-2018-11-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Backup;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['batch'] = {};\nAWS.Batch = Service.defineService('batch', ['2016-08-10']);\nObject.defineProperty(apiLoader.services['batch'], '2016-08-10', {\n get: function get() {\n var model = require('../apis/batch-2016-08-10.min.json');\n model.paginators = require('../apis/batch-2016-08-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Batch;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['braket'] = {};\nAWS.Braket = Service.defineService('braket', ['2019-09-01']);\nObject.defineProperty(apiLoader.services['braket'], '2019-09-01', {\n get: function get() {\n var model = require('../apis/braket-2019-09-01.min.json');\n model.paginators = require('../apis/braket-2019-09-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Braket;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['budgets'] = {};\nAWS.Budgets = Service.defineService('budgets', ['2016-10-20']);\nObject.defineProperty(apiLoader.services['budgets'], '2016-10-20', {\n get: function get() {\n var model = require('../apis/budgets-2016-10-20.min.json');\n model.paginators = require('../apis/budgets-2016-10-20.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Budgets;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['chime'] = {};\nAWS.Chime = Service.defineService('chime', ['2018-05-01']);\nObject.defineProperty(apiLoader.services['chime'], '2018-05-01', {\n get: function get() {\n var model = require('../apis/chime-2018-05-01.min.json');\n model.paginators = require('../apis/chime-2018-05-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Chime;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloud9'] = {};\nAWS.Cloud9 = Service.defineService('cloud9', ['2017-09-23']);\nObject.defineProperty(apiLoader.services['cloud9'], '2017-09-23', {\n get: function get() {\n var model = require('../apis/cloud9-2017-09-23.min.json');\n model.paginators = require('../apis/cloud9-2017-09-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Cloud9;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['clouddirectory'] = {};\nAWS.CloudDirectory = Service.defineService('clouddirectory', ['2016-05-10', '2016-05-10*', '2017-01-11']);\nObject.defineProperty(apiLoader.services['clouddirectory'], '2016-05-10', {\n get: function get() {\n var model = require('../apis/clouddirectory-2016-05-10.min.json');\n model.paginators = require('../apis/clouddirectory-2016-05-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['clouddirectory'], '2017-01-11', {\n get: function get() {\n var model = require('../apis/clouddirectory-2017-01-11.min.json');\n model.paginators = require('../apis/clouddirectory-2017-01-11.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudDirectory;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudformation'] = {};\nAWS.CloudFormation = Service.defineService('cloudformation', ['2010-05-15']);\nObject.defineProperty(apiLoader.services['cloudformation'], '2010-05-15', {\n get: function get() {\n var model = require('../apis/cloudformation-2010-05-15.min.json');\n model.paginators = require('../apis/cloudformation-2010-05-15.paginators.json').pagination;\n model.waiters = require('../apis/cloudformation-2010-05-15.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudFormation;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudfront'] = {};\nAWS.CloudFront = Service.defineService('cloudfront', ['2013-05-12*', '2013-11-11*', '2014-05-31*', '2014-10-21*', '2014-11-06*', '2015-04-17*', '2015-07-27*', '2015-09-17*', '2016-01-13*', '2016-01-28*', '2016-08-01*', '2016-08-20*', '2016-09-07*', '2016-09-29*', '2016-11-25', '2016-11-25*', '2017-03-25', '2017-03-25*', '2017-10-30', '2017-10-30*', '2018-06-18', '2018-06-18*', '2018-11-05', '2018-11-05*', '2019-03-26', '2019-03-26*', '2020-05-31']);\nrequire('../lib/services/cloudfront');\nObject.defineProperty(apiLoader.services['cloudfront'], '2016-11-25', {\n get: function get() {\n var model = require('../apis/cloudfront-2016-11-25.min.json');\n model.paginators = require('../apis/cloudfront-2016-11-25.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2016-11-25.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudfront'], '2017-03-25', {\n get: function get() {\n var model = require('../apis/cloudfront-2017-03-25.min.json');\n model.paginators = require('../apis/cloudfront-2017-03-25.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2017-03-25.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudfront'], '2017-10-30', {\n get: function get() {\n var model = require('../apis/cloudfront-2017-10-30.min.json');\n model.paginators = require('../apis/cloudfront-2017-10-30.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2017-10-30.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudfront'], '2018-06-18', {\n get: function get() {\n var model = require('../apis/cloudfront-2018-06-18.min.json');\n model.paginators = require('../apis/cloudfront-2018-06-18.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2018-06-18.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudfront'], '2018-11-05', {\n get: function get() {\n var model = require('../apis/cloudfront-2018-11-05.min.json');\n model.paginators = require('../apis/cloudfront-2018-11-05.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2018-11-05.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudfront'], '2019-03-26', {\n get: function get() {\n var model = require('../apis/cloudfront-2019-03-26.min.json');\n model.paginators = require('../apis/cloudfront-2019-03-26.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2019-03-26.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudfront'], '2020-05-31', {\n get: function get() {\n var model = require('../apis/cloudfront-2020-05-31.min.json');\n model.paginators = require('../apis/cloudfront-2020-05-31.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2020-05-31.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudFront;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudhsm'] = {};\nAWS.CloudHSM = Service.defineService('cloudhsm', ['2014-05-30']);\nObject.defineProperty(apiLoader.services['cloudhsm'], '2014-05-30', {\n get: function get() {\n var model = require('../apis/cloudhsm-2014-05-30.min.json');\n model.paginators = require('../apis/cloudhsm-2014-05-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudHSM;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudhsmv2'] = {};\nAWS.CloudHSMV2 = Service.defineService('cloudhsmv2', ['2017-04-28']);\nObject.defineProperty(apiLoader.services['cloudhsmv2'], '2017-04-28', {\n get: function get() {\n var model = require('../apis/cloudhsmv2-2017-04-28.min.json');\n model.paginators = require('../apis/cloudhsmv2-2017-04-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudHSMV2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudsearch'] = {};\nAWS.CloudSearch = Service.defineService('cloudsearch', ['2011-02-01', '2013-01-01']);\nObject.defineProperty(apiLoader.services['cloudsearch'], '2011-02-01', {\n get: function get() {\n var model = require('../apis/cloudsearch-2011-02-01.min.json');\n model.paginators = require('../apis/cloudsearch-2011-02-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudsearch'], '2013-01-01', {\n get: function get() {\n var model = require('../apis/cloudsearch-2013-01-01.min.json');\n model.paginators = require('../apis/cloudsearch-2013-01-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudSearch;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudsearchdomain'] = {};\nAWS.CloudSearchDomain = Service.defineService('cloudsearchdomain', ['2013-01-01']);\nrequire('../lib/services/cloudsearchdomain');\nObject.defineProperty(apiLoader.services['cloudsearchdomain'], '2013-01-01', {\n get: function get() {\n var model = require('../apis/cloudsearchdomain-2013-01-01.min.json');\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudSearchDomain;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudtrail'] = {};\nAWS.CloudTrail = Service.defineService('cloudtrail', ['2013-11-01']);\nObject.defineProperty(apiLoader.services['cloudtrail'], '2013-11-01', {\n get: function get() {\n var model = require('../apis/cloudtrail-2013-11-01.min.json');\n model.paginators = require('../apis/cloudtrail-2013-11-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudTrail;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudwatch'] = {};\nAWS.CloudWatch = Service.defineService('cloudwatch', ['2010-08-01']);\nObject.defineProperty(apiLoader.services['cloudwatch'], '2010-08-01', {\n get: function get() {\n var model = require('../apis/monitoring-2010-08-01.min.json');\n model.paginators = require('../apis/monitoring-2010-08-01.paginators.json').pagination;\n model.waiters = require('../apis/monitoring-2010-08-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudWatch;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudwatchevents'] = {};\nAWS.CloudWatchEvents = Service.defineService('cloudwatchevents', ['2014-02-03*', '2015-10-07']);\nObject.defineProperty(apiLoader.services['cloudwatchevents'], '2015-10-07', {\n get: function get() {\n var model = require('../apis/events-2015-10-07.min.json');\n model.paginators = require('../apis/events-2015-10-07.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudWatchEvents;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudwatchlogs'] = {};\nAWS.CloudWatchLogs = Service.defineService('cloudwatchlogs', ['2014-03-28']);\nObject.defineProperty(apiLoader.services['cloudwatchlogs'], '2014-03-28', {\n get: function get() {\n var model = require('../apis/logs-2014-03-28.min.json');\n model.paginators = require('../apis/logs-2014-03-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudWatchLogs;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codeartifact'] = {};\nAWS.CodeArtifact = Service.defineService('codeartifact', ['2018-09-22']);\nObject.defineProperty(apiLoader.services['codeartifact'], '2018-09-22', {\n get: function get() {\n var model = require('../apis/codeartifact-2018-09-22.min.json');\n model.paginators = require('../apis/codeartifact-2018-09-22.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeArtifact;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codebuild'] = {};\nAWS.CodeBuild = Service.defineService('codebuild', ['2016-10-06']);\nObject.defineProperty(apiLoader.services['codebuild'], '2016-10-06', {\n get: function get() {\n var model = require('../apis/codebuild-2016-10-06.min.json');\n model.paginators = require('../apis/codebuild-2016-10-06.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeBuild;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codecommit'] = {};\nAWS.CodeCommit = Service.defineService('codecommit', ['2015-04-13']);\nObject.defineProperty(apiLoader.services['codecommit'], '2015-04-13', {\n get: function get() {\n var model = require('../apis/codecommit-2015-04-13.min.json');\n model.paginators = require('../apis/codecommit-2015-04-13.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeCommit;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codedeploy'] = {};\nAWS.CodeDeploy = Service.defineService('codedeploy', ['2014-10-06']);\nObject.defineProperty(apiLoader.services['codedeploy'], '2014-10-06', {\n get: function get() {\n var model = require('../apis/codedeploy-2014-10-06.min.json');\n model.paginators = require('../apis/codedeploy-2014-10-06.paginators.json').pagination;\n model.waiters = require('../apis/codedeploy-2014-10-06.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeDeploy;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codeguruprofiler'] = {};\nAWS.CodeGuruProfiler = Service.defineService('codeguruprofiler', ['2019-07-18']);\nObject.defineProperty(apiLoader.services['codeguruprofiler'], '2019-07-18', {\n get: function get() {\n var model = require('../apis/codeguruprofiler-2019-07-18.min.json');\n model.paginators = require('../apis/codeguruprofiler-2019-07-18.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeGuruProfiler;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codegurureviewer'] = {};\nAWS.CodeGuruReviewer = Service.defineService('codegurureviewer', ['2019-09-19']);\nObject.defineProperty(apiLoader.services['codegurureviewer'], '2019-09-19', {\n get: function get() {\n var model = require('../apis/codeguru-reviewer-2019-09-19.min.json');\n model.paginators = require('../apis/codeguru-reviewer-2019-09-19.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeGuruReviewer;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codepipeline'] = {};\nAWS.CodePipeline = Service.defineService('codepipeline', ['2015-07-09']);\nObject.defineProperty(apiLoader.services['codepipeline'], '2015-07-09', {\n get: function get() {\n var model = require('../apis/codepipeline-2015-07-09.min.json');\n model.paginators = require('../apis/codepipeline-2015-07-09.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodePipeline;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codestar'] = {};\nAWS.CodeStar = Service.defineService('codestar', ['2017-04-19']);\nObject.defineProperty(apiLoader.services['codestar'], '2017-04-19', {\n get: function get() {\n var model = require('../apis/codestar-2017-04-19.min.json');\n model.paginators = require('../apis/codestar-2017-04-19.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeStar;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codestarconnections'] = {};\nAWS.CodeStarconnections = Service.defineService('codestarconnections', ['2019-12-01']);\nObject.defineProperty(apiLoader.services['codestarconnections'], '2019-12-01', {\n get: function get() {\n var model = require('../apis/codestar-connections-2019-12-01.min.json');\n model.paginators = require('../apis/codestar-connections-2019-12-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeStarconnections;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codestarnotifications'] = {};\nAWS.CodeStarNotifications = Service.defineService('codestarnotifications', ['2019-10-15']);\nObject.defineProperty(apiLoader.services['codestarnotifications'], '2019-10-15', {\n get: function get() {\n var model = require('../apis/codestar-notifications-2019-10-15.min.json');\n model.paginators = require('../apis/codestar-notifications-2019-10-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeStarNotifications;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cognitoidentity'] = {};\nAWS.CognitoIdentity = Service.defineService('cognitoidentity', ['2014-06-30']);\nObject.defineProperty(apiLoader.services['cognitoidentity'], '2014-06-30', {\n get: function get() {\n var model = require('../apis/cognito-identity-2014-06-30.min.json');\n model.paginators = require('../apis/cognito-identity-2014-06-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CognitoIdentity;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cognitoidentityserviceprovider'] = {};\nAWS.CognitoIdentityServiceProvider = Service.defineService('cognitoidentityserviceprovider', ['2016-04-18']);\nObject.defineProperty(apiLoader.services['cognitoidentityserviceprovider'], '2016-04-18', {\n get: function get() {\n var model = require('../apis/cognito-idp-2016-04-18.min.json');\n model.paginators = require('../apis/cognito-idp-2016-04-18.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CognitoIdentityServiceProvider;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cognitosync'] = {};\nAWS.CognitoSync = Service.defineService('cognitosync', ['2014-06-30']);\nObject.defineProperty(apiLoader.services['cognitosync'], '2014-06-30', {\n get: function get() {\n var model = require('../apis/cognito-sync-2014-06-30.min.json');\n model.paginators = require('../apis/cognito-sync-2014-06-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CognitoSync;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['comprehend'] = {};\nAWS.Comprehend = Service.defineService('comprehend', ['2017-11-27']);\nObject.defineProperty(apiLoader.services['comprehend'], '2017-11-27', {\n get: function get() {\n var model = require('../apis/comprehend-2017-11-27.min.json');\n model.paginators = require('../apis/comprehend-2017-11-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Comprehend;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['comprehendmedical'] = {};\nAWS.ComprehendMedical = Service.defineService('comprehendmedical', ['2018-10-30']);\nObject.defineProperty(apiLoader.services['comprehendmedical'], '2018-10-30', {\n get: function get() {\n var model = require('../apis/comprehendmedical-2018-10-30.min.json');\n model.paginators = require('../apis/comprehendmedical-2018-10-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ComprehendMedical;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['computeoptimizer'] = {};\nAWS.ComputeOptimizer = Service.defineService('computeoptimizer', ['2019-11-01']);\nObject.defineProperty(apiLoader.services['computeoptimizer'], '2019-11-01', {\n get: function get() {\n var model = require('../apis/compute-optimizer-2019-11-01.min.json');\n model.paginators = require('../apis/compute-optimizer-2019-11-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ComputeOptimizer;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['configservice'] = {};\nAWS.ConfigService = Service.defineService('configservice', ['2014-11-12']);\nObject.defineProperty(apiLoader.services['configservice'], '2014-11-12', {\n get: function get() {\n var model = require('../apis/config-2014-11-12.min.json');\n model.paginators = require('../apis/config-2014-11-12.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ConfigService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['connect'] = {};\nAWS.Connect = Service.defineService('connect', ['2017-08-08']);\nObject.defineProperty(apiLoader.services['connect'], '2017-08-08', {\n get: function get() {\n var model = require('../apis/connect-2017-08-08.min.json');\n model.paginators = require('../apis/connect-2017-08-08.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Connect;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['connectcontactlens'] = {};\nAWS.ConnectContactLens = Service.defineService('connectcontactlens', ['2020-08-21']);\nObject.defineProperty(apiLoader.services['connectcontactlens'], '2020-08-21', {\n get: function get() {\n var model = require('../apis/connect-contact-lens-2020-08-21.min.json');\n model.paginators = require('../apis/connect-contact-lens-2020-08-21.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ConnectContactLens;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['connectparticipant'] = {};\nAWS.ConnectParticipant = Service.defineService('connectparticipant', ['2018-09-07']);\nObject.defineProperty(apiLoader.services['connectparticipant'], '2018-09-07', {\n get: function get() {\n var model = require('../apis/connectparticipant-2018-09-07.min.json');\n model.paginators = require('../apis/connectparticipant-2018-09-07.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ConnectParticipant;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['costexplorer'] = {};\nAWS.CostExplorer = Service.defineService('costexplorer', ['2017-10-25']);\nObject.defineProperty(apiLoader.services['costexplorer'], '2017-10-25', {\n get: function get() {\n var model = require('../apis/ce-2017-10-25.min.json');\n model.paginators = require('../apis/ce-2017-10-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CostExplorer;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cur'] = {};\nAWS.CUR = Service.defineService('cur', ['2017-01-06']);\nObject.defineProperty(apiLoader.services['cur'], '2017-01-06', {\n get: function get() {\n var model = require('../apis/cur-2017-01-06.min.json');\n model.paginators = require('../apis/cur-2017-01-06.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CUR;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['customerprofiles'] = {};\nAWS.CustomerProfiles = Service.defineService('customerprofiles', ['2020-08-15']);\nObject.defineProperty(apiLoader.services['customerprofiles'], '2020-08-15', {\n get: function get() {\n var model = require('../apis/customer-profiles-2020-08-15.min.json');\n model.paginators = require('../apis/customer-profiles-2020-08-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CustomerProfiles;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['databrew'] = {};\nAWS.DataBrew = Service.defineService('databrew', ['2017-07-25']);\nObject.defineProperty(apiLoader.services['databrew'], '2017-07-25', {\n get: function get() {\n var model = require('../apis/databrew-2017-07-25.min.json');\n model.paginators = require('../apis/databrew-2017-07-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DataBrew;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['dataexchange'] = {};\nAWS.DataExchange = Service.defineService('dataexchange', ['2017-07-25']);\nObject.defineProperty(apiLoader.services['dataexchange'], '2017-07-25', {\n get: function get() {\n var model = require('../apis/dataexchange-2017-07-25.min.json');\n model.paginators = require('../apis/dataexchange-2017-07-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DataExchange;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['datapipeline'] = {};\nAWS.DataPipeline = Service.defineService('datapipeline', ['2012-10-29']);\nObject.defineProperty(apiLoader.services['datapipeline'], '2012-10-29', {\n get: function get() {\n var model = require('../apis/datapipeline-2012-10-29.min.json');\n model.paginators = require('../apis/datapipeline-2012-10-29.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DataPipeline;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['datasync'] = {};\nAWS.DataSync = Service.defineService('datasync', ['2018-11-09']);\nObject.defineProperty(apiLoader.services['datasync'], '2018-11-09', {\n get: function get() {\n var model = require('../apis/datasync-2018-11-09.min.json');\n model.paginators = require('../apis/datasync-2018-11-09.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DataSync;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['dax'] = {};\nAWS.DAX = Service.defineService('dax', ['2017-04-19']);\nObject.defineProperty(apiLoader.services['dax'], '2017-04-19', {\n get: function get() {\n var model = require('../apis/dax-2017-04-19.min.json');\n model.paginators = require('../apis/dax-2017-04-19.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DAX;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['detective'] = {};\nAWS.Detective = Service.defineService('detective', ['2018-10-26']);\nObject.defineProperty(apiLoader.services['detective'], '2018-10-26', {\n get: function get() {\n var model = require('../apis/detective-2018-10-26.min.json');\n model.paginators = require('../apis/detective-2018-10-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Detective;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['devicefarm'] = {};\nAWS.DeviceFarm = Service.defineService('devicefarm', ['2015-06-23']);\nObject.defineProperty(apiLoader.services['devicefarm'], '2015-06-23', {\n get: function get() {\n var model = require('../apis/devicefarm-2015-06-23.min.json');\n model.paginators = require('../apis/devicefarm-2015-06-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DeviceFarm;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['devopsguru'] = {};\nAWS.DevOpsGuru = Service.defineService('devopsguru', ['2020-12-01']);\nObject.defineProperty(apiLoader.services['devopsguru'], '2020-12-01', {\n get: function get() {\n var model = require('../apis/devops-guru-2020-12-01.min.json');\n model.paginators = require('../apis/devops-guru-2020-12-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DevOpsGuru;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['directconnect'] = {};\nAWS.DirectConnect = Service.defineService('directconnect', ['2012-10-25']);\nObject.defineProperty(apiLoader.services['directconnect'], '2012-10-25', {\n get: function get() {\n var model = require('../apis/directconnect-2012-10-25.min.json');\n model.paginators = require('../apis/directconnect-2012-10-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DirectConnect;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['directoryservice'] = {};\nAWS.DirectoryService = Service.defineService('directoryservice', ['2015-04-16']);\nObject.defineProperty(apiLoader.services['directoryservice'], '2015-04-16', {\n get: function get() {\n var model = require('../apis/ds-2015-04-16.min.json');\n model.paginators = require('../apis/ds-2015-04-16.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DirectoryService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['discovery'] = {};\nAWS.Discovery = Service.defineService('discovery', ['2015-11-01']);\nObject.defineProperty(apiLoader.services['discovery'], '2015-11-01', {\n get: function get() {\n var model = require('../apis/discovery-2015-11-01.min.json');\n model.paginators = require('../apis/discovery-2015-11-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Discovery;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['dlm'] = {};\nAWS.DLM = Service.defineService('dlm', ['2018-01-12']);\nObject.defineProperty(apiLoader.services['dlm'], '2018-01-12', {\n get: function get() {\n var model = require('../apis/dlm-2018-01-12.min.json');\n model.paginators = require('../apis/dlm-2018-01-12.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DLM;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['dms'] = {};\nAWS.DMS = Service.defineService('dms', ['2016-01-01']);\nObject.defineProperty(apiLoader.services['dms'], '2016-01-01', {\n get: function get() {\n var model = require('../apis/dms-2016-01-01.min.json');\n model.paginators = require('../apis/dms-2016-01-01.paginators.json').pagination;\n model.waiters = require('../apis/dms-2016-01-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DMS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['docdb'] = {};\nAWS.DocDB = Service.defineService('docdb', ['2014-10-31']);\nrequire('../lib/services/docdb');\nObject.defineProperty(apiLoader.services['docdb'], '2014-10-31', {\n get: function get() {\n var model = require('../apis/docdb-2014-10-31.min.json');\n model.paginators = require('../apis/docdb-2014-10-31.paginators.json').pagination;\n model.waiters = require('../apis/docdb-2014-10-31.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DocDB;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['dynamodb'] = {};\nAWS.DynamoDB = Service.defineService('dynamodb', ['2011-12-05', '2012-08-10']);\nrequire('../lib/services/dynamodb');\nObject.defineProperty(apiLoader.services['dynamodb'], '2011-12-05', {\n get: function get() {\n var model = require('../apis/dynamodb-2011-12-05.min.json');\n model.paginators = require('../apis/dynamodb-2011-12-05.paginators.json').pagination;\n model.waiters = require('../apis/dynamodb-2011-12-05.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['dynamodb'], '2012-08-10', {\n get: function get() {\n var model = require('../apis/dynamodb-2012-08-10.min.json');\n model.paginators = require('../apis/dynamodb-2012-08-10.paginators.json').pagination;\n model.waiters = require('../apis/dynamodb-2012-08-10.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DynamoDB;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['dynamodbstreams'] = {};\nAWS.DynamoDBStreams = Service.defineService('dynamodbstreams', ['2012-08-10']);\nObject.defineProperty(apiLoader.services['dynamodbstreams'], '2012-08-10', {\n get: function get() {\n var model = require('../apis/streams.dynamodb-2012-08-10.min.json');\n model.paginators = require('../apis/streams.dynamodb-2012-08-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DynamoDBStreams;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ebs'] = {};\nAWS.EBS = Service.defineService('ebs', ['2019-11-02']);\nObject.defineProperty(apiLoader.services['ebs'], '2019-11-02', {\n get: function get() {\n var model = require('../apis/ebs-2019-11-02.min.json');\n model.paginators = require('../apis/ebs-2019-11-02.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EBS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ec2'] = {};\nAWS.EC2 = Service.defineService('ec2', ['2013-06-15*', '2013-10-15*', '2014-02-01*', '2014-05-01*', '2014-06-15*', '2014-09-01*', '2014-10-01*', '2015-03-01*', '2015-04-15*', '2015-10-01*', '2016-04-01*', '2016-09-15*', '2016-11-15']);\nrequire('../lib/services/ec2');\nObject.defineProperty(apiLoader.services['ec2'], '2016-11-15', {\n get: function get() {\n var model = require('../apis/ec2-2016-11-15.min.json');\n model.paginators = require('../apis/ec2-2016-11-15.paginators.json').pagination;\n model.waiters = require('../apis/ec2-2016-11-15.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EC2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ec2instanceconnect'] = {};\nAWS.EC2InstanceConnect = Service.defineService('ec2instanceconnect', ['2018-04-02']);\nObject.defineProperty(apiLoader.services['ec2instanceconnect'], '2018-04-02', {\n get: function get() {\n var model = require('../apis/ec2-instance-connect-2018-04-02.min.json');\n model.paginators = require('../apis/ec2-instance-connect-2018-04-02.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EC2InstanceConnect;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ecr'] = {};\nAWS.ECR = Service.defineService('ecr', ['2015-09-21']);\nObject.defineProperty(apiLoader.services['ecr'], '2015-09-21', {\n get: function get() {\n var model = require('../apis/ecr-2015-09-21.min.json');\n model.paginators = require('../apis/ecr-2015-09-21.paginators.json').pagination;\n model.waiters = require('../apis/ecr-2015-09-21.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ECR;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ecrpublic'] = {};\nAWS.ECRPUBLIC = Service.defineService('ecrpublic', ['2020-10-30']);\nObject.defineProperty(apiLoader.services['ecrpublic'], '2020-10-30', {\n get: function get() {\n var model = require('../apis/ecr-public-2020-10-30.min.json');\n model.paginators = require('../apis/ecr-public-2020-10-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ECRPUBLIC;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ecs'] = {};\nAWS.ECS = Service.defineService('ecs', ['2014-11-13']);\nObject.defineProperty(apiLoader.services['ecs'], '2014-11-13', {\n get: function get() {\n var model = require('../apis/ecs-2014-11-13.min.json');\n model.paginators = require('../apis/ecs-2014-11-13.paginators.json').pagination;\n model.waiters = require('../apis/ecs-2014-11-13.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ECS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['efs'] = {};\nAWS.EFS = Service.defineService('efs', ['2015-02-01']);\nObject.defineProperty(apiLoader.services['efs'], '2015-02-01', {\n get: function get() {\n var model = require('../apis/elasticfilesystem-2015-02-01.min.json');\n model.paginators = require('../apis/elasticfilesystem-2015-02-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EFS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['eks'] = {};\nAWS.EKS = Service.defineService('eks', ['2017-11-01']);\nObject.defineProperty(apiLoader.services['eks'], '2017-11-01', {\n get: function get() {\n var model = require('../apis/eks-2017-11-01.min.json');\n model.paginators = require('../apis/eks-2017-11-01.paginators.json').pagination;\n model.waiters = require('../apis/eks-2017-11-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EKS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['elasticache'] = {};\nAWS.ElastiCache = Service.defineService('elasticache', ['2012-11-15*', '2014-03-24*', '2014-07-15*', '2014-09-30*', '2015-02-02']);\nObject.defineProperty(apiLoader.services['elasticache'], '2015-02-02', {\n get: function get() {\n var model = require('../apis/elasticache-2015-02-02.min.json');\n model.paginators = require('../apis/elasticache-2015-02-02.paginators.json').pagination;\n model.waiters = require('../apis/elasticache-2015-02-02.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ElastiCache;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['elasticbeanstalk'] = {};\nAWS.ElasticBeanstalk = Service.defineService('elasticbeanstalk', ['2010-12-01']);\nObject.defineProperty(apiLoader.services['elasticbeanstalk'], '2010-12-01', {\n get: function get() {\n var model = require('../apis/elasticbeanstalk-2010-12-01.min.json');\n model.paginators = require('../apis/elasticbeanstalk-2010-12-01.paginators.json').pagination;\n model.waiters = require('../apis/elasticbeanstalk-2010-12-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ElasticBeanstalk;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['elasticinference'] = {};\nAWS.ElasticInference = Service.defineService('elasticinference', ['2017-07-25']);\nObject.defineProperty(apiLoader.services['elasticinference'], '2017-07-25', {\n get: function get() {\n var model = require('../apis/elastic-inference-2017-07-25.min.json');\n model.paginators = require('../apis/elastic-inference-2017-07-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ElasticInference;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['elastictranscoder'] = {};\nAWS.ElasticTranscoder = Service.defineService('elastictranscoder', ['2012-09-25']);\nObject.defineProperty(apiLoader.services['elastictranscoder'], '2012-09-25', {\n get: function get() {\n var model = require('../apis/elastictranscoder-2012-09-25.min.json');\n model.paginators = require('../apis/elastictranscoder-2012-09-25.paginators.json').pagination;\n model.waiters = require('../apis/elastictranscoder-2012-09-25.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ElasticTranscoder;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['elb'] = {};\nAWS.ELB = Service.defineService('elb', ['2012-06-01']);\nObject.defineProperty(apiLoader.services['elb'], '2012-06-01', {\n get: function get() {\n var model = require('../apis/elasticloadbalancing-2012-06-01.min.json');\n model.paginators = require('../apis/elasticloadbalancing-2012-06-01.paginators.json').pagination;\n model.waiters = require('../apis/elasticloadbalancing-2012-06-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ELB;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['elbv2'] = {};\nAWS.ELBv2 = Service.defineService('elbv2', ['2015-12-01']);\nObject.defineProperty(apiLoader.services['elbv2'], '2015-12-01', {\n get: function get() {\n var model = require('../apis/elasticloadbalancingv2-2015-12-01.min.json');\n model.paginators = require('../apis/elasticloadbalancingv2-2015-12-01.paginators.json').pagination;\n model.waiters = require('../apis/elasticloadbalancingv2-2015-12-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ELBv2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['emr'] = {};\nAWS.EMR = Service.defineService('emr', ['2009-03-31']);\nObject.defineProperty(apiLoader.services['emr'], '2009-03-31', {\n get: function get() {\n var model = require('../apis/elasticmapreduce-2009-03-31.min.json');\n model.paginators = require('../apis/elasticmapreduce-2009-03-31.paginators.json').pagination;\n model.waiters = require('../apis/elasticmapreduce-2009-03-31.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EMR;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['emrcontainers'] = {};\nAWS.EMRcontainers = Service.defineService('emrcontainers', ['2020-10-01']);\nObject.defineProperty(apiLoader.services['emrcontainers'], '2020-10-01', {\n get: function get() {\n var model = require('../apis/emr-containers-2020-10-01.min.json');\n model.paginators = require('../apis/emr-containers-2020-10-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EMRcontainers;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['es'] = {};\nAWS.ES = Service.defineService('es', ['2015-01-01']);\nObject.defineProperty(apiLoader.services['es'], '2015-01-01', {\n get: function get() {\n var model = require('../apis/es-2015-01-01.min.json');\n model.paginators = require('../apis/es-2015-01-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ES;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['eventbridge'] = {};\nAWS.EventBridge = Service.defineService('eventbridge', ['2015-10-07']);\nObject.defineProperty(apiLoader.services['eventbridge'], '2015-10-07', {\n get: function get() {\n var model = require('../apis/eventbridge-2015-10-07.min.json');\n model.paginators = require('../apis/eventbridge-2015-10-07.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EventBridge;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['firehose'] = {};\nAWS.Firehose = Service.defineService('firehose', ['2015-08-04']);\nObject.defineProperty(apiLoader.services['firehose'], '2015-08-04', {\n get: function get() {\n var model = require('../apis/firehose-2015-08-04.min.json');\n model.paginators = require('../apis/firehose-2015-08-04.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Firehose;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['fis'] = {};\nAWS.Fis = Service.defineService('fis', ['2020-12-01']);\nObject.defineProperty(apiLoader.services['fis'], '2020-12-01', {\n get: function get() {\n var model = require('../apis/fis-2020-12-01.min.json');\n model.paginators = require('../apis/fis-2020-12-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Fis;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['fms'] = {};\nAWS.FMS = Service.defineService('fms', ['2018-01-01']);\nObject.defineProperty(apiLoader.services['fms'], '2018-01-01', {\n get: function get() {\n var model = require('../apis/fms-2018-01-01.min.json');\n model.paginators = require('../apis/fms-2018-01-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.FMS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['forecastqueryservice'] = {};\nAWS.ForecastQueryService = Service.defineService('forecastqueryservice', ['2018-06-26']);\nObject.defineProperty(apiLoader.services['forecastqueryservice'], '2018-06-26', {\n get: function get() {\n var model = require('../apis/forecastquery-2018-06-26.min.json');\n model.paginators = require('../apis/forecastquery-2018-06-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ForecastQueryService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['forecastservice'] = {};\nAWS.ForecastService = Service.defineService('forecastservice', ['2018-06-26']);\nObject.defineProperty(apiLoader.services['forecastservice'], '2018-06-26', {\n get: function get() {\n var model = require('../apis/forecast-2018-06-26.min.json');\n model.paginators = require('../apis/forecast-2018-06-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ForecastService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['frauddetector'] = {};\nAWS.FraudDetector = Service.defineService('frauddetector', ['2019-11-15']);\nObject.defineProperty(apiLoader.services['frauddetector'], '2019-11-15', {\n get: function get() {\n var model = require('../apis/frauddetector-2019-11-15.min.json');\n model.paginators = require('../apis/frauddetector-2019-11-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.FraudDetector;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['fsx'] = {};\nAWS.FSx = Service.defineService('fsx', ['2018-03-01']);\nObject.defineProperty(apiLoader.services['fsx'], '2018-03-01', {\n get: function get() {\n var model = require('../apis/fsx-2018-03-01.min.json');\n model.paginators = require('../apis/fsx-2018-03-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.FSx;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['gamelift'] = {};\nAWS.GameLift = Service.defineService('gamelift', ['2015-10-01']);\nObject.defineProperty(apiLoader.services['gamelift'], '2015-10-01', {\n get: function get() {\n var model = require('../apis/gamelift-2015-10-01.min.json');\n model.paginators = require('../apis/gamelift-2015-10-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.GameLift;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['glacier'] = {};\nAWS.Glacier = Service.defineService('glacier', ['2012-06-01']);\nrequire('../lib/services/glacier');\nObject.defineProperty(apiLoader.services['glacier'], '2012-06-01', {\n get: function get() {\n var model = require('../apis/glacier-2012-06-01.min.json');\n model.paginators = require('../apis/glacier-2012-06-01.paginators.json').pagination;\n model.waiters = require('../apis/glacier-2012-06-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Glacier;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['globalaccelerator'] = {};\nAWS.GlobalAccelerator = Service.defineService('globalaccelerator', ['2018-08-08']);\nObject.defineProperty(apiLoader.services['globalaccelerator'], '2018-08-08', {\n get: function get() {\n var model = require('../apis/globalaccelerator-2018-08-08.min.json');\n model.paginators = require('../apis/globalaccelerator-2018-08-08.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.GlobalAccelerator;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['glue'] = {};\nAWS.Glue = Service.defineService('glue', ['2017-03-31']);\nObject.defineProperty(apiLoader.services['glue'], '2017-03-31', {\n get: function get() {\n var model = require('../apis/glue-2017-03-31.min.json');\n model.paginators = require('../apis/glue-2017-03-31.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Glue;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['greengrass'] = {};\nAWS.Greengrass = Service.defineService('greengrass', ['2017-06-07']);\nObject.defineProperty(apiLoader.services['greengrass'], '2017-06-07', {\n get: function get() {\n var model = require('../apis/greengrass-2017-06-07.min.json');\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Greengrass;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['greengrassv2'] = {};\nAWS.GreengrassV2 = Service.defineService('greengrassv2', ['2020-11-30']);\nObject.defineProperty(apiLoader.services['greengrassv2'], '2020-11-30', {\n get: function get() {\n var model = require('../apis/greengrassv2-2020-11-30.min.json');\n model.paginators = require('../apis/greengrassv2-2020-11-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.GreengrassV2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['groundstation'] = {};\nAWS.GroundStation = Service.defineService('groundstation', ['2019-05-23']);\nObject.defineProperty(apiLoader.services['groundstation'], '2019-05-23', {\n get: function get() {\n var model = require('../apis/groundstation-2019-05-23.min.json');\n model.paginators = require('../apis/groundstation-2019-05-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.GroundStation;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['guardduty'] = {};\nAWS.GuardDuty = Service.defineService('guardduty', ['2017-11-28']);\nObject.defineProperty(apiLoader.services['guardduty'], '2017-11-28', {\n get: function get() {\n var model = require('../apis/guardduty-2017-11-28.min.json');\n model.paginators = require('../apis/guardduty-2017-11-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.GuardDuty;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['health'] = {};\nAWS.Health = Service.defineService('health', ['2016-08-04']);\nObject.defineProperty(apiLoader.services['health'], '2016-08-04', {\n get: function get() {\n var model = require('../apis/health-2016-08-04.min.json');\n model.paginators = require('../apis/health-2016-08-04.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Health;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['healthlake'] = {};\nAWS.HealthLake = Service.defineService('healthlake', ['2017-07-01']);\nObject.defineProperty(apiLoader.services['healthlake'], '2017-07-01', {\n get: function get() {\n var model = require('../apis/healthlake-2017-07-01.min.json');\n model.paginators = require('../apis/healthlake-2017-07-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.HealthLake;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['honeycode'] = {};\nAWS.Honeycode = Service.defineService('honeycode', ['2020-03-01']);\nObject.defineProperty(apiLoader.services['honeycode'], '2020-03-01', {\n get: function get() {\n var model = require('../apis/honeycode-2020-03-01.min.json');\n model.paginators = require('../apis/honeycode-2020-03-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Honeycode;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iam'] = {};\nAWS.IAM = Service.defineService('iam', ['2010-05-08']);\nObject.defineProperty(apiLoader.services['iam'], '2010-05-08', {\n get: function get() {\n var model = require('../apis/iam-2010-05-08.min.json');\n model.paginators = require('../apis/iam-2010-05-08.paginators.json').pagination;\n model.waiters = require('../apis/iam-2010-05-08.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IAM;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['identitystore'] = {};\nAWS.IdentityStore = Service.defineService('identitystore', ['2020-06-15']);\nObject.defineProperty(apiLoader.services['identitystore'], '2020-06-15', {\n get: function get() {\n var model = require('../apis/identitystore-2020-06-15.min.json');\n model.paginators = require('../apis/identitystore-2020-06-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IdentityStore;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['imagebuilder'] = {};\nAWS.Imagebuilder = Service.defineService('imagebuilder', ['2019-12-02']);\nObject.defineProperty(apiLoader.services['imagebuilder'], '2019-12-02', {\n get: function get() {\n var model = require('../apis/imagebuilder-2019-12-02.min.json');\n model.paginators = require('../apis/imagebuilder-2019-12-02.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Imagebuilder;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['importexport'] = {};\nAWS.ImportExport = Service.defineService('importexport', ['2010-06-01']);\nObject.defineProperty(apiLoader.services['importexport'], '2010-06-01', {\n get: function get() {\n var model = require('../apis/importexport-2010-06-01.min.json');\n model.paginators = require('../apis/importexport-2010-06-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ImportExport;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['inspector'] = {};\nAWS.Inspector = Service.defineService('inspector', ['2015-08-18*', '2016-02-16']);\nObject.defineProperty(apiLoader.services['inspector'], '2016-02-16', {\n get: function get() {\n var model = require('../apis/inspector-2016-02-16.min.json');\n model.paginators = require('../apis/inspector-2016-02-16.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Inspector;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iot'] = {};\nAWS.Iot = Service.defineService('iot', ['2015-05-28']);\nObject.defineProperty(apiLoader.services['iot'], '2015-05-28', {\n get: function get() {\n var model = require('../apis/iot-2015-05-28.min.json');\n model.paginators = require('../apis/iot-2015-05-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Iot;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iot1clickdevicesservice'] = {};\nAWS.IoT1ClickDevicesService = Service.defineService('iot1clickdevicesservice', ['2018-05-14']);\nObject.defineProperty(apiLoader.services['iot1clickdevicesservice'], '2018-05-14', {\n get: function get() {\n var model = require('../apis/iot1click-devices-2018-05-14.min.json');\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoT1ClickDevicesService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iot1clickprojects'] = {};\nAWS.IoT1ClickProjects = Service.defineService('iot1clickprojects', ['2018-05-14']);\nObject.defineProperty(apiLoader.services['iot1clickprojects'], '2018-05-14', {\n get: function get() {\n var model = require('../apis/iot1click-projects-2018-05-14.min.json');\n model.paginators = require('../apis/iot1click-projects-2018-05-14.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoT1ClickProjects;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotanalytics'] = {};\nAWS.IoTAnalytics = Service.defineService('iotanalytics', ['2017-11-27']);\nObject.defineProperty(apiLoader.services['iotanalytics'], '2017-11-27', {\n get: function get() {\n var model = require('../apis/iotanalytics-2017-11-27.min.json');\n model.paginators = require('../apis/iotanalytics-2017-11-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTAnalytics;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotdata'] = {};\nAWS.IotData = Service.defineService('iotdata', ['2015-05-28']);\nrequire('../lib/services/iotdata');\nObject.defineProperty(apiLoader.services['iotdata'], '2015-05-28', {\n get: function get() {\n var model = require('../apis/iot-data-2015-05-28.min.json');\n model.paginators = require('../apis/iot-data-2015-05-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IotData;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotdeviceadvisor'] = {};\nAWS.IotDeviceAdvisor = Service.defineService('iotdeviceadvisor', ['2020-09-18']);\nObject.defineProperty(apiLoader.services['iotdeviceadvisor'], '2020-09-18', {\n get: function get() {\n var model = require('../apis/iotdeviceadvisor-2020-09-18.min.json');\n model.paginators = require('../apis/iotdeviceadvisor-2020-09-18.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IotDeviceAdvisor;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotevents'] = {};\nAWS.IoTEvents = Service.defineService('iotevents', ['2018-07-27']);\nObject.defineProperty(apiLoader.services['iotevents'], '2018-07-27', {\n get: function get() {\n var model = require('../apis/iotevents-2018-07-27.min.json');\n model.paginators = require('../apis/iotevents-2018-07-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTEvents;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ioteventsdata'] = {};\nAWS.IoTEventsData = Service.defineService('ioteventsdata', ['2018-10-23']);\nObject.defineProperty(apiLoader.services['ioteventsdata'], '2018-10-23', {\n get: function get() {\n var model = require('../apis/iotevents-data-2018-10-23.min.json');\n model.paginators = require('../apis/iotevents-data-2018-10-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTEventsData;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotfleethub'] = {};\nAWS.IoTFleetHub = Service.defineService('iotfleethub', ['2020-11-03']);\nObject.defineProperty(apiLoader.services['iotfleethub'], '2020-11-03', {\n get: function get() {\n var model = require('../apis/iotfleethub-2020-11-03.min.json');\n model.paginators = require('../apis/iotfleethub-2020-11-03.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTFleetHub;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotjobsdataplane'] = {};\nAWS.IoTJobsDataPlane = Service.defineService('iotjobsdataplane', ['2017-09-29']);\nObject.defineProperty(apiLoader.services['iotjobsdataplane'], '2017-09-29', {\n get: function get() {\n var model = require('../apis/iot-jobs-data-2017-09-29.min.json');\n model.paginators = require('../apis/iot-jobs-data-2017-09-29.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTJobsDataPlane;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotsecuretunneling'] = {};\nAWS.IoTSecureTunneling = Service.defineService('iotsecuretunneling', ['2018-10-05']);\nObject.defineProperty(apiLoader.services['iotsecuretunneling'], '2018-10-05', {\n get: function get() {\n var model = require('../apis/iotsecuretunneling-2018-10-05.min.json');\n model.paginators = require('../apis/iotsecuretunneling-2018-10-05.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTSecureTunneling;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotsitewise'] = {};\nAWS.IoTSiteWise = Service.defineService('iotsitewise', ['2019-12-02']);\nObject.defineProperty(apiLoader.services['iotsitewise'], '2019-12-02', {\n get: function get() {\n var model = require('../apis/iotsitewise-2019-12-02.min.json');\n model.paginators = require('../apis/iotsitewise-2019-12-02.paginators.json').pagination;\n model.waiters = require('../apis/iotsitewise-2019-12-02.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTSiteWise;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotthingsgraph'] = {};\nAWS.IoTThingsGraph = Service.defineService('iotthingsgraph', ['2018-09-06']);\nObject.defineProperty(apiLoader.services['iotthingsgraph'], '2018-09-06', {\n get: function get() {\n var model = require('../apis/iotthingsgraph-2018-09-06.min.json');\n model.paginators = require('../apis/iotthingsgraph-2018-09-06.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTThingsGraph;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotwireless'] = {};\nAWS.IoTWireless = Service.defineService('iotwireless', ['2020-11-22']);\nObject.defineProperty(apiLoader.services['iotwireless'], '2020-11-22', {\n get: function get() {\n var model = require('../apis/iotwireless-2020-11-22.min.json');\n model.paginators = require('../apis/iotwireless-2020-11-22.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTWireless;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ivs'] = {};\nAWS.IVS = Service.defineService('ivs', ['2020-07-14']);\nObject.defineProperty(apiLoader.services['ivs'], '2020-07-14', {\n get: function get() {\n var model = require('../apis/ivs-2020-07-14.min.json');\n model.paginators = require('../apis/ivs-2020-07-14.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IVS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kafka'] = {};\nAWS.Kafka = Service.defineService('kafka', ['2018-11-14']);\nObject.defineProperty(apiLoader.services['kafka'], '2018-11-14', {\n get: function get() {\n var model = require('../apis/kafka-2018-11-14.min.json');\n model.paginators = require('../apis/kafka-2018-11-14.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Kafka;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kendra'] = {};\nAWS.Kendra = Service.defineService('kendra', ['2019-02-03']);\nObject.defineProperty(apiLoader.services['kendra'], '2019-02-03', {\n get: function get() {\n var model = require('../apis/kendra-2019-02-03.min.json');\n model.paginators = require('../apis/kendra-2019-02-03.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Kendra;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesis'] = {};\nAWS.Kinesis = Service.defineService('kinesis', ['2013-12-02']);\nObject.defineProperty(apiLoader.services['kinesis'], '2013-12-02', {\n get: function get() {\n var model = require('../apis/kinesis-2013-12-02.min.json');\n model.paginators = require('../apis/kinesis-2013-12-02.paginators.json').pagination;\n model.waiters = require('../apis/kinesis-2013-12-02.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Kinesis;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesisanalytics'] = {};\nAWS.KinesisAnalytics = Service.defineService('kinesisanalytics', ['2015-08-14']);\nObject.defineProperty(apiLoader.services['kinesisanalytics'], '2015-08-14', {\n get: function get() {\n var model = require('../apis/kinesisanalytics-2015-08-14.min.json');\n model.paginators = require('../apis/kinesisanalytics-2015-08-14.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KinesisAnalytics;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesisanalyticsv2'] = {};\nAWS.KinesisAnalyticsV2 = Service.defineService('kinesisanalyticsv2', ['2018-05-23']);\nObject.defineProperty(apiLoader.services['kinesisanalyticsv2'], '2018-05-23', {\n get: function get() {\n var model = require('../apis/kinesisanalyticsv2-2018-05-23.min.json');\n model.paginators = require('../apis/kinesisanalyticsv2-2018-05-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KinesisAnalyticsV2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesisvideo'] = {};\nAWS.KinesisVideo = Service.defineService('kinesisvideo', ['2017-09-30']);\nObject.defineProperty(apiLoader.services['kinesisvideo'], '2017-09-30', {\n get: function get() {\n var model = require('../apis/kinesisvideo-2017-09-30.min.json');\n model.paginators = require('../apis/kinesisvideo-2017-09-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KinesisVideo;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesisvideoarchivedmedia'] = {};\nAWS.KinesisVideoArchivedMedia = Service.defineService('kinesisvideoarchivedmedia', ['2017-09-30']);\nObject.defineProperty(apiLoader.services['kinesisvideoarchivedmedia'], '2017-09-30', {\n get: function get() {\n var model = require('../apis/kinesis-video-archived-media-2017-09-30.min.json');\n model.paginators = require('../apis/kinesis-video-archived-media-2017-09-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KinesisVideoArchivedMedia;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesisvideomedia'] = {};\nAWS.KinesisVideoMedia = Service.defineService('kinesisvideomedia', ['2017-09-30']);\nObject.defineProperty(apiLoader.services['kinesisvideomedia'], '2017-09-30', {\n get: function get() {\n var model = require('../apis/kinesis-video-media-2017-09-30.min.json');\n model.paginators = require('../apis/kinesis-video-media-2017-09-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KinesisVideoMedia;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesisvideosignalingchannels'] = {};\nAWS.KinesisVideoSignalingChannels = Service.defineService('kinesisvideosignalingchannels', ['2019-12-04']);\nObject.defineProperty(apiLoader.services['kinesisvideosignalingchannels'], '2019-12-04', {\n get: function get() {\n var model = require('../apis/kinesis-video-signaling-2019-12-04.min.json');\n model.paginators = require('../apis/kinesis-video-signaling-2019-12-04.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KinesisVideoSignalingChannels;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kms'] = {};\nAWS.KMS = Service.defineService('kms', ['2014-11-01']);\nObject.defineProperty(apiLoader.services['kms'], '2014-11-01', {\n get: function get() {\n var model = require('../apis/kms-2014-11-01.min.json');\n model.paginators = require('../apis/kms-2014-11-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KMS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lakeformation'] = {};\nAWS.LakeFormation = Service.defineService('lakeformation', ['2017-03-31']);\nObject.defineProperty(apiLoader.services['lakeformation'], '2017-03-31', {\n get: function get() {\n var model = require('../apis/lakeformation-2017-03-31.min.json');\n model.paginators = require('../apis/lakeformation-2017-03-31.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LakeFormation;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lambda'] = {};\nAWS.Lambda = Service.defineService('lambda', ['2014-11-11', '2015-03-31']);\nrequire('../lib/services/lambda');\nObject.defineProperty(apiLoader.services['lambda'], '2014-11-11', {\n get: function get() {\n var model = require('../apis/lambda-2014-11-11.min.json');\n model.paginators = require('../apis/lambda-2014-11-11.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['lambda'], '2015-03-31', {\n get: function get() {\n var model = require('../apis/lambda-2015-03-31.min.json');\n model.paginators = require('../apis/lambda-2015-03-31.paginators.json').pagination;\n model.waiters = require('../apis/lambda-2015-03-31.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Lambda;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lexmodelbuildingservice'] = {};\nAWS.LexModelBuildingService = Service.defineService('lexmodelbuildingservice', ['2017-04-19']);\nObject.defineProperty(apiLoader.services['lexmodelbuildingservice'], '2017-04-19', {\n get: function get() {\n var model = require('../apis/lex-models-2017-04-19.min.json');\n model.paginators = require('../apis/lex-models-2017-04-19.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LexModelBuildingService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lexmodelsv2'] = {};\nAWS.LexModelsV2 = Service.defineService('lexmodelsv2', ['2020-08-07']);\nrequire('../lib/services/lexmodelsv2');\nObject.defineProperty(apiLoader.services['lexmodelsv2'], '2020-08-07', {\n get: function get() {\n var model = require('../apis/models.lex.v2-2020-08-07.min.json');\n model.paginators = require('../apis/models.lex.v2-2020-08-07.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LexModelsV2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lexruntime'] = {};\nAWS.LexRuntime = Service.defineService('lexruntime', ['2016-11-28']);\nObject.defineProperty(apiLoader.services['lexruntime'], '2016-11-28', {\n get: function get() {\n var model = require('../apis/runtime.lex-2016-11-28.min.json');\n model.paginators = require('../apis/runtime.lex-2016-11-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LexRuntime;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lexruntimev2'] = {};\nAWS.LexRuntimeV2 = Service.defineService('lexruntimev2', ['2020-08-07']);\nObject.defineProperty(apiLoader.services['lexruntimev2'], '2020-08-07', {\n get: function get() {\n var model = require('../apis/runtime.lex.v2-2020-08-07.min.json');\n model.paginators = require('../apis/runtime.lex.v2-2020-08-07.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LexRuntimeV2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['licensemanager'] = {};\nAWS.LicenseManager = Service.defineService('licensemanager', ['2018-08-01']);\nObject.defineProperty(apiLoader.services['licensemanager'], '2018-08-01', {\n get: function get() {\n var model = require('../apis/license-manager-2018-08-01.min.json');\n model.paginators = require('../apis/license-manager-2018-08-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LicenseManager;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lightsail'] = {};\nAWS.Lightsail = Service.defineService('lightsail', ['2016-11-28']);\nObject.defineProperty(apiLoader.services['lightsail'], '2016-11-28', {\n get: function get() {\n var model = require('../apis/lightsail-2016-11-28.min.json');\n model.paginators = require('../apis/lightsail-2016-11-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Lightsail;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['location'] = {};\nAWS.Location = Service.defineService('location', ['2020-11-19']);\nObject.defineProperty(apiLoader.services['location'], '2020-11-19', {\n get: function get() {\n var model = require('../apis/location-2020-11-19.min.json');\n model.paginators = require('../apis/location-2020-11-19.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Location;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lookoutequipment'] = {};\nAWS.LookoutEquipment = Service.defineService('lookoutequipment', ['2020-12-15']);\nObject.defineProperty(apiLoader.services['lookoutequipment'], '2020-12-15', {\n get: function get() {\n var model = require('../apis/lookoutequipment-2020-12-15.min.json');\n model.paginators = require('../apis/lookoutequipment-2020-12-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LookoutEquipment;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lookoutmetrics'] = {};\nAWS.LookoutMetrics = Service.defineService('lookoutmetrics', ['2017-07-25']);\nrequire('../lib/services/lookoutmetrics');\nObject.defineProperty(apiLoader.services['lookoutmetrics'], '2017-07-25', {\n get: function get() {\n var model = require('../apis/lookoutmetrics-2017-07-25.min.json');\n model.paginators = require('../apis/lookoutmetrics-2017-07-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LookoutMetrics;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lookoutvision'] = {};\nAWS.LookoutVision = Service.defineService('lookoutvision', ['2020-11-20']);\nObject.defineProperty(apiLoader.services['lookoutvision'], '2020-11-20', {\n get: function get() {\n var model = require('../apis/lookoutvision-2020-11-20.min.json');\n model.paginators = require('../apis/lookoutvision-2020-11-20.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LookoutVision;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['machinelearning'] = {};\nAWS.MachineLearning = Service.defineService('machinelearning', ['2014-12-12']);\nrequire('../lib/services/machinelearning');\nObject.defineProperty(apiLoader.services['machinelearning'], '2014-12-12', {\n get: function get() {\n var model = require('../apis/machinelearning-2014-12-12.min.json');\n model.paginators = require('../apis/machinelearning-2014-12-12.paginators.json').pagination;\n model.waiters = require('../apis/machinelearning-2014-12-12.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MachineLearning;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['macie'] = {};\nAWS.Macie = Service.defineService('macie', ['2017-12-19']);\nObject.defineProperty(apiLoader.services['macie'], '2017-12-19', {\n get: function get() {\n var model = require('../apis/macie-2017-12-19.min.json');\n model.paginators = require('../apis/macie-2017-12-19.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Macie;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['macie2'] = {};\nAWS.Macie2 = Service.defineService('macie2', ['2020-01-01']);\nObject.defineProperty(apiLoader.services['macie2'], '2020-01-01', {\n get: function get() {\n var model = require('../apis/macie2-2020-01-01.min.json');\n model.paginators = require('../apis/macie2-2020-01-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Macie2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['managedblockchain'] = {};\nAWS.ManagedBlockchain = Service.defineService('managedblockchain', ['2018-09-24']);\nObject.defineProperty(apiLoader.services['managedblockchain'], '2018-09-24', {\n get: function get() {\n var model = require('../apis/managedblockchain-2018-09-24.min.json');\n model.paginators = require('../apis/managedblockchain-2018-09-24.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ManagedBlockchain;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['marketplacecatalog'] = {};\nAWS.MarketplaceCatalog = Service.defineService('marketplacecatalog', ['2018-09-17']);\nObject.defineProperty(apiLoader.services['marketplacecatalog'], '2018-09-17', {\n get: function get() {\n var model = require('../apis/marketplace-catalog-2018-09-17.min.json');\n model.paginators = require('../apis/marketplace-catalog-2018-09-17.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MarketplaceCatalog;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['marketplacecommerceanalytics'] = {};\nAWS.MarketplaceCommerceAnalytics = Service.defineService('marketplacecommerceanalytics', ['2015-07-01']);\nObject.defineProperty(apiLoader.services['marketplacecommerceanalytics'], '2015-07-01', {\n get: function get() {\n var model = require('../apis/marketplacecommerceanalytics-2015-07-01.min.json');\n model.paginators = require('../apis/marketplacecommerceanalytics-2015-07-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MarketplaceCommerceAnalytics;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['marketplaceentitlementservice'] = {};\nAWS.MarketplaceEntitlementService = Service.defineService('marketplaceentitlementservice', ['2017-01-11']);\nObject.defineProperty(apiLoader.services['marketplaceentitlementservice'], '2017-01-11', {\n get: function get() {\n var model = require('../apis/entitlement.marketplace-2017-01-11.min.json');\n model.paginators = require('../apis/entitlement.marketplace-2017-01-11.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MarketplaceEntitlementService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['marketplacemetering'] = {};\nAWS.MarketplaceMetering = Service.defineService('marketplacemetering', ['2016-01-14']);\nObject.defineProperty(apiLoader.services['marketplacemetering'], '2016-01-14', {\n get: function get() {\n var model = require('../apis/meteringmarketplace-2016-01-14.min.json');\n model.paginators = require('../apis/meteringmarketplace-2016-01-14.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MarketplaceMetering;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mediaconnect'] = {};\nAWS.MediaConnect = Service.defineService('mediaconnect', ['2018-11-14']);\nObject.defineProperty(apiLoader.services['mediaconnect'], '2018-11-14', {\n get: function get() {\n var model = require('../apis/mediaconnect-2018-11-14.min.json');\n model.paginators = require('../apis/mediaconnect-2018-11-14.paginators.json').pagination;\n model.waiters = require('../apis/mediaconnect-2018-11-14.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MediaConnect;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mediaconvert'] = {};\nAWS.MediaConvert = Service.defineService('mediaconvert', ['2017-08-29']);\nObject.defineProperty(apiLoader.services['mediaconvert'], '2017-08-29', {\n get: function get() {\n var model = require('../apis/mediaconvert-2017-08-29.min.json');\n model.paginators = require('../apis/mediaconvert-2017-08-29.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MediaConvert;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['medialive'] = {};\nAWS.MediaLive = Service.defineService('medialive', ['2017-10-14']);\nObject.defineProperty(apiLoader.services['medialive'], '2017-10-14', {\n get: function get() {\n var model = require('../apis/medialive-2017-10-14.min.json');\n model.paginators = require('../apis/medialive-2017-10-14.paginators.json').pagination;\n model.waiters = require('../apis/medialive-2017-10-14.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MediaLive;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mediapackage'] = {};\nAWS.MediaPackage = Service.defineService('mediapackage', ['2017-10-12']);\nObject.defineProperty(apiLoader.services['mediapackage'], '2017-10-12', {\n get: function get() {\n var model = require('../apis/mediapackage-2017-10-12.min.json');\n model.paginators = require('../apis/mediapackage-2017-10-12.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MediaPackage;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mediapackagevod'] = {};\nAWS.MediaPackageVod = Service.defineService('mediapackagevod', ['2018-11-07']);\nObject.defineProperty(apiLoader.services['mediapackagevod'], '2018-11-07', {\n get: function get() {\n var model = require('../apis/mediapackage-vod-2018-11-07.min.json');\n model.paginators = require('../apis/mediapackage-vod-2018-11-07.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MediaPackageVod;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mediastore'] = {};\nAWS.MediaStore = Service.defineService('mediastore', ['2017-09-01']);\nObject.defineProperty(apiLoader.services['mediastore'], '2017-09-01', {\n get: function get() {\n var model = require('../apis/mediastore-2017-09-01.min.json');\n model.paginators = require('../apis/mediastore-2017-09-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MediaStore;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mediastoredata'] = {};\nAWS.MediaStoreData = Service.defineService('mediastoredata', ['2017-09-01']);\nObject.defineProperty(apiLoader.services['mediastoredata'], '2017-09-01', {\n get: function get() {\n var model = require('../apis/mediastore-data-2017-09-01.min.json');\n model.paginators = require('../apis/mediastore-data-2017-09-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MediaStoreData;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mediatailor'] = {};\nAWS.MediaTailor = Service.defineService('mediatailor', ['2018-04-23']);\nObject.defineProperty(apiLoader.services['mediatailor'], '2018-04-23', {\n get: function get() {\n var model = require('../apis/mediatailor-2018-04-23.min.json');\n model.paginators = require('../apis/mediatailor-2018-04-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MediaTailor;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mgn'] = {};\nAWS.Mgn = Service.defineService('mgn', ['2020-02-26']);\nObject.defineProperty(apiLoader.services['mgn'], '2020-02-26', {\n get: function get() {\n var model = require('../apis/mgn-2020-02-26.min.json');\n model.paginators = require('../apis/mgn-2020-02-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Mgn;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['migrationhub'] = {};\nAWS.MigrationHub = Service.defineService('migrationhub', ['2017-05-31']);\nObject.defineProperty(apiLoader.services['migrationhub'], '2017-05-31', {\n get: function get() {\n var model = require('../apis/AWSMigrationHub-2017-05-31.min.json');\n model.paginators = require('../apis/AWSMigrationHub-2017-05-31.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MigrationHub;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['migrationhubconfig'] = {};\nAWS.MigrationHubConfig = Service.defineService('migrationhubconfig', ['2019-06-30']);\nObject.defineProperty(apiLoader.services['migrationhubconfig'], '2019-06-30', {\n get: function get() {\n var model = require('../apis/migrationhub-config-2019-06-30.min.json');\n model.paginators = require('../apis/migrationhub-config-2019-06-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MigrationHubConfig;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mobile'] = {};\nAWS.Mobile = Service.defineService('mobile', ['2017-07-01']);\nObject.defineProperty(apiLoader.services['mobile'], '2017-07-01', {\n get: function get() {\n var model = require('../apis/mobile-2017-07-01.min.json');\n model.paginators = require('../apis/mobile-2017-07-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Mobile;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mobileanalytics'] = {};\nAWS.MobileAnalytics = Service.defineService('mobileanalytics', ['2014-06-05']);\nObject.defineProperty(apiLoader.services['mobileanalytics'], '2014-06-05', {\n get: function get() {\n var model = require('../apis/mobileanalytics-2014-06-05.min.json');\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MobileAnalytics;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mq'] = {};\nAWS.MQ = Service.defineService('mq', ['2017-11-27']);\nObject.defineProperty(apiLoader.services['mq'], '2017-11-27', {\n get: function get() {\n var model = require('../apis/mq-2017-11-27.min.json');\n model.paginators = require('../apis/mq-2017-11-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MQ;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mturk'] = {};\nAWS.MTurk = Service.defineService('mturk', ['2017-01-17']);\nObject.defineProperty(apiLoader.services['mturk'], '2017-01-17', {\n get: function get() {\n var model = require('../apis/mturk-requester-2017-01-17.min.json');\n model.paginators = require('../apis/mturk-requester-2017-01-17.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MTurk;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mwaa'] = {};\nAWS.MWAA = Service.defineService('mwaa', ['2020-07-01']);\nObject.defineProperty(apiLoader.services['mwaa'], '2020-07-01', {\n get: function get() {\n var model = require('../apis/mwaa-2020-07-01.min.json');\n model.paginators = require('../apis/mwaa-2020-07-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MWAA;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['neptune'] = {};\nAWS.Neptune = Service.defineService('neptune', ['2014-10-31']);\nrequire('../lib/services/neptune');\nObject.defineProperty(apiLoader.services['neptune'], '2014-10-31', {\n get: function get() {\n var model = require('../apis/neptune-2014-10-31.min.json');\n model.paginators = require('../apis/neptune-2014-10-31.paginators.json').pagination;\n model.waiters = require('../apis/neptune-2014-10-31.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Neptune;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['networkfirewall'] = {};\nAWS.NetworkFirewall = Service.defineService('networkfirewall', ['2020-11-12']);\nObject.defineProperty(apiLoader.services['networkfirewall'], '2020-11-12', {\n get: function get() {\n var model = require('../apis/network-firewall-2020-11-12.min.json');\n model.paginators = require('../apis/network-firewall-2020-11-12.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.NetworkFirewall;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['networkmanager'] = {};\nAWS.NetworkManager = Service.defineService('networkmanager', ['2019-07-05']);\nObject.defineProperty(apiLoader.services['networkmanager'], '2019-07-05', {\n get: function get() {\n var model = require('../apis/networkmanager-2019-07-05.min.json');\n model.paginators = require('../apis/networkmanager-2019-07-05.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.NetworkManager;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['opsworks'] = {};\nAWS.OpsWorks = Service.defineService('opsworks', ['2013-02-18']);\nObject.defineProperty(apiLoader.services['opsworks'], '2013-02-18', {\n get: function get() {\n var model = require('../apis/opsworks-2013-02-18.min.json');\n model.paginators = require('../apis/opsworks-2013-02-18.paginators.json').pagination;\n model.waiters = require('../apis/opsworks-2013-02-18.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.OpsWorks;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['opsworkscm'] = {};\nAWS.OpsWorksCM = Service.defineService('opsworkscm', ['2016-11-01']);\nObject.defineProperty(apiLoader.services['opsworkscm'], '2016-11-01', {\n get: function get() {\n var model = require('../apis/opsworkscm-2016-11-01.min.json');\n model.paginators = require('../apis/opsworkscm-2016-11-01.paginators.json').pagination;\n model.waiters = require('../apis/opsworkscm-2016-11-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.OpsWorksCM;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['organizations'] = {};\nAWS.Organizations = Service.defineService('organizations', ['2016-11-28']);\nObject.defineProperty(apiLoader.services['organizations'], '2016-11-28', {\n get: function get() {\n var model = require('../apis/organizations-2016-11-28.min.json');\n model.paginators = require('../apis/organizations-2016-11-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Organizations;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['outposts'] = {};\nAWS.Outposts = Service.defineService('outposts', ['2019-12-03']);\nObject.defineProperty(apiLoader.services['outposts'], '2019-12-03', {\n get: function get() {\n var model = require('../apis/outposts-2019-12-03.min.json');\n model.paginators = require('../apis/outposts-2019-12-03.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Outposts;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['personalize'] = {};\nAWS.Personalize = Service.defineService('personalize', ['2018-05-22']);\nObject.defineProperty(apiLoader.services['personalize'], '2018-05-22', {\n get: function get() {\n var model = require('../apis/personalize-2018-05-22.min.json');\n model.paginators = require('../apis/personalize-2018-05-22.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Personalize;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['personalizeevents'] = {};\nAWS.PersonalizeEvents = Service.defineService('personalizeevents', ['2018-03-22']);\nObject.defineProperty(apiLoader.services['personalizeevents'], '2018-03-22', {\n get: function get() {\n var model = require('../apis/personalize-events-2018-03-22.min.json');\n model.paginators = require('../apis/personalize-events-2018-03-22.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.PersonalizeEvents;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['personalizeruntime'] = {};\nAWS.PersonalizeRuntime = Service.defineService('personalizeruntime', ['2018-05-22']);\nObject.defineProperty(apiLoader.services['personalizeruntime'], '2018-05-22', {\n get: function get() {\n var model = require('../apis/personalize-runtime-2018-05-22.min.json');\n model.paginators = require('../apis/personalize-runtime-2018-05-22.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.PersonalizeRuntime;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['pi'] = {};\nAWS.PI = Service.defineService('pi', ['2018-02-27']);\nObject.defineProperty(apiLoader.services['pi'], '2018-02-27', {\n get: function get() {\n var model = require('../apis/pi-2018-02-27.min.json');\n model.paginators = require('../apis/pi-2018-02-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.PI;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['pinpoint'] = {};\nAWS.Pinpoint = Service.defineService('pinpoint', ['2016-12-01']);\nObject.defineProperty(apiLoader.services['pinpoint'], '2016-12-01', {\n get: function get() {\n var model = require('../apis/pinpoint-2016-12-01.min.json');\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Pinpoint;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['pinpointemail'] = {};\nAWS.PinpointEmail = Service.defineService('pinpointemail', ['2018-07-26']);\nObject.defineProperty(apiLoader.services['pinpointemail'], '2018-07-26', {\n get: function get() {\n var model = require('../apis/pinpoint-email-2018-07-26.min.json');\n model.paginators = require('../apis/pinpoint-email-2018-07-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.PinpointEmail;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['pinpointsmsvoice'] = {};\nAWS.PinpointSMSVoice = Service.defineService('pinpointsmsvoice', ['2018-09-05']);\nObject.defineProperty(apiLoader.services['pinpointsmsvoice'], '2018-09-05', {\n get: function get() {\n var model = require('../apis/sms-voice-2018-09-05.min.json');\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.PinpointSMSVoice;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['polly'] = {};\nAWS.Polly = Service.defineService('polly', ['2016-06-10']);\nrequire('../lib/services/polly');\nObject.defineProperty(apiLoader.services['polly'], '2016-06-10', {\n get: function get() {\n var model = require('../apis/polly-2016-06-10.min.json');\n model.paginators = require('../apis/polly-2016-06-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Polly;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['pricing'] = {};\nAWS.Pricing = Service.defineService('pricing', ['2017-10-15']);\nObject.defineProperty(apiLoader.services['pricing'], '2017-10-15', {\n get: function get() {\n var model = require('../apis/pricing-2017-10-15.min.json');\n model.paginators = require('../apis/pricing-2017-10-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Pricing;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['qldb'] = {};\nAWS.QLDB = Service.defineService('qldb', ['2019-01-02']);\nObject.defineProperty(apiLoader.services['qldb'], '2019-01-02', {\n get: function get() {\n var model = require('../apis/qldb-2019-01-02.min.json');\n model.paginators = require('../apis/qldb-2019-01-02.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.QLDB;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['qldbsession'] = {};\nAWS.QLDBSession = Service.defineService('qldbsession', ['2019-07-11']);\nObject.defineProperty(apiLoader.services['qldbsession'], '2019-07-11', {\n get: function get() {\n var model = require('../apis/qldb-session-2019-07-11.min.json');\n model.paginators = require('../apis/qldb-session-2019-07-11.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.QLDBSession;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['quicksight'] = {};\nAWS.QuickSight = Service.defineService('quicksight', ['2018-04-01']);\nObject.defineProperty(apiLoader.services['quicksight'], '2018-04-01', {\n get: function get() {\n var model = require('../apis/quicksight-2018-04-01.min.json');\n model.paginators = require('../apis/quicksight-2018-04-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.QuickSight;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ram'] = {};\nAWS.RAM = Service.defineService('ram', ['2018-01-04']);\nObject.defineProperty(apiLoader.services['ram'], '2018-01-04', {\n get: function get() {\n var model = require('../apis/ram-2018-01-04.min.json');\n model.paginators = require('../apis/ram-2018-01-04.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.RAM;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['rds'] = {};\nAWS.RDS = Service.defineService('rds', ['2013-01-10', '2013-02-12', '2013-09-09', '2014-09-01', '2014-09-01*', '2014-10-31']);\nrequire('../lib/services/rds');\nObject.defineProperty(apiLoader.services['rds'], '2013-01-10', {\n get: function get() {\n var model = require('../apis/rds-2013-01-10.min.json');\n model.paginators = require('../apis/rds-2013-01-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['rds'], '2013-02-12', {\n get: function get() {\n var model = require('../apis/rds-2013-02-12.min.json');\n model.paginators = require('../apis/rds-2013-02-12.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['rds'], '2013-09-09', {\n get: function get() {\n var model = require('../apis/rds-2013-09-09.min.json');\n model.paginators = require('../apis/rds-2013-09-09.paginators.json').pagination;\n model.waiters = require('../apis/rds-2013-09-09.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['rds'], '2014-09-01', {\n get: function get() {\n var model = require('../apis/rds-2014-09-01.min.json');\n model.paginators = require('../apis/rds-2014-09-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['rds'], '2014-10-31', {\n get: function get() {\n var model = require('../apis/rds-2014-10-31.min.json');\n model.paginators = require('../apis/rds-2014-10-31.paginators.json').pagination;\n model.waiters = require('../apis/rds-2014-10-31.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.RDS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['rdsdataservice'] = {};\nAWS.RDSDataService = Service.defineService('rdsdataservice', ['2018-08-01']);\nrequire('../lib/services/rdsdataservice');\nObject.defineProperty(apiLoader.services['rdsdataservice'], '2018-08-01', {\n get: function get() {\n var model = require('../apis/rds-data-2018-08-01.min.json');\n model.paginators = require('../apis/rds-data-2018-08-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.RDSDataService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['redshift'] = {};\nAWS.Redshift = Service.defineService('redshift', ['2012-12-01']);\nObject.defineProperty(apiLoader.services['redshift'], '2012-12-01', {\n get: function get() {\n var model = require('../apis/redshift-2012-12-01.min.json');\n model.paginators = require('../apis/redshift-2012-12-01.paginators.json').pagination;\n model.waiters = require('../apis/redshift-2012-12-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Redshift;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['redshiftdata'] = {};\nAWS.RedshiftData = Service.defineService('redshiftdata', ['2019-12-20']);\nObject.defineProperty(apiLoader.services['redshiftdata'], '2019-12-20', {\n get: function get() {\n var model = require('../apis/redshift-data-2019-12-20.min.json');\n model.paginators = require('../apis/redshift-data-2019-12-20.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.RedshiftData;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['rekognition'] = {};\nAWS.Rekognition = Service.defineService('rekognition', ['2016-06-27']);\nObject.defineProperty(apiLoader.services['rekognition'], '2016-06-27', {\n get: function get() {\n var model = require('../apis/rekognition-2016-06-27.min.json');\n model.paginators = require('../apis/rekognition-2016-06-27.paginators.json').pagination;\n model.waiters = require('../apis/rekognition-2016-06-27.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Rekognition;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['resourcegroups'] = {};\nAWS.ResourceGroups = Service.defineService('resourcegroups', ['2017-11-27']);\nObject.defineProperty(apiLoader.services['resourcegroups'], '2017-11-27', {\n get: function get() {\n var model = require('../apis/resource-groups-2017-11-27.min.json');\n model.paginators = require('../apis/resource-groups-2017-11-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ResourceGroups;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['resourcegroupstaggingapi'] = {};\nAWS.ResourceGroupsTaggingAPI = Service.defineService('resourcegroupstaggingapi', ['2017-01-26']);\nObject.defineProperty(apiLoader.services['resourcegroupstaggingapi'], '2017-01-26', {\n get: function get() {\n var model = require('../apis/resourcegroupstaggingapi-2017-01-26.min.json');\n model.paginators = require('../apis/resourcegroupstaggingapi-2017-01-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ResourceGroupsTaggingAPI;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['robomaker'] = {};\nAWS.RoboMaker = Service.defineService('robomaker', ['2018-06-29']);\nObject.defineProperty(apiLoader.services['robomaker'], '2018-06-29', {\n get: function get() {\n var model = require('../apis/robomaker-2018-06-29.min.json');\n model.paginators = require('../apis/robomaker-2018-06-29.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.RoboMaker;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['route53'] = {};\nAWS.Route53 = Service.defineService('route53', ['2013-04-01']);\nrequire('../lib/services/route53');\nObject.defineProperty(apiLoader.services['route53'], '2013-04-01', {\n get: function get() {\n var model = require('../apis/route53-2013-04-01.min.json');\n model.paginators = require('../apis/route53-2013-04-01.paginators.json').pagination;\n model.waiters = require('../apis/route53-2013-04-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Route53;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['route53domains'] = {};\nAWS.Route53Domains = Service.defineService('route53domains', ['2014-05-15']);\nObject.defineProperty(apiLoader.services['route53domains'], '2014-05-15', {\n get: function get() {\n var model = require('../apis/route53domains-2014-05-15.min.json');\n model.paginators = require('../apis/route53domains-2014-05-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Route53Domains;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['route53resolver'] = {};\nAWS.Route53Resolver = Service.defineService('route53resolver', ['2018-04-01']);\nObject.defineProperty(apiLoader.services['route53resolver'], '2018-04-01', {\n get: function get() {\n var model = require('../apis/route53resolver-2018-04-01.min.json');\n model.paginators = require('../apis/route53resolver-2018-04-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Route53Resolver;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['s3'] = {};\nAWS.S3 = Service.defineService('s3', ['2006-03-01']);\nrequire('../lib/services/s3');\nObject.defineProperty(apiLoader.services['s3'], '2006-03-01', {\n get: function get() {\n var model = require('../apis/s3-2006-03-01.min.json');\n model.paginators = require('../apis/s3-2006-03-01.paginators.json').pagination;\n model.waiters = require('../apis/s3-2006-03-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.S3;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['s3control'] = {};\nAWS.S3Control = Service.defineService('s3control', ['2018-08-20']);\nrequire('../lib/services/s3control');\nObject.defineProperty(apiLoader.services['s3control'], '2018-08-20', {\n get: function get() {\n var model = require('../apis/s3control-2018-08-20.min.json');\n model.paginators = require('../apis/s3control-2018-08-20.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.S3Control;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['s3outposts'] = {};\nAWS.S3Outposts = Service.defineService('s3outposts', ['2017-07-25']);\nObject.defineProperty(apiLoader.services['s3outposts'], '2017-07-25', {\n get: function get() {\n var model = require('../apis/s3outposts-2017-07-25.min.json');\n model.paginators = require('../apis/s3outposts-2017-07-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.S3Outposts;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sagemaker'] = {};\nAWS.SageMaker = Service.defineService('sagemaker', ['2017-07-24']);\nObject.defineProperty(apiLoader.services['sagemaker'], '2017-07-24', {\n get: function get() {\n var model = require('../apis/sagemaker-2017-07-24.min.json');\n model.paginators = require('../apis/sagemaker-2017-07-24.paginators.json').pagination;\n model.waiters = require('../apis/sagemaker-2017-07-24.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SageMaker;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sagemakeredge'] = {};\nAWS.SagemakerEdge = Service.defineService('sagemakeredge', ['2020-09-23']);\nObject.defineProperty(apiLoader.services['sagemakeredge'], '2020-09-23', {\n get: function get() {\n var model = require('../apis/sagemaker-edge-2020-09-23.min.json');\n model.paginators = require('../apis/sagemaker-edge-2020-09-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SagemakerEdge;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sagemakerfeaturestoreruntime'] = {};\nAWS.SageMakerFeatureStoreRuntime = Service.defineService('sagemakerfeaturestoreruntime', ['2020-07-01']);\nObject.defineProperty(apiLoader.services['sagemakerfeaturestoreruntime'], '2020-07-01', {\n get: function get() {\n var model = require('../apis/sagemaker-featurestore-runtime-2020-07-01.min.json');\n model.paginators = require('../apis/sagemaker-featurestore-runtime-2020-07-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SageMakerFeatureStoreRuntime;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sagemakerruntime'] = {};\nAWS.SageMakerRuntime = Service.defineService('sagemakerruntime', ['2017-05-13']);\nObject.defineProperty(apiLoader.services['sagemakerruntime'], '2017-05-13', {\n get: function get() {\n var model = require('../apis/runtime.sagemaker-2017-05-13.min.json');\n model.paginators = require('../apis/runtime.sagemaker-2017-05-13.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SageMakerRuntime;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['savingsplans'] = {};\nAWS.SavingsPlans = Service.defineService('savingsplans', ['2019-06-28']);\nObject.defineProperty(apiLoader.services['savingsplans'], '2019-06-28', {\n get: function get() {\n var model = require('../apis/savingsplans-2019-06-28.min.json');\n model.paginators = require('../apis/savingsplans-2019-06-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SavingsPlans;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['schemas'] = {};\nAWS.Schemas = Service.defineService('schemas', ['2019-12-02']);\nObject.defineProperty(apiLoader.services['schemas'], '2019-12-02', {\n get: function get() {\n var model = require('../apis/schemas-2019-12-02.min.json');\n model.paginators = require('../apis/schemas-2019-12-02.paginators.json').pagination;\n model.waiters = require('../apis/schemas-2019-12-02.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Schemas;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['secretsmanager'] = {};\nAWS.SecretsManager = Service.defineService('secretsmanager', ['2017-10-17']);\nObject.defineProperty(apiLoader.services['secretsmanager'], '2017-10-17', {\n get: function get() {\n var model = require('../apis/secretsmanager-2017-10-17.min.json');\n model.paginators = require('../apis/secretsmanager-2017-10-17.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SecretsManager;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['securityhub'] = {};\nAWS.SecurityHub = Service.defineService('securityhub', ['2018-10-26']);\nObject.defineProperty(apiLoader.services['securityhub'], '2018-10-26', {\n get: function get() {\n var model = require('../apis/securityhub-2018-10-26.min.json');\n model.paginators = require('../apis/securityhub-2018-10-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SecurityHub;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['serverlessapplicationrepository'] = {};\nAWS.ServerlessApplicationRepository = Service.defineService('serverlessapplicationrepository', ['2017-09-08']);\nObject.defineProperty(apiLoader.services['serverlessapplicationrepository'], '2017-09-08', {\n get: function get() {\n var model = require('../apis/serverlessrepo-2017-09-08.min.json');\n model.paginators = require('../apis/serverlessrepo-2017-09-08.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ServerlessApplicationRepository;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['servicecatalog'] = {};\nAWS.ServiceCatalog = Service.defineService('servicecatalog', ['2015-12-10']);\nObject.defineProperty(apiLoader.services['servicecatalog'], '2015-12-10', {\n get: function get() {\n var model = require('../apis/servicecatalog-2015-12-10.min.json');\n model.paginators = require('../apis/servicecatalog-2015-12-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ServiceCatalog;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['servicecatalogappregistry'] = {};\nAWS.ServiceCatalogAppRegistry = Service.defineService('servicecatalogappregistry', ['2020-06-24']);\nObject.defineProperty(apiLoader.services['servicecatalogappregistry'], '2020-06-24', {\n get: function get() {\n var model = require('../apis/servicecatalog-appregistry-2020-06-24.min.json');\n model.paginators = require('../apis/servicecatalog-appregistry-2020-06-24.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ServiceCatalogAppRegistry;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['servicediscovery'] = {};\nAWS.ServiceDiscovery = Service.defineService('servicediscovery', ['2017-03-14']);\nObject.defineProperty(apiLoader.services['servicediscovery'], '2017-03-14', {\n get: function get() {\n var model = require('../apis/servicediscovery-2017-03-14.min.json');\n model.paginators = require('../apis/servicediscovery-2017-03-14.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ServiceDiscovery;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['servicequotas'] = {};\nAWS.ServiceQuotas = Service.defineService('servicequotas', ['2019-06-24']);\nObject.defineProperty(apiLoader.services['servicequotas'], '2019-06-24', {\n get: function get() {\n var model = require('../apis/service-quotas-2019-06-24.min.json');\n model.paginators = require('../apis/service-quotas-2019-06-24.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ServiceQuotas;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ses'] = {};\nAWS.SES = Service.defineService('ses', ['2010-12-01']);\nObject.defineProperty(apiLoader.services['ses'], '2010-12-01', {\n get: function get() {\n var model = require('../apis/email-2010-12-01.min.json');\n model.paginators = require('../apis/email-2010-12-01.paginators.json').pagination;\n model.waiters = require('../apis/email-2010-12-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SES;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sesv2'] = {};\nAWS.SESV2 = Service.defineService('sesv2', ['2019-09-27']);\nObject.defineProperty(apiLoader.services['sesv2'], '2019-09-27', {\n get: function get() {\n var model = require('../apis/sesv2-2019-09-27.min.json');\n model.paginators = require('../apis/sesv2-2019-09-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SESV2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['shield'] = {};\nAWS.Shield = Service.defineService('shield', ['2016-06-02']);\nObject.defineProperty(apiLoader.services['shield'], '2016-06-02', {\n get: function get() {\n var model = require('../apis/shield-2016-06-02.min.json');\n model.paginators = require('../apis/shield-2016-06-02.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Shield;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['signer'] = {};\nAWS.Signer = Service.defineService('signer', ['2017-08-25']);\nObject.defineProperty(apiLoader.services['signer'], '2017-08-25', {\n get: function get() {\n var model = require('../apis/signer-2017-08-25.min.json');\n model.paginators = require('../apis/signer-2017-08-25.paginators.json').pagination;\n model.waiters = require('../apis/signer-2017-08-25.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Signer;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['simpledb'] = {};\nAWS.SimpleDB = Service.defineService('simpledb', ['2009-04-15']);\nObject.defineProperty(apiLoader.services['simpledb'], '2009-04-15', {\n get: function get() {\n var model = require('../apis/sdb-2009-04-15.min.json');\n model.paginators = require('../apis/sdb-2009-04-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SimpleDB;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sms'] = {};\nAWS.SMS = Service.defineService('sms', ['2016-10-24']);\nObject.defineProperty(apiLoader.services['sms'], '2016-10-24', {\n get: function get() {\n var model = require('../apis/sms-2016-10-24.min.json');\n model.paginators = require('../apis/sms-2016-10-24.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SMS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['snowball'] = {};\nAWS.Snowball = Service.defineService('snowball', ['2016-06-30']);\nObject.defineProperty(apiLoader.services['snowball'], '2016-06-30', {\n get: function get() {\n var model = require('../apis/snowball-2016-06-30.min.json');\n model.paginators = require('../apis/snowball-2016-06-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Snowball;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sns'] = {};\nAWS.SNS = Service.defineService('sns', ['2010-03-31']);\nObject.defineProperty(apiLoader.services['sns'], '2010-03-31', {\n get: function get() {\n var model = require('../apis/sns-2010-03-31.min.json');\n model.paginators = require('../apis/sns-2010-03-31.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SNS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sqs'] = {};\nAWS.SQS = Service.defineService('sqs', ['2012-11-05']);\nrequire('../lib/services/sqs');\nObject.defineProperty(apiLoader.services['sqs'], '2012-11-05', {\n get: function get() {\n var model = require('../apis/sqs-2012-11-05.min.json');\n model.paginators = require('../apis/sqs-2012-11-05.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SQS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ssm'] = {};\nAWS.SSM = Service.defineService('ssm', ['2014-11-06']);\nObject.defineProperty(apiLoader.services['ssm'], '2014-11-06', {\n get: function get() {\n var model = require('../apis/ssm-2014-11-06.min.json');\n model.paginators = require('../apis/ssm-2014-11-06.paginators.json').pagination;\n model.waiters = require('../apis/ssm-2014-11-06.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SSM;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sso'] = {};\nAWS.SSO = Service.defineService('sso', ['2019-06-10']);\nObject.defineProperty(apiLoader.services['sso'], '2019-06-10', {\n get: function get() {\n var model = require('../apis/sso-2019-06-10.min.json');\n model.paginators = require('../apis/sso-2019-06-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SSO;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ssoadmin'] = {};\nAWS.SSOAdmin = Service.defineService('ssoadmin', ['2020-07-20']);\nObject.defineProperty(apiLoader.services['ssoadmin'], '2020-07-20', {\n get: function get() {\n var model = require('../apis/sso-admin-2020-07-20.min.json');\n model.paginators = require('../apis/sso-admin-2020-07-20.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SSOAdmin;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ssooidc'] = {};\nAWS.SSOOIDC = Service.defineService('ssooidc', ['2019-06-10']);\nObject.defineProperty(apiLoader.services['ssooidc'], '2019-06-10', {\n get: function get() {\n var model = require('../apis/sso-oidc-2019-06-10.min.json');\n model.paginators = require('../apis/sso-oidc-2019-06-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SSOOIDC;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['stepfunctions'] = {};\nAWS.StepFunctions = Service.defineService('stepfunctions', ['2016-11-23']);\nObject.defineProperty(apiLoader.services['stepfunctions'], '2016-11-23', {\n get: function get() {\n var model = require('../apis/states-2016-11-23.min.json');\n model.paginators = require('../apis/states-2016-11-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.StepFunctions;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['storagegateway'] = {};\nAWS.StorageGateway = Service.defineService('storagegateway', ['2013-06-30']);\nObject.defineProperty(apiLoader.services['storagegateway'], '2013-06-30', {\n get: function get() {\n var model = require('../apis/storagegateway-2013-06-30.min.json');\n model.paginators = require('../apis/storagegateway-2013-06-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.StorageGateway;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sts'] = {};\nAWS.STS = Service.defineService('sts', ['2011-06-15']);\nrequire('../lib/services/sts');\nObject.defineProperty(apiLoader.services['sts'], '2011-06-15', {\n get: function get() {\n var model = require('../apis/sts-2011-06-15.min.json');\n model.paginators = require('../apis/sts-2011-06-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.STS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['support'] = {};\nAWS.Support = Service.defineService('support', ['2013-04-15']);\nObject.defineProperty(apiLoader.services['support'], '2013-04-15', {\n get: function get() {\n var model = require('../apis/support-2013-04-15.min.json');\n model.paginators = require('../apis/support-2013-04-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Support;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['swf'] = {};\nAWS.SWF = Service.defineService('swf', ['2012-01-25']);\nrequire('../lib/services/swf');\nObject.defineProperty(apiLoader.services['swf'], '2012-01-25', {\n get: function get() {\n var model = require('../apis/swf-2012-01-25.min.json');\n model.paginators = require('../apis/swf-2012-01-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SWF;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['synthetics'] = {};\nAWS.Synthetics = Service.defineService('synthetics', ['2017-10-11']);\nObject.defineProperty(apiLoader.services['synthetics'], '2017-10-11', {\n get: function get() {\n var model = require('../apis/synthetics-2017-10-11.min.json');\n model.paginators = require('../apis/synthetics-2017-10-11.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Synthetics;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['textract'] = {};\nAWS.Textract = Service.defineService('textract', ['2018-06-27']);\nObject.defineProperty(apiLoader.services['textract'], '2018-06-27', {\n get: function get() {\n var model = require('../apis/textract-2018-06-27.min.json');\n model.paginators = require('../apis/textract-2018-06-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Textract;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['timestreamquery'] = {};\nAWS.TimestreamQuery = Service.defineService('timestreamquery', ['2018-11-01']);\nObject.defineProperty(apiLoader.services['timestreamquery'], '2018-11-01', {\n get: function get() {\n var model = require('../apis/timestream-query-2018-11-01.min.json');\n model.paginators = require('../apis/timestream-query-2018-11-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.TimestreamQuery;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['timestreamwrite'] = {};\nAWS.TimestreamWrite = Service.defineService('timestreamwrite', ['2018-11-01']);\nObject.defineProperty(apiLoader.services['timestreamwrite'], '2018-11-01', {\n get: function get() {\n var model = require('../apis/timestream-write-2018-11-01.min.json');\n model.paginators = require('../apis/timestream-write-2018-11-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.TimestreamWrite;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['transcribeservice'] = {};\nAWS.TranscribeService = Service.defineService('transcribeservice', ['2017-10-26']);\nObject.defineProperty(apiLoader.services['transcribeservice'], '2017-10-26', {\n get: function get() {\n var model = require('../apis/transcribe-2017-10-26.min.json');\n model.paginators = require('../apis/transcribe-2017-10-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.TranscribeService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['transfer'] = {};\nAWS.Transfer = Service.defineService('transfer', ['2018-11-05']);\nObject.defineProperty(apiLoader.services['transfer'], '2018-11-05', {\n get: function get() {\n var model = require('../apis/transfer-2018-11-05.min.json');\n model.paginators = require('../apis/transfer-2018-11-05.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Transfer;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['translate'] = {};\nAWS.Translate = Service.defineService('translate', ['2017-07-01']);\nObject.defineProperty(apiLoader.services['translate'], '2017-07-01', {\n get: function get() {\n var model = require('../apis/translate-2017-07-01.min.json');\n model.paginators = require('../apis/translate-2017-07-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Translate;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['waf'] = {};\nAWS.WAF = Service.defineService('waf', ['2015-08-24']);\nObject.defineProperty(apiLoader.services['waf'], '2015-08-24', {\n get: function get() {\n var model = require('../apis/waf-2015-08-24.min.json');\n model.paginators = require('../apis/waf-2015-08-24.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WAF;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['wafregional'] = {};\nAWS.WAFRegional = Service.defineService('wafregional', ['2016-11-28']);\nObject.defineProperty(apiLoader.services['wafregional'], '2016-11-28', {\n get: function get() {\n var model = require('../apis/waf-regional-2016-11-28.min.json');\n model.paginators = require('../apis/waf-regional-2016-11-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WAFRegional;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['wafv2'] = {};\nAWS.WAFV2 = Service.defineService('wafv2', ['2019-07-29']);\nObject.defineProperty(apiLoader.services['wafv2'], '2019-07-29', {\n get: function get() {\n var model = require('../apis/wafv2-2019-07-29.min.json');\n model.paginators = require('../apis/wafv2-2019-07-29.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WAFV2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['wellarchitected'] = {};\nAWS.WellArchitected = Service.defineService('wellarchitected', ['2020-03-31']);\nObject.defineProperty(apiLoader.services['wellarchitected'], '2020-03-31', {\n get: function get() {\n var model = require('../apis/wellarchitected-2020-03-31.min.json');\n model.paginators = require('../apis/wellarchitected-2020-03-31.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WellArchitected;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['workdocs'] = {};\nAWS.WorkDocs = Service.defineService('workdocs', ['2016-05-01']);\nObject.defineProperty(apiLoader.services['workdocs'], '2016-05-01', {\n get: function get() {\n var model = require('../apis/workdocs-2016-05-01.min.json');\n model.paginators = require('../apis/workdocs-2016-05-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WorkDocs;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['worklink'] = {};\nAWS.WorkLink = Service.defineService('worklink', ['2018-09-25']);\nObject.defineProperty(apiLoader.services['worklink'], '2018-09-25', {\n get: function get() {\n var model = require('../apis/worklink-2018-09-25.min.json');\n model.paginators = require('../apis/worklink-2018-09-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WorkLink;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['workmail'] = {};\nAWS.WorkMail = Service.defineService('workmail', ['2017-10-01']);\nObject.defineProperty(apiLoader.services['workmail'], '2017-10-01', {\n get: function get() {\n var model = require('../apis/workmail-2017-10-01.min.json');\n model.paginators = require('../apis/workmail-2017-10-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WorkMail;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['workmailmessageflow'] = {};\nAWS.WorkMailMessageFlow = Service.defineService('workmailmessageflow', ['2019-05-01']);\nObject.defineProperty(apiLoader.services['workmailmessageflow'], '2019-05-01', {\n get: function get() {\n var model = require('../apis/workmailmessageflow-2019-05-01.min.json');\n model.paginators = require('../apis/workmailmessageflow-2019-05-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WorkMailMessageFlow;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['workspaces'] = {};\nAWS.WorkSpaces = Service.defineService('workspaces', ['2015-04-08']);\nObject.defineProperty(apiLoader.services['workspaces'], '2015-04-08', {\n get: function get() {\n var model = require('../apis/workspaces-2015-04-08.min.json');\n model.paginators = require('../apis/workspaces-2015-04-08.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WorkSpaces;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['xray'] = {};\nAWS.XRay = Service.defineService('xray', ['2016-04-12']);\nObject.defineProperty(apiLoader.services['xray'], '2016-04-12', {\n get: function get() {\n var model = require('../apis/xray-2016-04-12.min.json');\n model.paginators = require('../apis/xray-2016-04-12.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.XRay;\n","function apiLoader(svc, version) {\n if (!apiLoader.services.hasOwnProperty(svc)) {\n throw new Error('InvalidService: Failed to load api for ' + svc);\n }\n return apiLoader.services[svc][version];\n}\n\n/**\n * @api private\n *\n * This member of AWS.apiLoader is private, but changing it will necessitate a\n * change to ../scripts/services-table-generator.ts\n */\napiLoader.services = {};\n\n/**\n * @api private\n */\nmodule.exports = apiLoader;\n","require('./node_loader');\n\nvar AWS = require('./core');\n\n// Load all service classes\nrequire('../clients/all');\n\n/**\n * @api private\n */\nmodule.exports = AWS;\n","var AWS = require('../core'),\n url = AWS.util.url,\n crypto = AWS.util.crypto.lib,\n base64Encode = AWS.util.base64.encode,\n inherit = AWS.util.inherit;\n\nvar queryEncode = function (string) {\n var replacements = {\n '+': '-',\n '=': '_',\n '/': '~'\n };\n return string.replace(/[\\+=\\/]/g, function (match) {\n return replacements[match];\n });\n};\n\nvar signPolicy = function (policy, privateKey) {\n var sign = crypto.createSign('RSA-SHA1');\n sign.write(policy);\n return queryEncode(sign.sign(privateKey, 'base64'));\n};\n\nvar signWithCannedPolicy = function (url, expires, keyPairId, privateKey) {\n var policy = JSON.stringify({\n Statement: [\n {\n Resource: url,\n Condition: { DateLessThan: { 'AWS:EpochTime': expires } }\n }\n ]\n });\n\n return {\n Expires: expires,\n 'Key-Pair-Id': keyPairId,\n Signature: signPolicy(policy.toString(), privateKey)\n };\n};\n\nvar signWithCustomPolicy = function (policy, keyPairId, privateKey) {\n policy = policy.replace(/\\s/mg, '');\n\n return {\n Policy: queryEncode(base64Encode(policy)),\n 'Key-Pair-Id': keyPairId,\n Signature: signPolicy(policy, privateKey)\n };\n};\n\nvar determineScheme = function (url) {\n var parts = url.split('://');\n if (parts.length < 2) {\n throw new Error('Invalid URL.');\n }\n\n return parts[0].replace('*', '');\n};\n\nvar getRtmpUrl = function (rtmpUrl) {\n var parsed = url.parse(rtmpUrl);\n return parsed.path.replace(/^\\//, '') + (parsed.hash || '');\n};\n\nvar getResource = function (url) {\n switch (determineScheme(url)) {\n case 'http':\n case 'https':\n return url;\n case 'rtmp':\n return getRtmpUrl(url);\n default:\n throw new Error('Invalid URI scheme. Scheme must be one of'\n + ' http, https, or rtmp');\n }\n};\n\nvar handleError = function (err, callback) {\n if (!callback || typeof callback !== 'function') {\n throw err;\n }\n\n callback(err);\n};\n\nvar handleSuccess = function (result, callback) {\n if (!callback || typeof callback !== 'function') {\n return result;\n }\n\n callback(null, result);\n};\n\nAWS.CloudFront.Signer = inherit({\n /**\n * A signer object can be used to generate signed URLs and cookies for granting\n * access to content on restricted CloudFront distributions.\n *\n * @see http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html\n *\n * @param keyPairId [String] (Required) The ID of the CloudFront key pair\n * being used.\n * @param privateKey [String] (Required) A private key in RSA format.\n */\n constructor: function Signer(keyPairId, privateKey) {\n if (keyPairId === void 0 || privateKey === void 0) {\n throw new Error('A key pair ID and private key are required');\n }\n\n this.keyPairId = keyPairId;\n this.privateKey = privateKey;\n },\n\n /**\n * Create a signed Amazon CloudFront Cookie.\n *\n * @param options [Object] The options to create a signed cookie.\n * @option options url [String] The URL to which the signature will grant\n * access. Required unless you pass in a full\n * policy.\n * @option options expires [Number] A Unix UTC timestamp indicating when the\n * signature should expire. Required unless you\n * pass in a full policy.\n * @option options policy [String] A CloudFront JSON policy. Required unless\n * you pass in a url and an expiry time.\n *\n * @param cb [Function] if a callback is provided, this function will\n * pass the hash as the second parameter (after the error parameter) to\n * the callback function.\n *\n * @return [Object] if called synchronously (with no callback), returns the\n * signed cookie parameters.\n * @return [null] nothing is returned if a callback is provided.\n */\n getSignedCookie: function (options, cb) {\n var signatureHash = 'policy' in options\n ? signWithCustomPolicy(options.policy, this.keyPairId, this.privateKey)\n : signWithCannedPolicy(options.url, options.expires, this.keyPairId, this.privateKey);\n\n var cookieHash = {};\n for (var key in signatureHash) {\n if (Object.prototype.hasOwnProperty.call(signatureHash, key)) {\n cookieHash['CloudFront-' + key] = signatureHash[key];\n }\n }\n\n return handleSuccess(cookieHash, cb);\n },\n\n /**\n * Create a signed Amazon CloudFront URL.\n *\n * Keep in mind that URLs meant for use in media/flash players may have\n * different requirements for URL formats (e.g. some require that the\n * extension be removed, some require the file name to be prefixed\n * - mp4:, some require you to add \"/cfx/st\" into your URL).\n *\n * @param options [Object] The options to create a signed URL.\n * @option options url [String] The URL to which the signature will grant\n * access. Any query params included with\n * the URL should be encoded. Required.\n * @option options expires [Number] A Unix UTC timestamp indicating when the\n * signature should expire. Required unless you\n * pass in a full policy.\n * @option options policy [String] A CloudFront JSON policy. Required unless\n * you pass in a url and an expiry time.\n *\n * @param cb [Function] if a callback is provided, this function will\n * pass the URL as the second parameter (after the error parameter) to\n * the callback function.\n *\n * @return [String] if called synchronously (with no callback), returns the\n * signed URL.\n * @return [null] nothing is returned if a callback is provided.\n */\n getSignedUrl: function (options, cb) {\n try {\n var resource = getResource(options.url);\n } catch (err) {\n return handleError(err, cb);\n }\n\n var parsedUrl = url.parse(options.url, true),\n signatureHash = Object.prototype.hasOwnProperty.call(options, 'policy')\n ? signWithCustomPolicy(options.policy, this.keyPairId, this.privateKey)\n : signWithCannedPolicy(resource, options.expires, this.keyPairId, this.privateKey);\n\n parsedUrl.search = null;\n for (var key in signatureHash) {\n if (Object.prototype.hasOwnProperty.call(signatureHash, key)) {\n parsedUrl.query[key] = signatureHash[key];\n }\n }\n\n try {\n var signedUrl = determineScheme(options.url) === 'rtmp'\n ? getRtmpUrl(url.format(parsedUrl))\n : url.format(parsedUrl);\n } catch (err) {\n return handleError(err, cb);\n }\n\n return handleSuccess(signedUrl, cb);\n }\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.CloudFront.Signer;\n","var AWS = require('./core');\nrequire('./credentials');\nrequire('./credentials/credential_provider_chain');\nvar PromisesDependency;\n\n/**\n * The main configuration class used by all service objects to set\n * the region, credentials, and other options for requests.\n *\n * By default, credentials and region settings are left unconfigured.\n * This should be configured by the application before using any\n * AWS service APIs.\n *\n * In order to set global configuration options, properties should\n * be assigned to the global {AWS.config} object.\n *\n * @see AWS.config\n *\n * @!group General Configuration Options\n *\n * @!attribute credentials\n * @return [AWS.Credentials] the AWS credentials to sign requests with.\n *\n * @!attribute region\n * @example Set the global region setting to us-west-2\n * AWS.config.update({region: 'us-west-2'});\n * @return [AWS.Credentials] The region to send service requests to.\n * @see http://docs.amazonwebservices.com/general/latest/gr/rande.html\n * A list of available endpoints for each AWS service\n *\n * @!attribute maxRetries\n * @return [Integer] the maximum amount of retries to perform for a\n * service request. By default this value is calculated by the specific\n * service object that the request is being made to.\n *\n * @!attribute maxRedirects\n * @return [Integer] the maximum amount of redirects to follow for a\n * service request. Defaults to 10.\n *\n * @!attribute paramValidation\n * @return [Boolean|map] whether input parameters should be validated against\n * the operation description before sending the request. Defaults to true.\n * Pass a map to enable any of the following specific validation features:\n *\n * * **min** [Boolean] — Validates that a value meets the min\n * constraint. This is enabled by default when paramValidation is set\n * to `true`.\n * * **max** [Boolean] — Validates that a value meets the max\n * constraint.\n * * **pattern** [Boolean] — Validates that a string value matches a\n * regular expression.\n * * **enum** [Boolean] — Validates that a string value matches one\n * of the allowable enum values.\n *\n * @!attribute computeChecksums\n * @return [Boolean] whether to compute checksums for payload bodies when\n * the service accepts it (currently supported in S3 only).\n *\n * @!attribute convertResponseTypes\n * @return [Boolean] whether types are converted when parsing response data.\n * Currently only supported for JSON based services. Turning this off may\n * improve performance on large response payloads. Defaults to `true`.\n *\n * @!attribute correctClockSkew\n * @return [Boolean] whether to apply a clock skew correction and retry\n * requests that fail because of an skewed client clock. Defaults to\n * `false`.\n *\n * @!attribute sslEnabled\n * @return [Boolean] whether SSL is enabled for requests\n *\n * @!attribute s3ForcePathStyle\n * @return [Boolean] whether to force path style URLs for S3 objects\n *\n * @!attribute s3BucketEndpoint\n * @note Setting this configuration option requires an `endpoint` to be\n * provided explicitly to the service constructor.\n * @return [Boolean] whether the provided endpoint addresses an individual\n * bucket (false if it addresses the root API endpoint).\n *\n * @!attribute s3DisableBodySigning\n * @return [Boolean] whether to disable S3 body signing when using signature version `v4`.\n * Body signing can only be disabled when using https. Defaults to `true`.\n *\n * @!attribute s3UsEast1RegionalEndpoint\n * @return ['legacy'|'regional'] when region is set to 'us-east-1', whether to send s3\n * request to global endpoints or 'us-east-1' regional endpoints. This config is only\n * applicable to S3 client;\n * Defaults to 'legacy'\n * @!attribute s3UseArnRegion\n * @return [Boolean] whether to override the request region with the region inferred\n * from requested resource's ARN. Only available for S3 buckets\n * Defaults to `true`\n *\n * @!attribute useAccelerateEndpoint\n * @note This configuration option is only compatible with S3 while accessing\n * dns-compatible buckets.\n * @return [Boolean] Whether to use the Accelerate endpoint with the S3 service.\n * Defaults to `false`.\n *\n * @!attribute retryDelayOptions\n * @example Set the base retry delay for all services to 300 ms\n * AWS.config.update({retryDelayOptions: {base: 300}});\n * // Delays with maxRetries = 3: 300, 600, 1200\n * @example Set a custom backoff function to provide delay values on retries\n * AWS.config.update({retryDelayOptions: {customBackoff: function(retryCount, err) {\n * // returns delay in ms\n * }}});\n * @return [map] A set of options to configure the retry delay on retryable errors.\n * Currently supported options are:\n *\n * * **base** [Integer] — The base number of milliseconds to use in the\n * exponential backoff for operation retries. Defaults to 100 ms for all services except\n * DynamoDB, where it defaults to 50ms.\n *\n * * **customBackoff ** [function] — A custom function that accepts a\n * retry count and error and returns the amount of time to delay in\n * milliseconds. If the result is a non-zero negative value, no further\n * retry attempts will be made. The `base` option will be ignored if this\n * option is supplied. The function is only called for retryable errors.\n *\n * @!attribute httpOptions\n * @return [map] A set of options to pass to the low-level HTTP request.\n * Currently supported options are:\n *\n * * **proxy** [String] — the URL to proxy requests through\n * * **agent** [http.Agent, https.Agent] — the Agent object to perform\n * HTTP requests with. Used for connection pooling. Note that for\n * SSL connections, a special Agent object is used in order to enable\n * peer certificate verification. This feature is only supported in the\n * Node.js environment.\n * * **connectTimeout** [Integer] — Sets the socket to timeout after\n * failing to establish a connection with the server after\n * `connectTimeout` milliseconds. This timeout has no effect once a socket\n * connection has been established.\n * * **timeout** [Integer] — The number of milliseconds a request can\n * take before automatically being terminated.\n * Defaults to two minutes (120000).\n * * **xhrAsync** [Boolean] — Whether the SDK will send asynchronous\n * HTTP requests. Used in the browser environment only. Set to false to\n * send requests synchronously. Defaults to true (async on).\n * * **xhrWithCredentials** [Boolean] — Sets the \"withCredentials\"\n * property of an XMLHttpRequest object. Used in the browser environment\n * only. Defaults to false.\n * @!attribute logger\n * @return [#write,#log] an object that responds to .write() (like a stream)\n * or .log() (like the console object) in order to log information about\n * requests\n *\n * @!attribute systemClockOffset\n * @return [Number] an offset value in milliseconds to apply to all signing\n * times. Use this to compensate for clock skew when your system may be\n * out of sync with the service time. Note that this configuration option\n * can only be applied to the global `AWS.config` object and cannot be\n * overridden in service-specific configuration. Defaults to 0 milliseconds.\n *\n * @!attribute signatureVersion\n * @return [String] the signature version to sign requests with (overriding\n * the API configuration). Possible values are: 'v2', 'v3', 'v4'.\n *\n * @!attribute signatureCache\n * @return [Boolean] whether the signature to sign requests with (overriding\n * the API configuration) is cached. Only applies to the signature version 'v4'.\n * Defaults to `true`.\n *\n * @!attribute endpointDiscoveryEnabled\n * @return [Boolean|undefined] whether to call operations with endpoints\n * given by service dynamically. Setting this config to `true` will enable\n * endpoint discovery for all applicable operations. Setting it to `false`\n * will explicitly disable endpoint discovery even though operations that\n * require endpoint discovery will presumably fail. Leaving it to\n * `undefined` means SDK only do endpoint discovery when it's required.\n * Defaults to `undefined`\n *\n * @!attribute endpointCacheSize\n * @return [Number] the size of the global cache storing endpoints from endpoint\n * discovery operations. Once endpoint cache is created, updating this setting\n * cannot change existing cache size.\n * Defaults to 1000\n *\n * @!attribute hostPrefixEnabled\n * @return [Boolean] whether to marshal request parameters to the prefix of\n * hostname. Defaults to `true`.\n *\n * @!attribute stsRegionalEndpoints\n * @return ['legacy'|'regional'] whether to send sts request to global endpoints or\n * regional endpoints.\n * Defaults to 'legacy'\n */\nAWS.Config = AWS.util.inherit({\n /**\n * @!endgroup\n */\n\n /**\n * Creates a new configuration object. This is the object that passes\n * option data along to service requests, including credentials, security,\n * region information, and some service specific settings.\n *\n * @example Creating a new configuration object with credentials and region\n * var config = new AWS.Config({\n * accessKeyId: 'AKID', secretAccessKey: 'SECRET', region: 'us-west-2'\n * });\n * @option options accessKeyId [String] your AWS access key ID.\n * @option options secretAccessKey [String] your AWS secret access key.\n * @option options sessionToken [AWS.Credentials] the optional AWS\n * session token to sign requests with.\n * @option options credentials [AWS.Credentials] the AWS credentials\n * to sign requests with. You can either specify this object, or\n * specify the accessKeyId and secretAccessKey options directly.\n * @option options credentialProvider [AWS.CredentialProviderChain] the\n * provider chain used to resolve credentials if no static `credentials`\n * property is set.\n * @option options region [String] the region to send service requests to.\n * See {region} for more information.\n * @option options maxRetries [Integer] the maximum amount of retries to\n * attempt with a request. See {maxRetries} for more information.\n * @option options maxRedirects [Integer] the maximum amount of redirects to\n * follow with a request. See {maxRedirects} for more information.\n * @option options sslEnabled [Boolean] whether to enable SSL for\n * requests.\n * @option options paramValidation [Boolean|map] whether input parameters\n * should be validated against the operation description before sending\n * the request. Defaults to true. Pass a map to enable any of the\n * following specific validation features:\n *\n * * **min** [Boolean] — Validates that a value meets the min\n * constraint. This is enabled by default when paramValidation is set\n * to `true`.\n * * **max** [Boolean] — Validates that a value meets the max\n * constraint.\n * * **pattern** [Boolean] — Validates that a string value matches a\n * regular expression.\n * * **enum** [Boolean] — Validates that a string value matches one\n * of the allowable enum values.\n * @option options computeChecksums [Boolean] whether to compute checksums\n * for payload bodies when the service accepts it (currently supported\n * in S3 only)\n * @option options convertResponseTypes [Boolean] whether types are converted\n * when parsing response data. Currently only supported for JSON based\n * services. Turning this off may improve performance on large response\n * payloads. Defaults to `true`.\n * @option options correctClockSkew [Boolean] whether to apply a clock skew\n * correction and retry requests that fail because of an skewed client\n * clock. Defaults to `false`.\n * @option options s3ForcePathStyle [Boolean] whether to force path\n * style URLs for S3 objects.\n * @option options s3BucketEndpoint [Boolean] whether the provided endpoint\n * addresses an individual bucket (false if it addresses the root API\n * endpoint). Note that setting this configuration option requires an\n * `endpoint` to be provided explicitly to the service constructor.\n * @option options s3DisableBodySigning [Boolean] whether S3 body signing\n * should be disabled when using signature version `v4`. Body signing\n * can only be disabled when using https. Defaults to `true`.\n * @option options s3UsEast1RegionalEndpoint ['legacy'|'regional'] when region\n * is set to 'us-east-1', whether to send s3 request to global endpoints or\n * 'us-east-1' regional endpoints. This config is only applicable to S3 client.\n * Defaults to `legacy`\n * @option options s3UseArnRegion [Boolean] whether to override the request region\n * with the region inferred from requested resource's ARN. Only available for S3 buckets\n * Defaults to `true`\n *\n * @option options retryDelayOptions [map] A set of options to configure\n * the retry delay on retryable errors. Currently supported options are:\n *\n * * **base** [Integer] — The base number of milliseconds to use in the\n * exponential backoff for operation retries. Defaults to 100 ms for all\n * services except DynamoDB, where it defaults to 50ms.\n * * **customBackoff ** [function] — A custom function that accepts a\n * retry count and error and returns the amount of time to delay in\n * milliseconds. If the result is a non-zero negative value, no further\n * retry attempts will be made. The `base` option will be ignored if this\n * option is supplied. The function is only called for retryable errors.\n * @option options httpOptions [map] A set of options to pass to the low-level\n * HTTP request. Currently supported options are:\n *\n * * **proxy** [String] — the URL to proxy requests through\n * * **agent** [http.Agent, https.Agent] — the Agent object to perform\n * HTTP requests with. Used for connection pooling. Defaults to the global\n * agent (`http.globalAgent`) for non-SSL connections. Note that for\n * SSL connections, a special Agent object is used in order to enable\n * peer certificate verification. This feature is only available in the\n * Node.js environment.\n * * **connectTimeout** [Integer] — Sets the socket to timeout after\n * failing to establish a connection with the server after\n * `connectTimeout` milliseconds. This timeout has no effect once a socket\n * connection has been established.\n * * **timeout** [Integer] — Sets the socket to timeout after timeout\n * milliseconds of inactivity on the socket. Defaults to two minutes\n * (120000).\n * * **xhrAsync** [Boolean] — Whether the SDK will send asynchronous\n * HTTP requests. Used in the browser environment only. Set to false to\n * send requests synchronously. Defaults to true (async on).\n * * **xhrWithCredentials** [Boolean] — Sets the \"withCredentials\"\n * property of an XMLHttpRequest object. Used in the browser environment\n * only. Defaults to false.\n * @option options apiVersion [String, Date] a String in YYYY-MM-DD format\n * (or a date) that represents the latest possible API version that can be\n * used in all services (unless overridden by `apiVersions`). Specify\n * 'latest' to use the latest possible version.\n * @option options apiVersions [map] a map of service\n * identifiers (the lowercase service class name) with the API version to\n * use when instantiating a service. Specify 'latest' for each individual\n * that can use the latest available version.\n * @option options logger [#write,#log] an object that responds to .write()\n * (like a stream) or .log() (like the console object) in order to log\n * information about requests\n * @option options systemClockOffset [Number] an offset value in milliseconds\n * to apply to all signing times. Use this to compensate for clock skew\n * when your system may be out of sync with the service time. Note that\n * this configuration option can only be applied to the global `AWS.config`\n * object and cannot be overridden in service-specific configuration.\n * Defaults to 0 milliseconds.\n * @option options signatureVersion [String] the signature version to sign\n * requests with (overriding the API configuration). Possible values are:\n * 'v2', 'v3', 'v4'.\n * @option options signatureCache [Boolean] whether the signature to sign\n * requests with (overriding the API configuration) is cached. Only applies\n * to the signature version 'v4'. Defaults to `true`.\n * @option options dynamoDbCrc32 [Boolean] whether to validate the CRC32\n * checksum of HTTP response bodies returned by DynamoDB. Default: `true`.\n * @option options useAccelerateEndpoint [Boolean] Whether to use the\n * S3 Transfer Acceleration endpoint with the S3 service. Default: `false`.\n * @option options clientSideMonitoring [Boolean] whether to collect and\n * publish this client's performance metrics of all its API requests.\n * @option options endpointDiscoveryEnabled [Boolean|undefined] whether to\n * call operations with endpoints given by service dynamically. Setting this\n * config to `true` will enable endpoint discovery for all applicable operations.\n * Setting it to `false` will explicitly disable endpoint discovery even though\n * operations that require endpoint discovery will presumably fail. Leaving it\n * to `undefined` means SDK will only do endpoint discovery when it's required.\n * Defaults to `undefined`\n * @option options endpointCacheSize [Number] the size of the global cache storing\n * endpoints from endpoint discovery operations. Once endpoint cache is created,\n * updating this setting cannot change existing cache size.\n * Defaults to 1000\n * @option options hostPrefixEnabled [Boolean] whether to marshal request\n * parameters to the prefix of hostname.\n * Defaults to `true`.\n * @option options stsRegionalEndpoints ['legacy'|'regional'] whether to send sts request\n * to global endpoints or regional endpoints.\n * Defaults to 'legacy'.\n */\n constructor: function Config(options) {\n if (options === undefined) options = {};\n options = this.extractCredentials(options);\n\n AWS.util.each.call(this, this.keys, function (key, value) {\n this.set(key, options[key], value);\n });\n },\n\n /**\n * @!group Managing Credentials\n */\n\n /**\n * Loads credentials from the configuration object. This is used internally\n * by the SDK to ensure that refreshable {Credentials} objects are properly\n * refreshed and loaded when sending a request. If you want to ensure that\n * your credentials are loaded prior to a request, you can use this method\n * directly to provide accurate credential data stored in the object.\n *\n * @note If you configure the SDK with static or environment credentials,\n * the credential data should already be present in {credentials} attribute.\n * This method is primarily necessary to load credentials from asynchronous\n * sources, or sources that can refresh credentials periodically.\n * @example Getting your access key\n * AWS.config.getCredentials(function(err) {\n * if (err) console.log(err.stack); // credentials not loaded\n * else console.log(\"Access Key:\", AWS.config.credentials.accessKeyId);\n * })\n * @callback callback function(err)\n * Called when the {credentials} have been properly set on the configuration\n * object.\n *\n * @param err [Error] if this is set, credentials were not successfully\n * loaded and this error provides information why.\n * @see credentials\n * @see Credentials\n */\n getCredentials: function getCredentials(callback) {\n var self = this;\n\n function finish(err) {\n callback(err, err ? null : self.credentials);\n }\n\n function credError(msg, err) {\n return new AWS.util.error(err || new Error(), {\n code: 'CredentialsError',\n message: msg,\n name: 'CredentialsError'\n });\n }\n\n function getAsyncCredentials() {\n self.credentials.get(function(err) {\n if (err) {\n var msg = 'Could not load credentials from ' +\n self.credentials.constructor.name;\n err = credError(msg, err);\n }\n finish(err);\n });\n }\n\n function getStaticCredentials() {\n var err = null;\n if (!self.credentials.accessKeyId || !self.credentials.secretAccessKey) {\n err = credError('Missing credentials');\n }\n finish(err);\n }\n\n if (self.credentials) {\n if (typeof self.credentials.get === 'function') {\n getAsyncCredentials();\n } else { // static credentials\n getStaticCredentials();\n }\n } else if (self.credentialProvider) {\n self.credentialProvider.resolve(function(err, creds) {\n if (err) {\n err = credError('Could not load credentials from any providers', err);\n }\n self.credentials = creds;\n finish(err);\n });\n } else {\n finish(credError('No credentials to load'));\n }\n },\n\n /**\n * @!group Loading and Setting Configuration Options\n */\n\n /**\n * @overload update(options, allowUnknownKeys = false)\n * Updates the current configuration object with new options.\n *\n * @example Update maxRetries property of a configuration object\n * config.update({maxRetries: 10});\n * @param [Object] options a map of option keys and values.\n * @param [Boolean] allowUnknownKeys whether unknown keys can be set on\n * the configuration object. Defaults to `false`.\n * @see constructor\n */\n update: function update(options, allowUnknownKeys) {\n allowUnknownKeys = allowUnknownKeys || false;\n options = this.extractCredentials(options);\n AWS.util.each.call(this, options, function (key, value) {\n if (allowUnknownKeys || Object.prototype.hasOwnProperty.call(this.keys, key) ||\n AWS.Service.hasService(key)) {\n this.set(key, value);\n }\n });\n },\n\n /**\n * Loads configuration data from a JSON file into this config object.\n * @note Loading configuration will reset all existing configuration\n * on the object.\n * @!macro nobrowser\n * @param path [String] the path relative to your process's current\n * working directory to load configuration from.\n * @return [AWS.Config] the same configuration object\n */\n loadFromPath: function loadFromPath(path) {\n this.clear();\n\n var options = JSON.parse(AWS.util.readFileSync(path));\n var fileSystemCreds = new AWS.FileSystemCredentials(path);\n var chain = new AWS.CredentialProviderChain();\n chain.providers.unshift(fileSystemCreds);\n chain.resolve(function (err, creds) {\n if (err) throw err;\n else options.credentials = creds;\n });\n\n this.constructor(options);\n\n return this;\n },\n\n /**\n * Clears configuration data on this object\n *\n * @api private\n */\n clear: function clear() {\n /*jshint forin:false */\n AWS.util.each.call(this, this.keys, function (key) {\n delete this[key];\n });\n\n // reset credential provider\n this.set('credentials', undefined);\n this.set('credentialProvider', undefined);\n },\n\n /**\n * Sets a property on the configuration object, allowing for a\n * default value\n * @api private\n */\n set: function set(property, value, defaultValue) {\n if (value === undefined) {\n if (defaultValue === undefined) {\n defaultValue = this.keys[property];\n }\n if (typeof defaultValue === 'function') {\n this[property] = defaultValue.call(this);\n } else {\n this[property] = defaultValue;\n }\n } else if (property === 'httpOptions' && this[property]) {\n // deep merge httpOptions\n this[property] = AWS.util.merge(this[property], value);\n } else {\n this[property] = value;\n }\n },\n\n /**\n * All of the keys with their default values.\n *\n * @constant\n * @api private\n */\n keys: {\n credentials: null,\n credentialProvider: null,\n region: null,\n logger: null,\n apiVersions: {},\n apiVersion: null,\n endpoint: undefined,\n httpOptions: {\n timeout: 120000\n },\n maxRetries: undefined,\n maxRedirects: 10,\n paramValidation: true,\n sslEnabled: true,\n s3ForcePathStyle: false,\n s3BucketEndpoint: false,\n s3DisableBodySigning: true,\n s3UsEast1RegionalEndpoint: 'legacy',\n s3UseArnRegion: undefined,\n computeChecksums: true,\n convertResponseTypes: true,\n correctClockSkew: false,\n customUserAgent: null,\n dynamoDbCrc32: true,\n systemClockOffset: 0,\n signatureVersion: null,\n signatureCache: true,\n retryDelayOptions: {},\n useAccelerateEndpoint: false,\n clientSideMonitoring: false,\n endpointDiscoveryEnabled: undefined,\n endpointCacheSize: 1000,\n hostPrefixEnabled: true,\n stsRegionalEndpoints: 'legacy'\n },\n\n /**\n * Extracts accessKeyId, secretAccessKey and sessionToken\n * from a configuration hash.\n *\n * @api private\n */\n extractCredentials: function extractCredentials(options) {\n if (options.accessKeyId && options.secretAccessKey) {\n options = AWS.util.copy(options);\n options.credentials = new AWS.Credentials(options);\n }\n return options;\n },\n\n /**\n * Sets the promise dependency the SDK will use wherever Promises are returned.\n * Passing `null` will force the SDK to use native Promises if they are available.\n * If native Promises are not available, passing `null` will have no effect.\n * @param [Constructor] dep A reference to a Promise constructor\n */\n setPromisesDependency: function setPromisesDependency(dep) {\n PromisesDependency = dep;\n // if null was passed in, we should try to use native promises\n if (dep === null && typeof Promise === 'function') {\n PromisesDependency = Promise;\n }\n var constructors = [AWS.Request, AWS.Credentials, AWS.CredentialProviderChain];\n if (AWS.S3) {\n constructors.push(AWS.S3);\n if (AWS.S3.ManagedUpload) {\n constructors.push(AWS.S3.ManagedUpload);\n }\n }\n AWS.util.addPromises(constructors, PromisesDependency);\n },\n\n /**\n * Gets the promise dependency set by `AWS.config.setPromisesDependency`.\n */\n getPromisesDependency: function getPromisesDependency() {\n return PromisesDependency;\n }\n});\n\n/**\n * @return [AWS.Config] The global configuration object singleton instance\n * @readonly\n * @see AWS.Config\n */\nAWS.config = new AWS.Config();\n","var AWS = require('./core');\n/**\n * @api private\n */\nfunction validateRegionalEndpointsFlagValue(configValue, errorOptions) {\n if (typeof configValue !== 'string') return undefined;\n else if (['legacy', 'regional'].indexOf(configValue.toLowerCase()) >= 0) {\n return configValue.toLowerCase();\n } else {\n throw AWS.util.error(new Error(), errorOptions);\n }\n}\n\n/**\n * Resolve the configuration value for regional endpoint from difference sources: client\n * config, environmental variable, shared config file. Value can be case-insensitive\n * 'legacy' or 'reginal'.\n * @param originalConfig user-supplied config object to resolve\n * @param options a map of config property names from individual configuration source\n * - env: name of environmental variable that refers to the config\n * - sharedConfig: name of shared configuration file property that refers to the config\n * - clientConfig: name of client configuration property that refers to the config\n *\n * @api private\n */\nfunction resolveRegionalEndpointsFlag(originalConfig, options) {\n originalConfig = originalConfig || {};\n //validate config value\n var resolved;\n if (originalConfig[options.clientConfig]) {\n resolved = validateRegionalEndpointsFlagValue(originalConfig[options.clientConfig], {\n code: 'InvalidConfiguration',\n message: 'invalid \"' + options.clientConfig + '\" configuration. Expect \"legacy\" ' +\n ' or \"regional\". Got \"' + originalConfig[options.clientConfig] + '\".'\n });\n if (resolved) return resolved;\n }\n if (!AWS.util.isNode()) return resolved;\n //validate environmental variable\n if (Object.prototype.hasOwnProperty.call(process.env, options.env)) {\n var envFlag = process.env[options.env];\n resolved = validateRegionalEndpointsFlagValue(envFlag, {\n code: 'InvalidEnvironmentalVariable',\n message: 'invalid ' + options.env + ' environmental variable. Expect \"legacy\" ' +\n ' or \"regional\". Got \"' + process.env[options.env] + '\".'\n });\n if (resolved) return resolved;\n }\n //validate shared config file\n var profile = {};\n try {\n var profiles = AWS.util.getProfilesFromSharedConfig(AWS.util.iniLoader);\n profile = profiles[process.env.AWS_PROFILE || AWS.util.defaultProfile];\n } catch (e) {};\n if (profile && Object.prototype.hasOwnProperty.call(profile, options.sharedConfig)) {\n var fileFlag = profile[options.sharedConfig];\n resolved = validateRegionalEndpointsFlagValue(fileFlag, {\n code: 'InvalidConfiguration',\n message: 'invalid ' + options.sharedConfig + ' profile config. Expect \"legacy\" ' +\n ' or \"regional\". Got \"' + profile[options.sharedConfig] + '\".'\n });\n if (resolved) return resolved;\n }\n return resolved;\n}\n\nmodule.exports = resolveRegionalEndpointsFlag;\n","/**\n * The main AWS namespace\n */\nvar AWS = { util: require('./util') };\n\n/**\n * @api private\n * @!macro [new] nobrowser\n * @note This feature is not supported in the browser environment of the SDK.\n */\nvar _hidden = {}; _hidden.toString(); // hack to parse macro\n\n/**\n * @api private\n */\nmodule.exports = AWS;\n\nAWS.util.update(AWS, {\n\n /**\n * @constant\n */\n VERSION: '2.889.0',\n\n /**\n * @api private\n */\n Signers: {},\n\n /**\n * @api private\n */\n Protocol: {\n Json: require('./protocol/json'),\n Query: require('./protocol/query'),\n Rest: require('./protocol/rest'),\n RestJson: require('./protocol/rest_json'),\n RestXml: require('./protocol/rest_xml')\n },\n\n /**\n * @api private\n */\n XML: {\n Builder: require('./xml/builder'),\n Parser: null // conditionally set based on environment\n },\n\n /**\n * @api private\n */\n JSON: {\n Builder: require('./json/builder'),\n Parser: require('./json/parser')\n },\n\n /**\n * @api private\n */\n Model: {\n Api: require('./model/api'),\n Operation: require('./model/operation'),\n Shape: require('./model/shape'),\n Paginator: require('./model/paginator'),\n ResourceWaiter: require('./model/resource_waiter')\n },\n\n /**\n * @api private\n */\n apiLoader: require('./api_loader'),\n\n /**\n * @api private\n */\n EndpointCache: require('../vendor/endpoint-cache').EndpointCache\n});\nrequire('./sequential_executor');\nrequire('./service');\nrequire('./config');\nrequire('./http');\nrequire('./event_listeners');\nrequire('./request');\nrequire('./response');\nrequire('./resource_waiter');\nrequire('./signers/request_signer');\nrequire('./param_validator');\n\n/**\n * @readonly\n * @return [AWS.SequentialExecutor] a collection of global event listeners that\n * are attached to every sent request.\n * @see AWS.Request AWS.Request for a list of events to listen for\n * @example Logging the time taken to send a request\n * AWS.events.on('send', function startSend(resp) {\n * resp.startTime = new Date().getTime();\n * }).on('complete', function calculateTime(resp) {\n * var time = (new Date().getTime() - resp.startTime) / 1000;\n * console.log('Request took ' + time + ' seconds');\n * });\n *\n * new AWS.S3().listBuckets(); // prints 'Request took 0.285 seconds'\n */\nAWS.events = new AWS.SequentialExecutor();\n\n//create endpoint cache lazily\nAWS.util.memoizedProperty(AWS, 'endpointCache', function() {\n return new AWS.EndpointCache(AWS.config.endpointCacheSize);\n}, true);\n","var AWS = require('./core');\n\n/**\n * Represents your AWS security credentials, specifically the\n * {accessKeyId}, {secretAccessKey}, and optional {sessionToken}.\n * Creating a `Credentials` object allows you to pass around your\n * security information to configuration and service objects.\n *\n * Note that this class typically does not need to be constructed manually,\n * as the {AWS.Config} and {AWS.Service} classes both accept simple\n * options hashes with the three keys. These structures will be converted\n * into Credentials objects automatically.\n *\n * ## Expiring and Refreshing Credentials\n *\n * Occasionally credentials can expire in the middle of a long-running\n * application. In this case, the SDK will automatically attempt to\n * refresh the credentials from the storage location if the Credentials\n * class implements the {refresh} method.\n *\n * If you are implementing a credential storage location, you\n * will want to create a subclass of the `Credentials` class and\n * override the {refresh} method. This method allows credentials to be\n * retrieved from the backing store, be it a file system, database, or\n * some network storage. The method should reset the credential attributes\n * on the object.\n *\n * @!attribute expired\n * @return [Boolean] whether the credentials have been expired and\n * require a refresh. Used in conjunction with {expireTime}.\n * @!attribute expireTime\n * @return [Date] a time when credentials should be considered expired. Used\n * in conjunction with {expired}.\n * @!attribute accessKeyId\n * @return [String] the AWS access key ID\n * @!attribute secretAccessKey\n * @return [String] the AWS secret access key\n * @!attribute sessionToken\n * @return [String] an optional AWS session token\n */\nAWS.Credentials = AWS.util.inherit({\n /**\n * A credentials object can be created using positional arguments or an options\n * hash.\n *\n * @overload AWS.Credentials(accessKeyId, secretAccessKey, sessionToken=null)\n * Creates a Credentials object with a given set of credential information\n * as positional arguments.\n * @param accessKeyId [String] the AWS access key ID\n * @param secretAccessKey [String] the AWS secret access key\n * @param sessionToken [String] the optional AWS session token\n * @example Create a credentials object with AWS credentials\n * var creds = new AWS.Credentials('akid', 'secret', 'session');\n * @overload AWS.Credentials(options)\n * Creates a Credentials object with a given set of credential information\n * as an options hash.\n * @option options accessKeyId [String] the AWS access key ID\n * @option options secretAccessKey [String] the AWS secret access key\n * @option options sessionToken [String] the optional AWS session token\n * @example Create a credentials object with AWS credentials\n * var creds = new AWS.Credentials({\n * accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'session'\n * });\n */\n constructor: function Credentials() {\n // hide secretAccessKey from being displayed with util.inspect\n AWS.util.hideProperties(this, ['secretAccessKey']);\n\n this.expired = false;\n this.expireTime = null;\n this.refreshCallbacks = [];\n if (arguments.length === 1 && typeof arguments[0] === 'object') {\n var creds = arguments[0].credentials || arguments[0];\n this.accessKeyId = creds.accessKeyId;\n this.secretAccessKey = creds.secretAccessKey;\n this.sessionToken = creds.sessionToken;\n } else {\n this.accessKeyId = arguments[0];\n this.secretAccessKey = arguments[1];\n this.sessionToken = arguments[2];\n }\n },\n\n /**\n * @return [Integer] the number of seconds before {expireTime} during which\n * the credentials will be considered expired.\n */\n expiryWindow: 15,\n\n /**\n * @return [Boolean] whether the credentials object should call {refresh}\n * @note Subclasses should override this method to provide custom refresh\n * logic.\n */\n needsRefresh: function needsRefresh() {\n var currentTime = AWS.util.date.getDate().getTime();\n var adjustedTime = new Date(currentTime + this.expiryWindow * 1000);\n\n if (this.expireTime && adjustedTime > this.expireTime) {\n return true;\n } else {\n return this.expired || !this.accessKeyId || !this.secretAccessKey;\n }\n },\n\n /**\n * Gets the existing credentials, refreshing them if they are not yet loaded\n * or have expired. Users should call this method before using {refresh},\n * as this will not attempt to reload credentials when they are already\n * loaded into the object.\n *\n * @callback callback function(err)\n * When this callback is called with no error, it means either credentials\n * do not need to be refreshed or refreshed credentials information has\n * been loaded into the object (as the `accessKeyId`, `secretAccessKey`,\n * and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n */\n get: function get(callback) {\n var self = this;\n if (this.needsRefresh()) {\n this.refresh(function(err) {\n if (!err) self.expired = false; // reset expired flag\n if (callback) callback(err);\n });\n } else if (callback) {\n callback();\n }\n },\n\n /**\n * @!method getPromise()\n * Returns a 'thenable' promise.\n * Gets the existing credentials, refreshing them if they are not yet loaded\n * or have expired. Users should call this method before using {refresh},\n * as this will not attempt to reload credentials when they are already\n * loaded into the object.\n *\n * Two callbacks can be provided to the `then` method on the returned promise.\n * The first callback will be called if the promise is fulfilled, and the second\n * callback will be called if the promise is rejected.\n * @callback fulfilledCallback function()\n * Called if the promise is fulfilled. When this callback is called, it\n * means either credentials do not need to be refreshed or refreshed\n * credentials information has been loaded into the object (as the\n * `accessKeyId`, `secretAccessKey`, and `sessionToken` properties).\n * @callback rejectedCallback function(err)\n * Called if the promise is rejected.\n * @param err [Error] if an error occurred, this value will be filled\n * @return [Promise] A promise that represents the state of the `get` call.\n * @example Calling the `getPromise` method.\n * var promise = credProvider.getPromise();\n * promise.then(function() { ... }, function(err) { ... });\n */\n\n /**\n * @!method refreshPromise()\n * Returns a 'thenable' promise.\n * Refreshes the credentials. Users should call {get} before attempting\n * to forcibly refresh credentials.\n *\n * Two callbacks can be provided to the `then` method on the returned promise.\n * The first callback will be called if the promise is fulfilled, and the second\n * callback will be called if the promise is rejected.\n * @callback fulfilledCallback function()\n * Called if the promise is fulfilled. When this callback is called, it\n * means refreshed credentials information has been loaded into the object\n * (as the `accessKeyId`, `secretAccessKey`, and `sessionToken` properties).\n * @callback rejectedCallback function(err)\n * Called if the promise is rejected.\n * @param err [Error] if an error occurred, this value will be filled\n * @return [Promise] A promise that represents the state of the `refresh` call.\n * @example Calling the `refreshPromise` method.\n * var promise = credProvider.refreshPromise();\n * promise.then(function() { ... }, function(err) { ... });\n */\n\n /**\n * Refreshes the credentials. Users should call {get} before attempting\n * to forcibly refresh credentials.\n *\n * @callback callback function(err)\n * When this callback is called with no error, it means refreshed\n * credentials information has been loaded into the object (as the\n * `accessKeyId`, `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @note Subclasses should override this class to reset the\n * {accessKeyId}, {secretAccessKey} and optional {sessionToken}\n * on the credentials object and then call the callback with\n * any error information.\n * @see get\n */\n refresh: function refresh(callback) {\n this.expired = false;\n callback();\n },\n\n /**\n * @api private\n * @param callback\n */\n coalesceRefresh: function coalesceRefresh(callback, sync) {\n var self = this;\n if (self.refreshCallbacks.push(callback) === 1) {\n self.load(function onLoad(err) {\n AWS.util.arrayEach(self.refreshCallbacks, function(callback) {\n if (sync) {\n callback(err);\n } else {\n // callback could throw, so defer to ensure all callbacks are notified\n AWS.util.defer(function () {\n callback(err);\n });\n }\n });\n self.refreshCallbacks.length = 0;\n });\n }\n },\n\n /**\n * @api private\n * @param callback\n */\n load: function load(callback) {\n callback();\n }\n});\n\n/**\n * @api private\n */\nAWS.Credentials.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n this.prototype.getPromise = AWS.util.promisifyMethod('get', PromiseDependency);\n this.prototype.refreshPromise = AWS.util.promisifyMethod('refresh', PromiseDependency);\n};\n\n/**\n * @api private\n */\nAWS.Credentials.deletePromisesFromClass = function deletePromisesFromClass() {\n delete this.prototype.getPromise;\n delete this.prototype.refreshPromise;\n};\n\nAWS.util.addPromises(AWS.Credentials);\n","var AWS = require('../core');\nvar STS = require('../../clients/sts');\n\n/**\n * Represents temporary credentials retrieved from {AWS.STS}. Without any\n * extra parameters, credentials will be fetched from the\n * {AWS.STS.getSessionToken} operation. If an IAM role is provided, the\n * {AWS.STS.assumeRole} operation will be used to fetch credentials for the\n * role instead.\n *\n * AWS.ChainableTemporaryCredentials differs from AWS.TemporaryCredentials in\n * the way masterCredentials and refreshes are handled.\n * AWS.ChainableTemporaryCredentials refreshes expired credentials using the\n * masterCredentials passed by the user to support chaining of STS credentials.\n * However, AWS.TemporaryCredentials recursively collapses the masterCredentials\n * during instantiation, precluding the ability to refresh credentials which\n * require intermediate, temporary credentials.\n *\n * For example, if the application should use RoleA, which must be assumed from\n * RoleB, and the environment provides credentials which can assume RoleB, then\n * AWS.ChainableTemporaryCredentials must be used to support refreshing the\n * temporary credentials for RoleA:\n *\n * ```javascript\n * var roleACreds = new AWS.ChainableTemporaryCredentials({\n * params: {RoleArn: 'RoleA'},\n * masterCredentials: new AWS.ChainableTemporaryCredentials({\n * params: {RoleArn: 'RoleB'},\n * masterCredentials: new AWS.EnvironmentCredentials('AWS')\n * })\n * });\n * ```\n *\n * If AWS.TemporaryCredentials had been used in the previous example,\n * `roleACreds` would fail to refresh because `roleACreds` would\n * use the environment credentials for the AssumeRole request.\n *\n * Another difference is that AWS.ChainableTemporaryCredentials creates the STS\n * service instance during instantiation while AWS.TemporaryCredentials creates\n * the STS service instance during the first refresh. Creating the service\n * instance during instantiation effectively captures the master credentials\n * from the global config, so that subsequent changes to the global config do\n * not affect the master credentials used to refresh the temporary credentials.\n *\n * This allows an instance of AWS.ChainableTemporaryCredentials to be assigned\n * to AWS.config.credentials:\n *\n * ```javascript\n * var envCreds = new AWS.EnvironmentCredentials('AWS');\n * AWS.config.credentials = envCreds;\n * // masterCredentials will be envCreds\n * AWS.config.credentials = new AWS.ChainableTemporaryCredentials({\n * params: {RoleArn: '...'}\n * });\n * ```\n *\n * Similarly, to use the CredentialProviderChain's default providers as the\n * master credentials, simply create a new instance of\n * AWS.ChainableTemporaryCredentials:\n *\n * ```javascript\n * AWS.config.credentials = new ChainableTemporaryCredentials({\n * params: {RoleArn: '...'}\n * });\n * ```\n *\n * @!attribute service\n * @return [AWS.STS] the STS service instance used to\n * get and refresh temporary credentials from AWS STS.\n * @note (see constructor)\n */\nAWS.ChainableTemporaryCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * Creates a new temporary credentials object.\n *\n * @param options [map] a set of options\n * @option options params [map] ({}) a map of options that are passed to the\n * {AWS.STS.assumeRole} or {AWS.STS.getSessionToken} operations.\n * If a `RoleArn` parameter is passed in, credentials will be based on the\n * IAM role. If a `SerialNumber` parameter is passed in, {tokenCodeFn} must\n * also be passed in or an error will be thrown.\n * @option options masterCredentials [AWS.Credentials] the master credentials\n * used to get and refresh temporary credentials from AWS STS. By default,\n * AWS.config.credentials or AWS.config.credentialProvider will be used.\n * @option options tokenCodeFn [Function] (null) Function to provide\n * `TokenCode`, if `SerialNumber` is provided for profile in {params}. Function\n * is called with value of `SerialNumber` and `callback`, and should provide\n * the `TokenCode` or an error to the callback in the format\n * `callback(err, token)`.\n * @example Creating a new credentials object for generic temporary credentials\n * AWS.config.credentials = new AWS.ChainableTemporaryCredentials();\n * @example Creating a new credentials object for an IAM role\n * AWS.config.credentials = new AWS.ChainableTemporaryCredentials({\n * params: {\n * RoleArn: 'arn:aws:iam::1234567890:role/TemporaryCredentials'\n * }\n * });\n * @see AWS.STS.assumeRole\n * @see AWS.STS.getSessionToken\n */\n constructor: function ChainableTemporaryCredentials(options) {\n AWS.Credentials.call(this);\n options = options || {};\n this.errorCode = 'ChainableTemporaryCredentialsProviderFailure';\n this.expired = true;\n this.tokenCodeFn = null;\n\n var params = AWS.util.copy(options.params) || {};\n if (params.RoleArn) {\n params.RoleSessionName = params.RoleSessionName || 'temporary-credentials';\n }\n if (params.SerialNumber) {\n if (!options.tokenCodeFn || (typeof options.tokenCodeFn !== 'function')) {\n throw new AWS.util.error(\n new Error('tokenCodeFn must be a function when params.SerialNumber is given'),\n {code: this.errorCode}\n );\n } else {\n this.tokenCodeFn = options.tokenCodeFn;\n }\n }\n var config = AWS.util.merge(\n {\n params: params,\n credentials: options.masterCredentials || AWS.config.credentials\n },\n options.stsConfig || {}\n );\n this.service = new STS(config);\n },\n\n /**\n * Refreshes credentials using {AWS.STS.assumeRole} or\n * {AWS.STS.getSessionToken}, depending on whether an IAM role ARN was passed\n * to the credentials {constructor}.\n *\n * @callback callback function(err)\n * Called when the STS service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see AWS.Credentials.get\n */\n refresh: function refresh(callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n * @param callback\n */\n load: function load(callback) {\n var self = this;\n var operation = self.service.config.params.RoleArn ? 'assumeRole' : 'getSessionToken';\n this.getTokenCode(function (err, tokenCode) {\n var params = {};\n if (err) {\n callback(err);\n return;\n }\n if (tokenCode) {\n params.TokenCode = tokenCode;\n }\n self.service[operation](params, function (err, data) {\n if (!err) {\n self.service.credentialsFrom(data, self);\n }\n callback(err);\n });\n });\n },\n\n /**\n * @api private\n */\n getTokenCode: function getTokenCode(callback) {\n var self = this;\n if (this.tokenCodeFn) {\n this.tokenCodeFn(this.service.config.params.SerialNumber, function (err, token) {\n if (err) {\n var message = err;\n if (err instanceof Error) {\n message = err.message;\n }\n callback(\n AWS.util.error(\n new Error('Error fetching MFA token: ' + message),\n { code: self.errorCode}\n )\n );\n return;\n }\n callback(null, token);\n });\n } else {\n callback(null);\n }\n }\n});\n","var AWS = require('../core');\nvar CognitoIdentity = require('../../clients/cognitoidentity');\nvar STS = require('../../clients/sts');\n\n/**\n * Represents credentials retrieved from STS Web Identity Federation using\n * the Amazon Cognito Identity service.\n *\n * By default this provider gets credentials using the\n * {AWS.CognitoIdentity.getCredentialsForIdentity} service operation, which\n * requires either an `IdentityId` or an `IdentityPoolId` (Amazon Cognito\n * Identity Pool ID), which is used to call {AWS.CognitoIdentity.getId} to\n * obtain an `IdentityId`. If the identity or identity pool is not configured in\n * the Amazon Cognito Console to use IAM roles with the appropriate permissions,\n * then additionally a `RoleArn` is required containing the ARN of the IAM trust\n * policy for the Amazon Cognito role that the user will log into. If a `RoleArn`\n * is provided, then this provider gets credentials using the\n * {AWS.STS.assumeRoleWithWebIdentity} service operation, after first getting an\n * Open ID token from {AWS.CognitoIdentity.getOpenIdToken}.\n *\n * In addition, if this credential provider is used to provide authenticated\n * login, the `Logins` map may be set to the tokens provided by the respective\n * identity providers. See {constructor} for an example on creating a credentials\n * object with proper property values.\n *\n * ## Refreshing Credentials from Identity Service\n *\n * In addition to AWS credentials expiring after a given amount of time, the\n * login token from the identity provider will also expire. Once this token\n * expires, it will not be usable to refresh AWS credentials, and another\n * token will be needed. The SDK does not manage refreshing of the token value,\n * but this can be done through a \"refresh token\" supported by most identity\n * providers. Consult the documentation for the identity provider for refreshing\n * tokens. Once the refreshed token is acquired, you should make sure to update\n * this new token in the credentials object's {params} property. The following\n * code will update the WebIdentityToken, assuming you have retrieved an updated\n * token from the identity provider:\n *\n * ```javascript\n * AWS.config.credentials.params.Logins['graph.facebook.com'] = updatedToken;\n * ```\n *\n * Future calls to `credentials.refresh()` will now use the new token.\n *\n * @!attribute params\n * @return [map] the map of params passed to\n * {AWS.CognitoIdentity.getId},\n * {AWS.CognitoIdentity.getOpenIdToken}, and\n * {AWS.STS.assumeRoleWithWebIdentity}. To update the token, set the\n * `params.WebIdentityToken` property.\n * @!attribute data\n * @return [map] the raw data response from the call to\n * {AWS.CognitoIdentity.getCredentialsForIdentity}, or\n * {AWS.STS.assumeRoleWithWebIdentity}. Use this if you want to get\n * access to other properties from the response.\n * @!attribute identityId\n * @return [String] the Cognito ID returned by the last call to\n * {AWS.CognitoIdentity.getOpenIdToken}. This ID represents the actual\n * final resolved identity ID from Amazon Cognito.\n */\nAWS.CognitoIdentityCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * @api private\n */\n localStorageKey: {\n id: 'aws.cognito.identity-id.',\n providers: 'aws.cognito.identity-providers.'\n },\n\n /**\n * Creates a new credentials object.\n * @example Creating a new credentials object\n * AWS.config.credentials = new AWS.CognitoIdentityCredentials({\n *\n * // either IdentityPoolId or IdentityId is required\n * // See the IdentityPoolId param for AWS.CognitoIdentity.getID (linked below)\n * // See the IdentityId param for AWS.CognitoIdentity.getCredentialsForIdentity\n * // or AWS.CognitoIdentity.getOpenIdToken (linked below)\n * IdentityPoolId: 'us-east-1:1699ebc0-7900-4099-b910-2df94f52a030',\n * IdentityId: 'us-east-1:128d0a74-c82f-4553-916d-90053e4a8b0f'\n *\n * // optional, only necessary when the identity pool is not configured\n * // to use IAM roles in the Amazon Cognito Console\n * // See the RoleArn param for AWS.STS.assumeRoleWithWebIdentity (linked below)\n * RoleArn: 'arn:aws:iam::1234567890:role/MYAPP-CognitoIdentity',\n *\n * // optional tokens, used for authenticated login\n * // See the Logins param for AWS.CognitoIdentity.getID (linked below)\n * Logins: {\n * 'graph.facebook.com': 'FBTOKEN',\n * 'www.amazon.com': 'AMAZONTOKEN',\n * 'accounts.google.com': 'GOOGLETOKEN',\n * 'api.twitter.com': 'TWITTERTOKEN',\n * 'www.digits.com': 'DIGITSTOKEN'\n * },\n *\n * // optional name, defaults to web-identity\n * // See the RoleSessionName param for AWS.STS.assumeRoleWithWebIdentity (linked below)\n * RoleSessionName: 'web',\n *\n * // optional, only necessary when application runs in a browser\n * // and multiple users are signed in at once, used for caching\n * LoginId: 'example@gmail.com'\n *\n * }, {\n * // optionally provide configuration to apply to the underlying service clients\n * // if configuration is not provided, then configuration will be pulled from AWS.config\n *\n * // region should match the region your identity pool is located in\n * region: 'us-east-1',\n *\n * // specify timeout options\n * httpOptions: {\n * timeout: 100\n * }\n * });\n * @see AWS.CognitoIdentity.getId\n * @see AWS.CognitoIdentity.getCredentialsForIdentity\n * @see AWS.STS.assumeRoleWithWebIdentity\n * @see AWS.CognitoIdentity.getOpenIdToken\n * @see AWS.Config\n * @note If a region is not provided in the global AWS.config, or\n * specified in the `clientConfig` to the CognitoIdentityCredentials\n * constructor, you may encounter a 'Missing credentials in config' error\n * when calling making a service call.\n */\n constructor: function CognitoIdentityCredentials(params, clientConfig) {\n AWS.Credentials.call(this);\n this.expired = true;\n this.params = params;\n this.data = null;\n this._identityId = null;\n this._clientConfig = AWS.util.copy(clientConfig || {});\n this.loadCachedId();\n var self = this;\n Object.defineProperty(this, 'identityId', {\n get: function() {\n self.loadCachedId();\n return self._identityId || self.params.IdentityId;\n },\n set: function(identityId) {\n self._identityId = identityId;\n }\n });\n },\n\n /**\n * Refreshes credentials using {AWS.CognitoIdentity.getCredentialsForIdentity},\n * or {AWS.STS.assumeRoleWithWebIdentity}.\n *\n * @callback callback function(err)\n * Called when the STS service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see AWS.Credentials.get\n */\n refresh: function refresh(callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n * @param callback\n */\n load: function load(callback) {\n var self = this;\n self.createClients();\n self.data = null;\n self._identityId = null;\n self.getId(function(err) {\n if (!err) {\n if (!self.params.RoleArn) {\n self.getCredentialsForIdentity(callback);\n } else {\n self.getCredentialsFromSTS(callback);\n }\n } else {\n self.clearIdOnNotAuthorized(err);\n callback(err);\n }\n });\n },\n\n /**\n * Clears the cached Cognito ID associated with the currently configured\n * identity pool ID. Use this to manually invalidate your cache if\n * the identity pool ID was deleted.\n */\n clearCachedId: function clearCache() {\n this._identityId = null;\n delete this.params.IdentityId;\n\n var poolId = this.params.IdentityPoolId;\n var loginId = this.params.LoginId || '';\n delete this.storage[this.localStorageKey.id + poolId + loginId];\n delete this.storage[this.localStorageKey.providers + poolId + loginId];\n },\n\n /**\n * @api private\n */\n clearIdOnNotAuthorized: function clearIdOnNotAuthorized(err) {\n var self = this;\n if (err.code == 'NotAuthorizedException') {\n self.clearCachedId();\n }\n },\n\n /**\n * Retrieves a Cognito ID, loading from cache if it was already retrieved\n * on this device.\n *\n * @callback callback function(err, identityId)\n * @param err [Error, null] an error object if the call failed or null if\n * it succeeded.\n * @param identityId [String, null] if successful, the callback will return\n * the Cognito ID.\n * @note If not loaded explicitly, the Cognito ID is loaded and stored in\n * localStorage in the browser environment of a device.\n * @api private\n */\n getId: function getId(callback) {\n var self = this;\n if (typeof self.params.IdentityId === 'string') {\n return callback(null, self.params.IdentityId);\n }\n\n self.cognito.getId(function(err, data) {\n if (!err && data.IdentityId) {\n self.params.IdentityId = data.IdentityId;\n callback(null, data.IdentityId);\n } else {\n callback(err);\n }\n });\n },\n\n\n /**\n * @api private\n */\n loadCredentials: function loadCredentials(data, credentials) {\n if (!data || !credentials) return;\n credentials.expired = false;\n credentials.accessKeyId = data.Credentials.AccessKeyId;\n credentials.secretAccessKey = data.Credentials.SecretKey;\n credentials.sessionToken = data.Credentials.SessionToken;\n credentials.expireTime = data.Credentials.Expiration;\n },\n\n /**\n * @api private\n */\n getCredentialsForIdentity: function getCredentialsForIdentity(callback) {\n var self = this;\n self.cognito.getCredentialsForIdentity(function(err, data) {\n if (!err) {\n self.cacheId(data);\n self.data = data;\n self.loadCredentials(self.data, self);\n } else {\n self.clearIdOnNotAuthorized(err);\n }\n callback(err);\n });\n },\n\n /**\n * @api private\n */\n getCredentialsFromSTS: function getCredentialsFromSTS(callback) {\n var self = this;\n self.cognito.getOpenIdToken(function(err, data) {\n if (!err) {\n self.cacheId(data);\n self.params.WebIdentityToken = data.Token;\n self.webIdentityCredentials.refresh(function(webErr) {\n if (!webErr) {\n self.data = self.webIdentityCredentials.data;\n self.sts.credentialsFrom(self.data, self);\n }\n callback(webErr);\n });\n } else {\n self.clearIdOnNotAuthorized(err);\n callback(err);\n }\n });\n },\n\n /**\n * @api private\n */\n loadCachedId: function loadCachedId() {\n var self = this;\n\n // in the browser we source default IdentityId from localStorage\n if (AWS.util.isBrowser() && !self.params.IdentityId) {\n var id = self.getStorage('id');\n if (id && self.params.Logins) {\n var actualProviders = Object.keys(self.params.Logins);\n var cachedProviders =\n (self.getStorage('providers') || '').split(',');\n\n // only load ID if at least one provider used this ID before\n var intersect = cachedProviders.filter(function(n) {\n return actualProviders.indexOf(n) !== -1;\n });\n if (intersect.length !== 0) {\n self.params.IdentityId = id;\n }\n } else if (id) {\n self.params.IdentityId = id;\n }\n }\n },\n\n /**\n * @api private\n */\n createClients: function() {\n var clientConfig = this._clientConfig;\n this.webIdentityCredentials = this.webIdentityCredentials ||\n new AWS.WebIdentityCredentials(this.params, clientConfig);\n if (!this.cognito) {\n var cognitoConfig = AWS.util.merge({}, clientConfig);\n cognitoConfig.params = this.params;\n this.cognito = new CognitoIdentity(cognitoConfig);\n }\n this.sts = this.sts || new STS(clientConfig);\n },\n\n /**\n * @api private\n */\n cacheId: function cacheId(data) {\n this._identityId = data.IdentityId;\n this.params.IdentityId = this._identityId;\n\n // cache this IdentityId in browser localStorage if possible\n if (AWS.util.isBrowser()) {\n this.setStorage('id', data.IdentityId);\n\n if (this.params.Logins) {\n this.setStorage('providers', Object.keys(this.params.Logins).join(','));\n }\n }\n },\n\n /**\n * @api private\n */\n getStorage: function getStorage(key) {\n return this.storage[this.localStorageKey[key] + this.params.IdentityPoolId + (this.params.LoginId || '')];\n },\n\n /**\n * @api private\n */\n setStorage: function setStorage(key, val) {\n try {\n this.storage[this.localStorageKey[key] + this.params.IdentityPoolId + (this.params.LoginId || '')] = val;\n } catch (_) {}\n },\n\n /**\n * @api private\n */\n storage: (function() {\n try {\n var storage = AWS.util.isBrowser() && window.localStorage !== null && typeof window.localStorage === 'object' ?\n window.localStorage : {};\n\n // Test set/remove which would throw an error in Safari's private browsing\n storage['aws.test-storage'] = 'foobar';\n delete storage['aws.test-storage'];\n\n return storage;\n } catch (_) {\n return {};\n }\n })()\n});\n","var AWS = require('../core');\n\n/**\n * Creates a credential provider chain that searches for AWS credentials\n * in a list of credential providers specified by the {providers} property.\n *\n * By default, the chain will use the {defaultProviders} to resolve credentials.\n * These providers will look in the environment using the\n * {AWS.EnvironmentCredentials} class with the 'AWS' and 'AMAZON' prefixes.\n *\n * ## Setting Providers\n *\n * Each provider in the {providers} list should be a function that returns\n * a {AWS.Credentials} object, or a hardcoded credentials object. The function\n * form allows for delayed execution of the credential construction.\n *\n * ## Resolving Credentials from a Chain\n *\n * Call {resolve} to return the first valid credential object that can be\n * loaded by the provider chain.\n *\n * For example, to resolve a chain with a custom provider that checks a file\n * on disk after the set of {defaultProviders}:\n *\n * ```javascript\n * var diskProvider = new AWS.FileSystemCredentials('./creds.json');\n * var chain = new AWS.CredentialProviderChain();\n * chain.providers.push(diskProvider);\n * chain.resolve();\n * ```\n *\n * The above code will return the `diskProvider` object if the\n * file contains credentials and the `defaultProviders` do not contain\n * any credential settings.\n *\n * @!attribute providers\n * @return [Array]\n * a list of credentials objects or functions that return credentials\n * objects. If the provider is a function, the function will be\n * executed lazily when the provider needs to be checked for valid\n * credentials. By default, this object will be set to the\n * {defaultProviders}.\n * @see defaultProviders\n */\nAWS.CredentialProviderChain = AWS.util.inherit(AWS.Credentials, {\n\n /**\n * Creates a new CredentialProviderChain with a default set of providers\n * specified by {defaultProviders}.\n */\n constructor: function CredentialProviderChain(providers) {\n if (providers) {\n this.providers = providers;\n } else {\n this.providers = AWS.CredentialProviderChain.defaultProviders.slice(0);\n }\n this.resolveCallbacks = [];\n },\n\n /**\n * @!method resolvePromise()\n * Returns a 'thenable' promise.\n * Resolves the provider chain by searching for the first set of\n * credentials in {providers}.\n *\n * Two callbacks can be provided to the `then` method on the returned promise.\n * The first callback will be called if the promise is fulfilled, and the second\n * callback will be called if the promise is rejected.\n * @callback fulfilledCallback function(credentials)\n * Called if the promise is fulfilled and the provider resolves the chain\n * to a credentials object\n * @param credentials [AWS.Credentials] the credentials object resolved\n * by the provider chain.\n * @callback rejectedCallback function(error)\n * Called if the promise is rejected.\n * @param err [Error] the error object returned if no credentials are found.\n * @return [Promise] A promise that represents the state of the `resolve` method call.\n * @example Calling the `resolvePromise` method.\n * var promise = chain.resolvePromise();\n * promise.then(function(credentials) { ... }, function(err) { ... });\n */\n\n /**\n * Resolves the provider chain by searching for the first set of\n * credentials in {providers}.\n *\n * @callback callback function(err, credentials)\n * Called when the provider resolves the chain to a credentials object\n * or null if no credentials can be found.\n *\n * @param err [Error] the error object returned if no credentials are\n * found.\n * @param credentials [AWS.Credentials] the credentials object resolved\n * by the provider chain.\n * @return [AWS.CredentialProviderChain] the provider, for chaining.\n */\n resolve: function resolve(callback) {\n var self = this;\n if (self.providers.length === 0) {\n callback(new Error('No providers'));\n return self;\n }\n\n if (self.resolveCallbacks.push(callback) === 1) {\n var index = 0;\n var providers = self.providers.slice(0);\n\n function resolveNext(err, creds) {\n if ((!err && creds) || index === providers.length) {\n AWS.util.arrayEach(self.resolveCallbacks, function (callback) {\n callback(err, creds);\n });\n self.resolveCallbacks.length = 0;\n return;\n }\n\n var provider = providers[index++];\n if (typeof provider === 'function') {\n creds = provider.call();\n } else {\n creds = provider;\n }\n\n if (creds.get) {\n creds.get(function (getErr) {\n resolveNext(getErr, getErr ? null : creds);\n });\n } else {\n resolveNext(null, creds);\n }\n }\n\n resolveNext();\n }\n\n return self;\n }\n});\n\n/**\n * The default set of providers used by a vanilla CredentialProviderChain.\n *\n * In the browser:\n *\n * ```javascript\n * AWS.CredentialProviderChain.defaultProviders = []\n * ```\n *\n * In Node.js:\n *\n * ```javascript\n * AWS.CredentialProviderChain.defaultProviders = [\n * function () { return new AWS.EnvironmentCredentials('AWS'); },\n * function () { return new AWS.EnvironmentCredentials('AMAZON'); },\n * function () { return new AWS.SharedIniFileCredentials(); },\n * function () { return new AWS.ECSCredentials(); },\n * function () { return new AWS.ProcessCredentials(); },\n * function () { return new AWS.TokenFileWebIdentityCredentials(); },\n * function () { return new AWS.EC2MetadataCredentials() }\n * ]\n * ```\n */\nAWS.CredentialProviderChain.defaultProviders = [];\n\n/**\n * @api private\n */\nAWS.CredentialProviderChain.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n this.prototype.resolvePromise = AWS.util.promisifyMethod('resolve', PromiseDependency);\n};\n\n/**\n * @api private\n */\nAWS.CredentialProviderChain.deletePromisesFromClass = function deletePromisesFromClass() {\n delete this.prototype.resolvePromise;\n};\n\nAWS.util.addPromises(AWS.CredentialProviderChain);\n","var AWS = require('../core');\nrequire('../metadata_service');\n\n/**\n * Represents credentials received from the metadata service on an EC2 instance.\n *\n * By default, this class will connect to the metadata service using\n * {AWS.MetadataService} and attempt to load any available credentials. If it\n * can connect, and credentials are available, these will be used with zero\n * configuration.\n *\n * This credentials class will by default timeout after 1 second of inactivity\n * and retry 3 times.\n * If your requests to the EC2 metadata service are timing out, you can increase\n * these values by configuring them directly:\n *\n * ```javascript\n * AWS.config.credentials = new AWS.EC2MetadataCredentials({\n * httpOptions: { timeout: 5000 }, // 5 second timeout\n * maxRetries: 10, // retry 10 times\n * retryDelayOptions: { base: 200 } // see AWS.Config for information\n * });\n *\n * If your requests are timing out in connecting to the metadata service, such\n * as when testing on a development machine, you can use the connectTimeout\n * option, specified in milliseconds, which also defaults to 1 second.\n * ```\n *\n * @see AWS.Config.retryDelayOptions\n *\n * @!macro nobrowser\n */\nAWS.EC2MetadataCredentials = AWS.util.inherit(AWS.Credentials, {\n constructor: function EC2MetadataCredentials(options) {\n AWS.Credentials.call(this);\n\n options = options ? AWS.util.copy(options) : {};\n options = AWS.util.merge(\n {maxRetries: this.defaultMaxRetries}, options);\n if (!options.httpOptions) options.httpOptions = {};\n options.httpOptions = AWS.util.merge(\n {timeout: this.defaultTimeout,\n connectTimeout: this.defaultConnectTimeout},\n options.httpOptions);\n\n this.metadataService = new AWS.MetadataService(options);\n this.metadata = {};\n },\n\n /**\n * @api private\n */\n defaultTimeout: 1000,\n\n /**\n * @api private\n */\n defaultConnectTimeout: 1000,\n\n /**\n * @api private\n */\n defaultMaxRetries: 3,\n\n /**\n * Loads the credentials from the instance metadata service\n *\n * @callback callback function(err)\n * Called when the instance metadata service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh(callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n * @param callback\n */\n load: function load(callback) {\n var self = this;\n self.metadataService.loadCredentials(function(err, creds) {\n if (!err) {\n var currentTime = AWS.util.date.getDate();\n var expireTime = new Date(creds.Expiration);\n if (expireTime < currentTime) {\n err = AWS.util.error(\n new Error('EC2 Instance Metadata Serivce provided expired credentials'),\n { code: 'EC2MetadataCredentialsProviderFailure' }\n );\n } else {\n self.expired = false;\n self.metadata = creds;\n self.accessKeyId = creds.AccessKeyId;\n self.secretAccessKey = creds.SecretAccessKey;\n self.sessionToken = creds.Token;\n self.expireTime = expireTime;\n }\n }\n callback(err);\n });\n }\n});\n","var AWS = require('../core');\n\n/**\n * Represents credentials received from relative URI specified in the ECS container.\n *\n * This class will request refreshable credentials from the relative URI\n * specified by the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI or the\n * AWS_CONTAINER_CREDENTIALS_FULL_URI environment variable. If valid credentials\n * are returned in the response, these will be used with zero configuration.\n *\n * This credentials class will by default timeout after 1 second of inactivity\n * and retry 3 times.\n * If your requests to the relative URI are timing out, you can increase\n * the value by configuring them directly:\n *\n * ```javascript\n * AWS.config.credentials = new AWS.ECSCredentials({\n * httpOptions: { timeout: 5000 }, // 5 second timeout\n * maxRetries: 10, // retry 10 times\n * retryDelayOptions: { base: 200 } // see AWS.Config for information\n * });\n * ```\n *\n * @see AWS.Config.retryDelayOptions\n *\n * @!macro nobrowser\n */\nAWS.ECSCredentials = AWS.RemoteCredentials;\n","var AWS = require('../core');\n\n/**\n * Represents credentials from the environment.\n *\n * By default, this class will look for the matching environment variables\n * prefixed by a given {envPrefix}. The un-prefixed environment variable names\n * for each credential value is listed below:\n *\n * ```javascript\n * accessKeyId: ACCESS_KEY_ID\n * secretAccessKey: SECRET_ACCESS_KEY\n * sessionToken: SESSION_TOKEN\n * ```\n *\n * With the default prefix of 'AWS', the environment variables would be:\n *\n * AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN\n *\n * @!attribute envPrefix\n * @readonly\n * @return [String] the prefix for the environment variable names excluding\n * the separating underscore ('_').\n */\nAWS.EnvironmentCredentials = AWS.util.inherit(AWS.Credentials, {\n\n /**\n * Creates a new EnvironmentCredentials class with a given variable\n * prefix {envPrefix}. For example, to load credentials using the 'AWS'\n * prefix:\n *\n * ```javascript\n * var creds = new AWS.EnvironmentCredentials('AWS');\n * creds.accessKeyId == 'AKID' // from AWS_ACCESS_KEY_ID env var\n * ```\n *\n * @param envPrefix [String] the prefix to use (e.g., 'AWS') for environment\n * variables. Do not include the separating underscore.\n */\n constructor: function EnvironmentCredentials(envPrefix) {\n AWS.Credentials.call(this);\n this.envPrefix = envPrefix;\n this.get(function() {});\n },\n\n /**\n * Loads credentials from the environment using the prefixed\n * environment variables.\n *\n * @callback callback function(err)\n * Called after the (prefixed) ACCESS_KEY_ID, SECRET_ACCESS_KEY, and\n * SESSION_TOKEN environment variables are read. When this callback is\n * called with no error, it means that the credentials information has\n * been loaded into the object (as the `accessKeyId`, `secretAccessKey`,\n * and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh(callback) {\n if (!callback) callback = AWS.util.fn.callback;\n\n if (!process || !process.env) {\n callback(AWS.util.error(\n new Error('No process info or environment variables available'),\n { code: 'EnvironmentCredentialsProviderFailure' }\n ));\n return;\n }\n\n var keys = ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY', 'SESSION_TOKEN'];\n var values = [];\n\n for (var i = 0; i < keys.length; i++) {\n var prefix = '';\n if (this.envPrefix) prefix = this.envPrefix + '_';\n values[i] = process.env[prefix + keys[i]];\n if (!values[i] && keys[i] !== 'SESSION_TOKEN') {\n callback(AWS.util.error(\n new Error('Variable ' + prefix + keys[i] + ' not set.'),\n { code: 'EnvironmentCredentialsProviderFailure' }\n ));\n return;\n }\n }\n\n this.expired = false;\n AWS.Credentials.apply(this, values);\n callback();\n }\n\n});\n","var AWS = require('../core');\n\n/**\n * Represents credentials from a JSON file on disk.\n * If the credentials expire, the SDK can {refresh} the credentials\n * from the file.\n *\n * The format of the file should be similar to the options passed to\n * {AWS.Config}:\n *\n * ```javascript\n * {accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'optional'}\n * ```\n *\n * @example Loading credentials from disk\n * var creds = new AWS.FileSystemCredentials('./configuration.json');\n * creds.accessKeyId == 'AKID'\n *\n * @!attribute filename\n * @readonly\n * @return [String] the path to the JSON file on disk containing the\n * credentials.\n * @!macro nobrowser\n */\nAWS.FileSystemCredentials = AWS.util.inherit(AWS.Credentials, {\n\n /**\n * @overload AWS.FileSystemCredentials(filename)\n * Creates a new FileSystemCredentials object from a filename\n *\n * @param filename [String] the path on disk to the JSON file to load.\n */\n constructor: function FileSystemCredentials(filename) {\n AWS.Credentials.call(this);\n this.filename = filename;\n this.get(function() {});\n },\n\n /**\n * Loads the credentials from the {filename} on disk.\n *\n * @callback callback function(err)\n * Called after the JSON file on disk is read and parsed. When this callback\n * is called with no error, it means that the credentials information\n * has been loaded into the object (as the `accessKeyId`, `secretAccessKey`,\n * and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh(callback) {\n if (!callback) callback = AWS.util.fn.callback;\n try {\n var creds = JSON.parse(AWS.util.readFileSync(this.filename));\n AWS.Credentials.call(this, creds);\n if (!this.accessKeyId || !this.secretAccessKey) {\n throw AWS.util.error(\n new Error('Credentials not set in ' + this.filename),\n { code: 'FileSystemCredentialsProviderFailure' }\n );\n }\n this.expired = false;\n callback();\n } catch (err) {\n callback(err);\n }\n }\n\n});\n","var AWS = require('../core');\nvar proc = require('child_process');\nvar iniLoader = AWS.util.iniLoader;\n\n/**\n * Represents credentials loaded from shared credentials file\n * (defaulting to ~/.aws/credentials or defined by the\n * `AWS_SHARED_CREDENTIALS_FILE` environment variable).\n *\n * ## Using process credentials\n *\n * The credentials file can specify a credential provider that executes\n * a given process and attempts to read its stdout to recieve a JSON payload\n * containing the credentials:\n *\n * [default]\n * credential_process = /usr/bin/credential_proc\n *\n * Automatically handles refreshing credentials if an Expiration time is\n * provided in the credentials payload. Credentials supplied in the same profile\n * will take precedence over the credential_process.\n *\n * Sourcing credentials from an external process can potentially be dangerous,\n * so proceed with caution. Other credential providers should be preferred if\n * at all possible. If using this option, you should make sure that the shared\n * credentials file is as locked down as possible using security best practices\n * for your operating system.\n *\n * ## Using custom profiles\n *\n * The SDK supports loading credentials for separate profiles. This can be done\n * in two ways:\n *\n * 1. Set the `AWS_PROFILE` environment variable in your process prior to\n * loading the SDK.\n * 2. Directly load the AWS.ProcessCredentials provider:\n *\n * ```javascript\n * var creds = new AWS.ProcessCredentials({profile: 'myprofile'});\n * AWS.config.credentials = creds;\n * ```\n *\n * @!macro nobrowser\n */\nAWS.ProcessCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * Creates a new ProcessCredentials object.\n *\n * @param options [map] a set of options\n * @option options profile [String] (AWS_PROFILE env var or 'default')\n * the name of the profile to load.\n * @option options filename [String] ('~/.aws/credentials' or defined by\n * AWS_SHARED_CREDENTIALS_FILE process env var)\n * the filename to use when loading credentials.\n * @option options callback [Function] (err) Credentials are eagerly loaded\n * by the constructor. When the callback is called with no error, the\n * credentials have been loaded successfully.\n */\n constructor: function ProcessCredentials(options) {\n AWS.Credentials.call(this);\n\n options = options || {};\n\n this.filename = options.filename;\n this.profile = options.profile || process.env.AWS_PROFILE || AWS.util.defaultProfile;\n this.get(options.callback || AWS.util.fn.noop);\n },\n\n /**\n * @api private\n */\n load: function load(callback) {\n var self = this;\n try {\n var profiles = AWS.util.getProfilesFromSharedConfig(iniLoader, this.filename);\n var profile = profiles[this.profile] || {};\n\n if (Object.keys(profile).length === 0) {\n throw AWS.util.error(\n new Error('Profile ' + this.profile + ' not found'),\n { code: 'ProcessCredentialsProviderFailure' }\n );\n }\n\n if (profile['credential_process']) {\n this.loadViaCredentialProcess(profile, function(err, data) {\n if (err) {\n callback(err, null);\n } else {\n self.expired = false;\n self.accessKeyId = data.AccessKeyId;\n self.secretAccessKey = data.SecretAccessKey;\n self.sessionToken = data.SessionToken;\n if (data.Expiration) {\n self.expireTime = new Date(data.Expiration);\n }\n callback(null);\n }\n });\n } else {\n throw AWS.util.error(\n new Error('Profile ' + this.profile + ' did not include credential process'),\n { code: 'ProcessCredentialsProviderFailure' }\n );\n }\n } catch (err) {\n callback(err);\n }\n },\n\n /**\n * Executes the credential_process and retrieves\n * credentials from the output\n * @api private\n * @param profile [map] credentials profile\n * @throws ProcessCredentialsProviderFailure\n */\n loadViaCredentialProcess: function loadViaCredentialProcess(profile, callback) {\n proc.exec(profile['credential_process'], function(err, stdOut, stdErr) {\n if (err) {\n callback(AWS.util.error(\n new Error('credential_process returned error'),\n { code: 'ProcessCredentialsProviderFailure'}\n ), null);\n } else {\n try {\n var credData = JSON.parse(stdOut);\n if (credData.Expiration) {\n var currentTime = AWS.util.date.getDate();\n var expireTime = new Date(credData.Expiration);\n if (expireTime < currentTime) {\n throw Error('credential_process returned expired credentials');\n }\n }\n\n if (credData.Version !== 1) {\n throw Error('credential_process does not return Version == 1');\n }\n callback(null, credData);\n } catch (err) {\n callback(AWS.util.error(\n new Error(err.message),\n { code: 'ProcessCredentialsProviderFailure'}\n ), null);\n }\n }\n });\n },\n\n /**\n * Loads the credentials from the credential process\n *\n * @callback callback function(err)\n * Called after the credential process has been executed. When this\n * callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh(callback) {\n iniLoader.clearCachedFiles();\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n }\n});\n","var AWS = require('../core'),\n ENV_RELATIVE_URI = 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI',\n ENV_FULL_URI = 'AWS_CONTAINER_CREDENTIALS_FULL_URI',\n ENV_AUTH_TOKEN = 'AWS_CONTAINER_AUTHORIZATION_TOKEN',\n FULL_URI_UNRESTRICTED_PROTOCOLS = ['https:'],\n FULL_URI_ALLOWED_PROTOCOLS = ['http:', 'https:'],\n FULL_URI_ALLOWED_HOSTNAMES = ['localhost', '127.0.0.1'],\n RELATIVE_URI_HOST = '169.254.170.2';\n\n/**\n * Represents credentials received from specified URI.\n *\n * This class will request refreshable credentials from the relative URI\n * specified by the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI or the\n * AWS_CONTAINER_CREDENTIALS_FULL_URI environment variable. If valid credentials\n * are returned in the response, these will be used with zero configuration.\n *\n * This credentials class will by default timeout after 1 second of inactivity\n * and retry 3 times.\n * If your requests to the relative URI are timing out, you can increase\n * the value by configuring them directly:\n *\n * ```javascript\n * AWS.config.credentials = new AWS.RemoteCredentials({\n * httpOptions: { timeout: 5000 }, // 5 second timeout\n * maxRetries: 10, // retry 10 times\n * retryDelayOptions: { base: 200 } // see AWS.Config for information\n * });\n * ```\n *\n * @see AWS.Config.retryDelayOptions\n *\n * @!macro nobrowser\n */\nAWS.RemoteCredentials = AWS.util.inherit(AWS.Credentials, {\n constructor: function RemoteCredentials(options) {\n AWS.Credentials.call(this);\n options = options ? AWS.util.copy(options) : {};\n if (!options.httpOptions) options.httpOptions = {};\n options.httpOptions = AWS.util.merge(\n this.httpOptions, options.httpOptions);\n AWS.util.update(this, options);\n },\n\n /**\n * @api private\n */\n httpOptions: { timeout: 1000 },\n\n /**\n * @api private\n */\n maxRetries: 3,\n\n /**\n * @api private\n */\n isConfiguredForEcsCredentials: function isConfiguredForEcsCredentials() {\n return Boolean(\n process &&\n process.env &&\n (process.env[ENV_RELATIVE_URI] || process.env[ENV_FULL_URI])\n );\n },\n\n /**\n * @api private\n */\n getECSFullUri: function getECSFullUri() {\n if (process && process.env) {\n var relative = process.env[ENV_RELATIVE_URI],\n full = process.env[ENV_FULL_URI];\n if (relative) {\n return 'http://' + RELATIVE_URI_HOST + relative;\n } else if (full) {\n var parsed = AWS.util.urlParse(full);\n if (FULL_URI_ALLOWED_PROTOCOLS.indexOf(parsed.protocol) < 0) {\n throw AWS.util.error(\n new Error('Unsupported protocol: AWS.RemoteCredentials supports '\n + FULL_URI_ALLOWED_PROTOCOLS.join(',') + ' only; '\n + parsed.protocol + ' requested.'),\n { code: 'ECSCredentialsProviderFailure' }\n );\n }\n\n if (FULL_URI_UNRESTRICTED_PROTOCOLS.indexOf(parsed.protocol) < 0 &&\n FULL_URI_ALLOWED_HOSTNAMES.indexOf(parsed.hostname) < 0) {\n throw AWS.util.error(\n new Error('Unsupported hostname: AWS.RemoteCredentials only supports '\n + FULL_URI_ALLOWED_HOSTNAMES.join(',') + ' for ' + parsed.protocol + '; '\n + parsed.protocol + '//' + parsed.hostname + ' requested.'),\n { code: 'ECSCredentialsProviderFailure' }\n );\n }\n\n return full;\n } else {\n throw AWS.util.error(\n new Error('Variable ' + ENV_RELATIVE_URI + ' or ' + ENV_FULL_URI +\n ' must be set to use AWS.RemoteCredentials.'),\n { code: 'ECSCredentialsProviderFailure' }\n );\n }\n } else {\n throw AWS.util.error(\n new Error('No process info available'),\n { code: 'ECSCredentialsProviderFailure' }\n );\n }\n },\n\n /**\n * @api private\n */\n getECSAuthToken: function getECSAuthToken() {\n if (process && process.env && process.env[ENV_FULL_URI]) {\n return process.env[ENV_AUTH_TOKEN];\n }\n },\n\n /**\n * @api private\n */\n credsFormatIsValid: function credsFormatIsValid(credData) {\n return (!!credData.accessKeyId && !!credData.secretAccessKey &&\n !!credData.sessionToken && !!credData.expireTime);\n },\n\n /**\n * @api private\n */\n formatCreds: function formatCreds(credData) {\n if (!!credData.credentials) {\n credData = credData.credentials;\n }\n\n return {\n expired: false,\n accessKeyId: credData.accessKeyId || credData.AccessKeyId,\n secretAccessKey: credData.secretAccessKey || credData.SecretAccessKey,\n sessionToken: credData.sessionToken || credData.Token,\n expireTime: new Date(credData.expiration || credData.Expiration)\n };\n },\n\n /**\n * @api private\n */\n request: function request(url, callback) {\n var httpRequest = new AWS.HttpRequest(url);\n httpRequest.method = 'GET';\n httpRequest.headers.Accept = 'application/json';\n var token = this.getECSAuthToken();\n if (token) {\n httpRequest.headers.Authorization = token;\n }\n AWS.util.handleRequestWithRetries(httpRequest, this, callback);\n },\n\n /**\n * Loads the credentials from the relative URI specified by container\n *\n * @callback callback function(err)\n * Called when the request to the relative URI responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, `sessionToken`, and `expireTime` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh(callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n */\n load: function load(callback) {\n var self = this;\n var fullUri;\n\n try {\n fullUri = this.getECSFullUri();\n } catch (err) {\n callback(err);\n return;\n }\n\n this.request(fullUri, function(err, data) {\n if (!err) {\n try {\n data = JSON.parse(data);\n var creds = self.formatCreds(data);\n if (!self.credsFormatIsValid(creds)) {\n throw AWS.util.error(\n new Error('Response data is not in valid format'),\n { code: 'ECSCredentialsProviderFailure' }\n );\n }\n AWS.util.update(self, creds);\n } catch (dataError) {\n err = dataError;\n }\n }\n callback(err, creds);\n });\n }\n});\n","var AWS = require('../core');\nvar STS = require('../../clients/sts');\n\n/**\n * Represents credentials retrieved from STS SAML support.\n *\n * By default this provider gets credentials using the\n * {AWS.STS.assumeRoleWithSAML} service operation. This operation\n * requires a `RoleArn` containing the ARN of the IAM trust policy for the\n * application for which credentials will be given, as well as a `PrincipalArn`\n * representing the ARN for the SAML identity provider. In addition, the\n * `SAMLAssertion` must be set to the token provided by the identity\n * provider. See {constructor} for an example on creating a credentials\n * object with proper `RoleArn`, `PrincipalArn`, and `SAMLAssertion` values.\n *\n * ## Refreshing Credentials from Identity Service\n *\n * In addition to AWS credentials expiring after a given amount of time, the\n * login token from the identity provider will also expire. Once this token\n * expires, it will not be usable to refresh AWS credentials, and another\n * token will be needed. The SDK does not manage refreshing of the token value,\n * but this can be done through a \"refresh token\" supported by most identity\n * providers. Consult the documentation for the identity provider for refreshing\n * tokens. Once the refreshed token is acquired, you should make sure to update\n * this new token in the credentials object's {params} property. The following\n * code will update the SAMLAssertion, assuming you have retrieved an updated\n * token from the identity provider:\n *\n * ```javascript\n * AWS.config.credentials.params.SAMLAssertion = updatedToken;\n * ```\n *\n * Future calls to `credentials.refresh()` will now use the new token.\n *\n * @!attribute params\n * @return [map] the map of params passed to\n * {AWS.STS.assumeRoleWithSAML}. To update the token, set the\n * `params.SAMLAssertion` property.\n */\nAWS.SAMLCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * Creates a new credentials object.\n * @param (see AWS.STS.assumeRoleWithSAML)\n * @example Creating a new credentials object\n * AWS.config.credentials = new AWS.SAMLCredentials({\n * RoleArn: 'arn:aws:iam::1234567890:role/SAMLRole',\n * PrincipalArn: 'arn:aws:iam::1234567890:role/SAMLPrincipal',\n * SAMLAssertion: 'base64-token', // base64-encoded token from IdP\n * });\n * @see AWS.STS.assumeRoleWithSAML\n */\n constructor: function SAMLCredentials(params) {\n AWS.Credentials.call(this);\n this.expired = true;\n this.params = params;\n },\n\n /**\n * Refreshes credentials using {AWS.STS.assumeRoleWithSAML}\n *\n * @callback callback function(err)\n * Called when the STS service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh(callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n */\n load: function load(callback) {\n var self = this;\n self.createClients();\n self.service.assumeRoleWithSAML(function (err, data) {\n if (!err) {\n self.service.credentialsFrom(data, self);\n }\n callback(err);\n });\n },\n\n /**\n * @api private\n */\n createClients: function() {\n this.service = this.service || new STS({params: this.params});\n }\n\n});\n","var AWS = require('../core');\nvar STS = require('../../clients/sts');\nvar iniLoader = AWS.util.iniLoader;\n\nvar ASSUME_ROLE_DEFAULT_REGION = 'us-east-1';\n\n/**\n * Represents credentials loaded from shared credentials file\n * (defaulting to ~/.aws/credentials or defined by the\n * `AWS_SHARED_CREDENTIALS_FILE` environment variable).\n *\n * ## Using the shared credentials file\n *\n * This provider is checked by default in the Node.js environment. To use the\n * credentials file provider, simply add your access and secret keys to the\n * ~/.aws/credentials file in the following format:\n *\n * [default]\n * aws_access_key_id = AKID...\n * aws_secret_access_key = YOUR_SECRET_KEY\n *\n * ## Using custom profiles\n *\n * The SDK supports loading credentials for separate profiles. This can be done\n * in two ways:\n *\n * 1. Set the `AWS_PROFILE` environment variable in your process prior to\n * loading the SDK.\n * 2. Directly load the AWS.SharedIniFileCredentials provider:\n *\n * ```javascript\n * var creds = new AWS.SharedIniFileCredentials({profile: 'myprofile'});\n * AWS.config.credentials = creds;\n * ```\n *\n * @!macro nobrowser\n */\nAWS.SharedIniFileCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * Creates a new SharedIniFileCredentials object.\n *\n * @param options [map] a set of options\n * @option options profile [String] (AWS_PROFILE env var or 'default')\n * the name of the profile to load.\n * @option options filename [String] ('~/.aws/credentials' or defined by\n * AWS_SHARED_CREDENTIALS_FILE process env var)\n * the filename to use when loading credentials.\n * @option options disableAssumeRole [Boolean] (false) True to disable\n * support for profiles that assume an IAM role. If true, and an assume\n * role profile is selected, an error is raised.\n * @option options preferStaticCredentials [Boolean] (false) True to\n * prefer static credentials to role_arn if both are present.\n * @option options tokenCodeFn [Function] (null) Function to provide\n * STS Assume Role TokenCode, if mfa_serial is provided for profile in ini\n * file. Function is called with value of mfa_serial and callback, and\n * should provide the TokenCode or an error to the callback in the format\n * callback(err, token)\n * @option options callback [Function] (err) Credentials are eagerly loaded\n * by the constructor. When the callback is called with no error, the\n * credentials have been loaded successfully.\n * @option options httpOptions [map] A set of options to pass to the low-level\n * HTTP request. Currently supported options are:\n * * **proxy** [String] — the URL to proxy requests through\n * * **agent** [http.Agent, https.Agent] — the Agent object to perform\n * HTTP requests with. Used for connection pooling. Defaults to the global\n * agent (`http.globalAgent`) for non-SSL connections. Note that for\n * SSL connections, a special Agent object is used in order to enable\n * peer certificate verification. This feature is only available in the\n * Node.js environment.\n * * **connectTimeout** [Integer] — Sets the socket to timeout after\n * failing to establish a connection with the server after\n * `connectTimeout` milliseconds. This timeout has no effect once a socket\n * connection has been established.\n * * **timeout** [Integer] — The number of milliseconds a request can\n * take before automatically being terminated.\n * Defaults to two minutes (120000).\n */\n constructor: function SharedIniFileCredentials(options) {\n AWS.Credentials.call(this);\n\n options = options || {};\n\n this.filename = options.filename;\n this.profile = options.profile || process.env.AWS_PROFILE || AWS.util.defaultProfile;\n this.disableAssumeRole = Boolean(options.disableAssumeRole);\n this.preferStaticCredentials = Boolean(options.preferStaticCredentials);\n this.tokenCodeFn = options.tokenCodeFn || null;\n this.httpOptions = options.httpOptions || null;\n this.get(options.callback || AWS.util.fn.noop);\n },\n\n /**\n * @api private\n */\n load: function load(callback) {\n var self = this;\n try {\n var profiles = AWS.util.getProfilesFromSharedConfig(iniLoader, this.filename);\n var profile = profiles[this.profile] || {};\n\n if (Object.keys(profile).length === 0) {\n throw AWS.util.error(\n new Error('Profile ' + this.profile + ' not found'),\n { code: 'SharedIniFileCredentialsProviderFailure' }\n );\n }\n\n /*\n In the CLI, the presence of both a role_arn and static credentials have\n different meanings depending on how many profiles have been visited. For\n the first profile processed, role_arn takes precedence over any static\n credentials, but for all subsequent profiles, static credentials are\n used if present, and only in their absence will the profile's\n source_profile and role_arn keys be used to load another set of\n credentials. This var is intended to yield compatible behaviour in this\n sdk.\n */\n var preferStaticCredentialsToRoleArn = Boolean(\n this.preferStaticCredentials\n && profile['aws_access_key_id']\n && profile['aws_secret_access_key']\n );\n\n if (profile['role_arn'] && !preferStaticCredentialsToRoleArn) {\n this.loadRoleProfile(profiles, profile, function(err, data) {\n if (err) {\n callback(err);\n } else {\n self.expired = false;\n self.accessKeyId = data.Credentials.AccessKeyId;\n self.secretAccessKey = data.Credentials.SecretAccessKey;\n self.sessionToken = data.Credentials.SessionToken;\n self.expireTime = data.Credentials.Expiration;\n callback(null);\n }\n });\n return;\n }\n\n this.accessKeyId = profile['aws_access_key_id'];\n this.secretAccessKey = profile['aws_secret_access_key'];\n this.sessionToken = profile['aws_session_token'];\n\n if (!this.accessKeyId || !this.secretAccessKey) {\n throw AWS.util.error(\n new Error('Credentials not set for profile ' + this.profile),\n { code: 'SharedIniFileCredentialsProviderFailure' }\n );\n }\n this.expired = false;\n callback(null);\n } catch (err) {\n callback(err);\n }\n },\n\n /**\n * Loads the credentials from the shared credentials file\n *\n * @callback callback function(err)\n * Called after the shared INI file on disk is read and parsed. When this\n * callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh(callback) {\n iniLoader.clearCachedFiles();\n this.coalesceRefresh(\n callback || AWS.util.fn.callback,\n this.disableAssumeRole\n );\n },\n\n /**\n * @api private\n */\n loadRoleProfile: function loadRoleProfile(creds, roleProfile, callback) {\n if (this.disableAssumeRole) {\n throw AWS.util.error(\n new Error('Role assumption profiles are disabled. ' +\n 'Failed to load profile ' + this.profile +\n ' from ' + creds.filename),\n { code: 'SharedIniFileCredentialsProviderFailure' }\n );\n }\n\n var self = this;\n var roleArn = roleProfile['role_arn'];\n var roleSessionName = roleProfile['role_session_name'];\n var externalId = roleProfile['external_id'];\n var mfaSerial = roleProfile['mfa_serial'];\n var sourceProfileName = roleProfile['source_profile'];\n\n // From experimentation, the following behavior mimics the AWS CLI:\n //\n // 1. Use region from the profile if present.\n // 2. Otherwise fall back to N. Virginia (global endpoint).\n //\n // It is necessary to do the fallback explicitly, because if\n // 'AWS_STS_REGIONAL_ENDPOINTS=regional', the underlying STS client will\n // otherwise throw an error if region is left 'undefined'.\n //\n // Experimentation shows that the AWS CLI (tested at version 1.18.136)\n // ignores the following potential sources of a region for the purposes of\n // this AssumeRole call:\n //\n // - The [default] profile\n // - The AWS_REGION environment variable\n //\n // Ignoring the [default] profile for the purposes of AssumeRole is arguably\n // a bug in the CLI since it does use the [default] region for service\n // calls... but right now we're matching behavior of the other tool.\n var profileRegion = roleProfile['region'] || ASSUME_ROLE_DEFAULT_REGION;\n\n if (!sourceProfileName) {\n throw AWS.util.error(\n new Error('source_profile is not set using profile ' + this.profile),\n { code: 'SharedIniFileCredentialsProviderFailure' }\n );\n }\n\n var sourceProfileExistanceTest = creds[sourceProfileName];\n\n if (typeof sourceProfileExistanceTest !== 'object') {\n throw AWS.util.error(\n new Error('source_profile ' + sourceProfileName + ' using profile '\n + this.profile + ' does not exist'),\n { code: 'SharedIniFileCredentialsProviderFailure' }\n );\n }\n\n var sourceCredentials = new AWS.SharedIniFileCredentials(\n AWS.util.merge(this.options || {}, {\n profile: sourceProfileName,\n preferStaticCredentials: true\n })\n );\n\n this.roleArn = roleArn;\n var sts = new STS({\n credentials: sourceCredentials,\n region: profileRegion,\n httpOptions: this.httpOptions\n });\n\n var roleParams = {\n RoleArn: roleArn,\n RoleSessionName: roleSessionName || 'aws-sdk-js-' + Date.now()\n };\n\n if (externalId) {\n roleParams.ExternalId = externalId;\n }\n\n if (mfaSerial && self.tokenCodeFn) {\n roleParams.SerialNumber = mfaSerial;\n self.tokenCodeFn(mfaSerial, function(err, token) {\n if (err) {\n var message;\n if (err instanceof Error) {\n message = err.message;\n } else {\n message = err;\n }\n callback(\n AWS.util.error(\n new Error('Error fetching MFA token: ' + message),\n { code: 'SharedIniFileCredentialsProviderFailure' }\n ));\n return;\n }\n\n roleParams.TokenCode = token;\n sts.assumeRole(roleParams, callback);\n });\n return;\n }\n sts.assumeRole(roleParams, callback);\n }\n});\n","var AWS = require('../core');\nvar STS = require('../../clients/sts');\n\n/**\n * Represents temporary credentials retrieved from {AWS.STS}. Without any\n * extra parameters, credentials will be fetched from the\n * {AWS.STS.getSessionToken} operation. If an IAM role is provided, the\n * {AWS.STS.assumeRole} operation will be used to fetch credentials for the\n * role instead.\n *\n * @note AWS.TemporaryCredentials is deprecated, but remains available for\n * backwards compatibility. {AWS.ChainableTemporaryCredentials} is the\n * preferred class for temporary credentials.\n *\n * To setup temporary credentials, configure a set of master credentials\n * using the standard credentials providers (environment, EC2 instance metadata,\n * or from the filesystem), then set the global credentials to a new\n * temporary credentials object:\n *\n * ```javascript\n * // Note that environment credentials are loaded by default,\n * // the following line is shown for clarity:\n * AWS.config.credentials = new AWS.EnvironmentCredentials('AWS');\n *\n * // Now set temporary credentials seeded from the master credentials\n * AWS.config.credentials = new AWS.TemporaryCredentials();\n *\n * // subsequent requests will now use temporary credentials from AWS STS.\n * new AWS.S3().listBucket(function(err, data) { ... });\n * ```\n *\n * @!attribute masterCredentials\n * @return [AWS.Credentials] the master (non-temporary) credentials used to\n * get and refresh temporary credentials from AWS STS.\n * @note (see constructor)\n */\nAWS.TemporaryCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * Creates a new temporary credentials object.\n *\n * @note In order to create temporary credentials, you first need to have\n * \"master\" credentials configured in {AWS.Config.credentials}. These\n * master credentials are necessary to retrieve the temporary credentials,\n * as well as refresh the credentials when they expire.\n * @param params [map] a map of options that are passed to the\n * {AWS.STS.assumeRole} or {AWS.STS.getSessionToken} operations.\n * If a `RoleArn` parameter is passed in, credentials will be based on the\n * IAM role.\n * @param masterCredentials [AWS.Credentials] the master (non-temporary) credentials\n * used to get and refresh temporary credentials from AWS STS.\n * @example Creating a new credentials object for generic temporary credentials\n * AWS.config.credentials = new AWS.TemporaryCredentials();\n * @example Creating a new credentials object for an IAM role\n * AWS.config.credentials = new AWS.TemporaryCredentials({\n * RoleArn: 'arn:aws:iam::1234567890:role/TemporaryCredentials',\n * });\n * @see AWS.STS.assumeRole\n * @see AWS.STS.getSessionToken\n */\n constructor: function TemporaryCredentials(params, masterCredentials) {\n AWS.Credentials.call(this);\n this.loadMasterCredentials(masterCredentials);\n this.expired = true;\n\n this.params = params || {};\n if (this.params.RoleArn) {\n this.params.RoleSessionName =\n this.params.RoleSessionName || 'temporary-credentials';\n }\n },\n\n /**\n * Refreshes credentials using {AWS.STS.assumeRole} or\n * {AWS.STS.getSessionToken}, depending on whether an IAM role ARN was passed\n * to the credentials {constructor}.\n *\n * @callback callback function(err)\n * Called when the STS service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh (callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n */\n load: function load (callback) {\n var self = this;\n self.createClients();\n self.masterCredentials.get(function () {\n self.service.config.credentials = self.masterCredentials;\n var operation = self.params.RoleArn ?\n self.service.assumeRole : self.service.getSessionToken;\n operation.call(self.service, function (err, data) {\n if (!err) {\n self.service.credentialsFrom(data, self);\n }\n callback(err);\n });\n });\n },\n\n /**\n * @api private\n */\n loadMasterCredentials: function loadMasterCredentials (masterCredentials) {\n this.masterCredentials = masterCredentials || AWS.config.credentials;\n while (this.masterCredentials.masterCredentials) {\n this.masterCredentials = this.masterCredentials.masterCredentials;\n }\n\n if (typeof this.masterCredentials.get !== 'function') {\n this.masterCredentials = new AWS.Credentials(this.masterCredentials);\n }\n },\n\n /**\n * @api private\n */\n createClients: function () {\n this.service = this.service || new STS({params: this.params});\n }\n\n});\n","var AWS = require('../core');\nvar fs = require('fs');\nvar STS = require('../../clients/sts');\nvar iniLoader = AWS.util.iniLoader;\n\n/**\n * Represents OIDC credentials from a file on disk\n * If the credentials expire, the SDK can {refresh} the credentials\n * from the file.\n *\n * ## Using the web identity token file\n *\n * This provider is checked by default in the Node.js environment. To use\n * the provider simply add your OIDC token to a file (ASCII encoding) and\n * share the filename in either AWS_WEB_IDENTITY_TOKEN_FILE environment\n * variable or web_identity_token_file shared config variable\n *\n * The file contains encoded OIDC token and the characters are\n * ASCII encoded. OIDC tokens are JSON Web Tokens (JWT).\n * JWT's are 3 base64 encoded strings joined by the '.' character.\n *\n * This class will read filename from AWS_WEB_IDENTITY_TOKEN_FILE\n * environment variable or web_identity_token_file shared config variable,\n * and get the OIDC token from filename.\n * It will also read IAM role to be assumed from AWS_ROLE_ARN\n * environment variable or role_arn shared config variable.\n * This provider gets credetials using the {AWS.STS.assumeRoleWithWebIdentity}\n * service operation\n *\n * @!macro nobrowser\n */\nAWS.TokenFileWebIdentityCredentials = AWS.util.inherit(AWS.Credentials, {\n\n /**\n * @example Creating a new credentials object\n * AWS.config.credentials = new AWS.TokenFileWebIdentityCredentials(\n * // optionally provide configuration to apply to the underlying AWS.STS service client\n * // if configuration is not provided, then configuration will be pulled from AWS.config\n * {\n * // specify timeout options\n * httpOptions: {\n * timeout: 100\n * }\n * });\n * @see AWS.Config\n */\n constructor: function TokenFileWebIdentityCredentials(clientConfig) {\n AWS.Credentials.call(this);\n this.data = null;\n this.clientConfig = AWS.util.copy(clientConfig || {});\n },\n\n /**\n * Returns params from environment variables\n *\n * @api private\n */\n getParamsFromEnv: function getParamsFromEnv() {\n var ENV_TOKEN_FILE = 'AWS_WEB_IDENTITY_TOKEN_FILE',\n ENV_ROLE_ARN = 'AWS_ROLE_ARN';\n if (process.env[ENV_TOKEN_FILE] && process.env[ENV_ROLE_ARN]) {\n return [{\n envTokenFile: process.env[ENV_TOKEN_FILE],\n roleArn: process.env[ENV_ROLE_ARN],\n roleSessionName: process.env['AWS_ROLE_SESSION_NAME']\n }];\n }\n },\n\n /**\n * Returns params from shared config variables\n *\n * @api private\n */\n getParamsFromSharedConfig: function getParamsFromSharedConfig() {\n var profiles = AWS.util.getProfilesFromSharedConfig(iniLoader);\n var profileName = process.env.AWS_PROFILE || AWS.util.defaultProfile;\n var profile = profiles[profileName] || {};\n\n if (Object.keys(profile).length === 0) {\n throw AWS.util.error(\n new Error('Profile ' + profileName + ' not found'),\n { code: 'TokenFileWebIdentityCredentialsProviderFailure' }\n );\n }\n\n var paramsArray = [];\n\n while (!profile['web_identity_token_file'] && profile['source_profile']) {\n paramsArray.unshift({\n roleArn: profile['role_arn'],\n roleSessionName: profile['role_session_name']\n });\n var sourceProfile = profile['source_profile'];\n profile = profiles[sourceProfile];\n }\n\n paramsArray.unshift({\n envTokenFile: profile['web_identity_token_file'],\n roleArn: profile['role_arn'],\n roleSessionName: profile['role_session_name']\n });\n\n return paramsArray;\n },\n\n /**\n * Refreshes credentials using {AWS.STS.assumeRoleWithWebIdentity}\n *\n * @callback callback function(err)\n * Called when the STS service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see AWS.Credentials.get\n */\n refresh: function refresh(callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n */\n assumeRoleChaining: function assumeRoleChaining(paramsArray, callback) {\n var self = this;\n if (paramsArray.length === 0) {\n self.service.credentialsFrom(self.data, self);\n callback();\n } else {\n var params = paramsArray.shift();\n self.service.config.credentials = self.service.credentialsFrom(self.data, self);\n self.service.assumeRole(\n {\n RoleArn: params.roleArn,\n RoleSessionName: params.roleSessionName || 'token-file-web-identity'\n },\n function (err, data) {\n self.data = null;\n if (err) {\n callback(err);\n } else {\n self.data = data;\n self.assumeRoleChaining(paramsArray, callback);\n }\n }\n );\n }\n },\n\n /**\n * @api private\n */\n load: function load(callback) {\n var self = this;\n try {\n var paramsArray = self.getParamsFromEnv();\n if (!paramsArray) {\n paramsArray = self.getParamsFromSharedConfig();\n }\n if (paramsArray) {\n var params = paramsArray.shift();\n var oidcToken = fs.readFileSync(params.envTokenFile, {encoding: 'ascii'});\n if (!self.service) {\n self.createClients();\n }\n self.service.assumeRoleWithWebIdentity(\n {\n WebIdentityToken: oidcToken,\n RoleArn: params.roleArn,\n RoleSessionName: params.roleSessionName || 'token-file-web-identity'\n },\n function (err, data) {\n self.data = null;\n if (err) {\n callback(err);\n } else {\n self.data = data;\n self.assumeRoleChaining(paramsArray, callback);\n }\n }\n );\n }\n } catch (err) {\n callback(err);\n }\n },\n\n /**\n * @api private\n */\n createClients: function() {\n if (!this.service) {\n var stsConfig = AWS.util.merge({}, this.clientConfig);\n this.service = new STS(stsConfig);\n\n // Retry in case of IDPCommunicationErrorException or InvalidIdentityToken\n this.service.retryableError = function(error) {\n if (error.code === 'IDPCommunicationErrorException' || error.code === 'InvalidIdentityToken') {\n return true;\n } else {\n return AWS.Service.prototype.retryableError.call(this, error);\n }\n };\n }\n }\n});\n","var AWS = require('../core');\nvar STS = require('../../clients/sts');\n\n/**\n * Represents credentials retrieved from STS Web Identity Federation support.\n *\n * By default this provider gets credentials using the\n * {AWS.STS.assumeRoleWithWebIdentity} service operation. This operation\n * requires a `RoleArn` containing the ARN of the IAM trust policy for the\n * application for which credentials will be given. In addition, the\n * `WebIdentityToken` must be set to the token provided by the identity\n * provider. See {constructor} for an example on creating a credentials\n * object with proper `RoleArn` and `WebIdentityToken` values.\n *\n * ## Refreshing Credentials from Identity Service\n *\n * In addition to AWS credentials expiring after a given amount of time, the\n * login token from the identity provider will also expire. Once this token\n * expires, it will not be usable to refresh AWS credentials, and another\n * token will be needed. The SDK does not manage refreshing of the token value,\n * but this can be done through a \"refresh token\" supported by most identity\n * providers. Consult the documentation for the identity provider for refreshing\n * tokens. Once the refreshed token is acquired, you should make sure to update\n * this new token in the credentials object's {params} property. The following\n * code will update the WebIdentityToken, assuming you have retrieved an updated\n * token from the identity provider:\n *\n * ```javascript\n * AWS.config.credentials.params.WebIdentityToken = updatedToken;\n * ```\n *\n * Future calls to `credentials.refresh()` will now use the new token.\n *\n * @!attribute params\n * @return [map] the map of params passed to\n * {AWS.STS.assumeRoleWithWebIdentity}. To update the token, set the\n * `params.WebIdentityToken` property.\n * @!attribute data\n * @return [map] the raw data response from the call to\n * {AWS.STS.assumeRoleWithWebIdentity}. Use this if you want to get\n * access to other properties from the response.\n */\nAWS.WebIdentityCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * Creates a new credentials object.\n * @param (see AWS.STS.assumeRoleWithWebIdentity)\n * @example Creating a new credentials object\n * AWS.config.credentials = new AWS.WebIdentityCredentials({\n * RoleArn: 'arn:aws:iam::1234567890:role/WebIdentity',\n * WebIdentityToken: 'ABCDEFGHIJKLMNOP', // token from identity service\n * RoleSessionName: 'web' // optional name, defaults to web-identity\n * }, {\n * // optionally provide configuration to apply to the underlying AWS.STS service client\n * // if configuration is not provided, then configuration will be pulled from AWS.config\n *\n * // specify timeout options\n * httpOptions: {\n * timeout: 100\n * }\n * });\n * @see AWS.STS.assumeRoleWithWebIdentity\n * @see AWS.Config\n */\n constructor: function WebIdentityCredentials(params, clientConfig) {\n AWS.Credentials.call(this);\n this.expired = true;\n this.params = params;\n this.params.RoleSessionName = this.params.RoleSessionName || 'web-identity';\n this.data = null;\n this._clientConfig = AWS.util.copy(clientConfig || {});\n },\n\n /**\n * Refreshes credentials using {AWS.STS.assumeRoleWithWebIdentity}\n *\n * @callback callback function(err)\n * Called when the STS service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh(callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n */\n load: function load(callback) {\n var self = this;\n self.createClients();\n self.service.assumeRoleWithWebIdentity(function (err, data) {\n self.data = null;\n if (!err) {\n self.data = data;\n self.service.credentialsFrom(data, self);\n }\n callback(err);\n });\n },\n\n /**\n * @api private\n */\n createClients: function() {\n if (!this.service) {\n var stsConfig = AWS.util.merge({}, this._clientConfig);\n stsConfig.params = this.params;\n this.service = new STS(stsConfig);\n }\n }\n\n});\n","var AWS = require('./core');\nvar util = require('./util');\nvar endpointDiscoveryEnabledEnvs = ['AWS_ENABLE_ENDPOINT_DISCOVERY', 'AWS_ENDPOINT_DISCOVERY_ENABLED'];\n\n/**\n * Generate key (except resources and operation part) to index the endpoints in the cache\n * If input shape has endpointdiscoveryid trait then use\n * accessKey + operation + resources + region + service as cache key\n * If input shape doesn't have endpointdiscoveryid trait then use\n * accessKey + region + service as cache key\n * @return [map] object with keys to index endpoints.\n * @api private\n */\nfunction getCacheKey(request) {\n var service = request.service;\n var api = service.api || {};\n var operations = api.operations;\n var identifiers = {};\n if (service.config.region) {\n identifiers.region = service.config.region;\n }\n if (api.serviceId) {\n identifiers.serviceId = api.serviceId;\n }\n if (service.config.credentials.accessKeyId) {\n identifiers.accessKeyId = service.config.credentials.accessKeyId;\n }\n return identifiers;\n}\n\n/**\n * Recursive helper for marshallCustomIdentifiers().\n * Looks for required string input members that have 'endpointdiscoveryid' trait.\n * @api private\n */\nfunction marshallCustomIdentifiersHelper(result, params, shape) {\n if (!shape || params === undefined || params === null) return;\n if (shape.type === 'structure' && shape.required && shape.required.length > 0) {\n util.arrayEach(shape.required, function(name) {\n var memberShape = shape.members[name];\n if (memberShape.endpointDiscoveryId === true) {\n var locationName = memberShape.isLocationName ? memberShape.name : name;\n result[locationName] = String(params[name]);\n } else {\n marshallCustomIdentifiersHelper(result, params[name], memberShape);\n }\n });\n }\n}\n\n/**\n * Get custom identifiers for cache key.\n * Identifies custom identifiers by checking each shape's `endpointDiscoveryId` trait.\n * @param [object] request object\n * @param [object] input shape of the given operation's api\n * @api private\n */\nfunction marshallCustomIdentifiers(request, shape) {\n var identifiers = {};\n marshallCustomIdentifiersHelper(identifiers, request.params, shape);\n return identifiers;\n}\n\n/**\n * Call endpoint discovery operation when it's optional.\n * When endpoint is available in cache then use the cached endpoints. If endpoints\n * are unavailable then use regional endpoints and call endpoint discovery operation\n * asynchronously. This is turned off by default.\n * @param [object] request object\n * @api private\n */\nfunction optionalDiscoverEndpoint(request) {\n var service = request.service;\n var api = service.api;\n var operationModel = api.operations ? api.operations[request.operation] : undefined;\n var inputShape = operationModel ? operationModel.input : undefined;\n\n var identifiers = marshallCustomIdentifiers(request, inputShape);\n var cacheKey = getCacheKey(request);\n if (Object.keys(identifiers).length > 0) {\n cacheKey = util.update(cacheKey, identifiers);\n if (operationModel) cacheKey.operation = operationModel.name;\n }\n var endpoints = AWS.endpointCache.get(cacheKey);\n if (endpoints && endpoints.length === 1 && endpoints[0].Address === '') {\n //endpoint operation is being made but response not yet received\n //or endpoint operation just failed in 1 minute\n return;\n } else if (endpoints && endpoints.length > 0) {\n //found endpoint record from cache\n request.httpRequest.updateEndpoint(endpoints[0].Address);\n } else {\n //endpoint record not in cache or outdated. make discovery operation\n var endpointRequest = service.makeRequest(api.endpointOperation, {\n Operation: operationModel.name,\n Identifiers: identifiers,\n });\n addApiVersionHeader(endpointRequest);\n endpointRequest.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS);\n endpointRequest.removeListener('retry', AWS.EventListeners.Core.RETRY_CHECK);\n //put in a placeholder for endpoints already requested, prevent\n //too much in-flight calls\n AWS.endpointCache.put(cacheKey, [{\n Address: '',\n CachePeriodInMinutes: 1\n }]);\n endpointRequest.send(function(err, data) {\n if (data && data.Endpoints) {\n AWS.endpointCache.put(cacheKey, data.Endpoints);\n } else if (err) {\n AWS.endpointCache.put(cacheKey, [{\n Address: '',\n CachePeriodInMinutes: 1 //not to make more endpoint operation in next 1 minute\n }]);\n }\n });\n }\n}\n\nvar requestQueue = {};\n\n/**\n * Call endpoint discovery operation when it's required.\n * When endpoint is available in cache then use cached ones. If endpoints are\n * unavailable then SDK should call endpoint operation then use returned new\n * endpoint for the api call. SDK will automatically attempt to do endpoint\n * discovery. This is turned off by default\n * @param [object] request object\n * @api private\n */\nfunction requiredDiscoverEndpoint(request, done) {\n var service = request.service;\n var api = service.api;\n var operationModel = api.operations ? api.operations[request.operation] : undefined;\n var inputShape = operationModel ? operationModel.input : undefined;\n\n var identifiers = marshallCustomIdentifiers(request, inputShape);\n var cacheKey = getCacheKey(request);\n if (Object.keys(identifiers).length > 0) {\n cacheKey = util.update(cacheKey, identifiers);\n if (operationModel) cacheKey.operation = operationModel.name;\n }\n var cacheKeyStr = AWS.EndpointCache.getKeyString(cacheKey);\n var endpoints = AWS.endpointCache.get(cacheKeyStr); //endpoint cache also accepts string keys\n if (endpoints && endpoints.length === 1 && endpoints[0].Address === '') {\n //endpoint operation is being made but response not yet received\n //push request object to a pending queue\n if (!requestQueue[cacheKeyStr]) requestQueue[cacheKeyStr] = [];\n requestQueue[cacheKeyStr].push({request: request, callback: done});\n return;\n } else if (endpoints && endpoints.length > 0) {\n request.httpRequest.updateEndpoint(endpoints[0].Address);\n done();\n } else {\n var endpointRequest = service.makeRequest(api.endpointOperation, {\n Operation: operationModel.name,\n Identifiers: identifiers,\n });\n endpointRequest.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS);\n addApiVersionHeader(endpointRequest);\n\n //put in a placeholder for endpoints already requested, prevent\n //too much in-flight calls\n AWS.endpointCache.put(cacheKeyStr, [{\n Address: '',\n CachePeriodInMinutes: 60 //long-live cache\n }]);\n endpointRequest.send(function(err, data) {\n if (err) {\n request.response.error = util.error(err, { retryable: false });\n AWS.endpointCache.remove(cacheKey);\n\n //fail all the pending requests in batch\n if (requestQueue[cacheKeyStr]) {\n var pendingRequests = requestQueue[cacheKeyStr];\n util.arrayEach(pendingRequests, function(requestContext) {\n requestContext.request.response.error = util.error(err, { retryable: false });\n requestContext.callback();\n });\n delete requestQueue[cacheKeyStr];\n }\n } else if (data) {\n AWS.endpointCache.put(cacheKeyStr, data.Endpoints);\n request.httpRequest.updateEndpoint(data.Endpoints[0].Address);\n\n //update the endpoint for all the pending requests in batch\n if (requestQueue[cacheKeyStr]) {\n var pendingRequests = requestQueue[cacheKeyStr];\n util.arrayEach(pendingRequests, function(requestContext) {\n requestContext.request.httpRequest.updateEndpoint(data.Endpoints[0].Address);\n requestContext.callback();\n });\n delete requestQueue[cacheKeyStr];\n }\n }\n done();\n });\n }\n}\n\n/**\n * add api version header to endpoint operation\n * @api private\n */\nfunction addApiVersionHeader(endpointRequest) {\n var api = endpointRequest.service.api;\n var apiVersion = api.apiVersion;\n if (apiVersion && !endpointRequest.httpRequest.headers['x-amz-api-version']) {\n endpointRequest.httpRequest.headers['x-amz-api-version'] = apiVersion;\n }\n}\n\n/**\n * If api call gets invalid endpoint exception, SDK should attempt to remove the invalid\n * endpoint from cache.\n * @api private\n */\nfunction invalidateCachedEndpoints(response) {\n var error = response.error;\n var httpResponse = response.httpResponse;\n if (error &&\n (error.code === 'InvalidEndpointException' || httpResponse.statusCode === 421)\n ) {\n var request = response.request;\n var operations = request.service.api.operations || {};\n var inputShape = operations[request.operation] ? operations[request.operation].input : undefined;\n var identifiers = marshallCustomIdentifiers(request, inputShape);\n var cacheKey = getCacheKey(request);\n if (Object.keys(identifiers).length > 0) {\n cacheKey = util.update(cacheKey, identifiers);\n if (operations[request.operation]) cacheKey.operation = operations[request.operation].name;\n }\n AWS.endpointCache.remove(cacheKey);\n }\n}\n\n/**\n * If endpoint is explicitly configured, SDK should not do endpoint discovery in anytime.\n * @param [object] client Service client object.\n * @api private\n */\nfunction hasCustomEndpoint(client) {\n //if set endpoint is set for specific client, enable endpoint discovery will raise an error.\n if (client._originalConfig && client._originalConfig.endpoint && client._originalConfig.endpointDiscoveryEnabled === true) {\n throw util.error(new Error(), {\n code: 'ConfigurationException',\n message: 'Custom endpoint is supplied; endpointDiscoveryEnabled must not be true.'\n });\n };\n var svcConfig = AWS.config[client.serviceIdentifier] || {};\n return Boolean(AWS.config.endpoint || svcConfig.endpoint || (client._originalConfig && client._originalConfig.endpoint));\n}\n\n/**\n * @api private\n */\nfunction isFalsy(value) {\n return ['false', '0'].indexOf(value) >= 0;\n}\n\n/**\n * If endpoint discovery should perform for this request when no operation requires endpoint\n * discovery for the given service.\n * SDK performs config resolution in order like below:\n * 1. If set in client configuration.\n * 2. If set in env AWS_ENABLE_ENDPOINT_DISCOVERY.\n * 3. If set in shared ini config file with key 'endpoint_discovery_enabled'.\n * @param [object] request request object.\n * @returns [boolean|undefined] if endpoint discovery config is not set in any source, this\n * function returns undefined\n * @api private\n */\nfunction resolveEndpointDiscoveryConfig(request) {\n var service = request.service || {};\n if (service.config.endpointDiscoveryEnabled !== undefined) {\n return service.config.endpointDiscoveryEnabled;\n }\n\n //shared ini file is only available in Node\n //not to check env in browser\n if (util.isBrowser()) return undefined;\n\n // If any of recognized endpoint discovery config env is set\n for (var i = 0; i < endpointDiscoveryEnabledEnvs.length; i++) {\n var env = endpointDiscoveryEnabledEnvs[i];\n if (Object.prototype.hasOwnProperty.call(process.env, env)) {\n if (process.env[env] === '' || process.env[env] === undefined) {\n throw util.error(new Error(), {\n code: 'ConfigurationException',\n message: 'environmental variable ' + env + ' cannot be set to nothing'\n });\n }\n return !isFalsy(process.env[env]);\n }\n }\n\n var configFile = {};\n try {\n configFile = AWS.util.iniLoader ? AWS.util.iniLoader.loadFrom({\n isConfig: true,\n filename: process.env[AWS.util.sharedConfigFileEnv]\n }) : {};\n } catch (e) {}\n var sharedFileConfig = configFile[\n process.env.AWS_PROFILE || AWS.util.defaultProfile\n ] || {};\n if (Object.prototype.hasOwnProperty.call(sharedFileConfig, 'endpoint_discovery_enabled')) {\n if (sharedFileConfig.endpoint_discovery_enabled === undefined) {\n throw util.error(new Error(), {\n code: 'ConfigurationException',\n message: 'config file entry \\'endpoint_discovery_enabled\\' cannot be set to nothing'\n });\n }\n return !isFalsy(sharedFileConfig.endpoint_discovery_enabled);\n }\n return undefined;\n}\n\n/**\n * attach endpoint discovery logic to request object\n * @param [object] request\n * @api private\n */\nfunction discoverEndpoint(request, done) {\n var service = request.service || {};\n if (hasCustomEndpoint(service) || request.isPresigned()) return done();\n\n var operations = service.api.operations || {};\n var operationModel = operations[request.operation];\n var isEndpointDiscoveryRequired = operationModel ? operationModel.endpointDiscoveryRequired : 'NULL';\n var isEnabled = resolveEndpointDiscoveryConfig(request);\n var hasRequiredEndpointDiscovery = service.api.hasRequiredEndpointDiscovery;\n if (isEnabled || hasRequiredEndpointDiscovery) {\n // Once a customer enables endpoint discovery, the SDK should start appending\n // the string endpoint-discovery to the user-agent on all requests.\n request.httpRequest.appendToUserAgent('endpoint-discovery');\n }\n switch (isEndpointDiscoveryRequired) {\n case 'OPTIONAL':\n if (isEnabled || hasRequiredEndpointDiscovery) {\n // For a given service; if at least one operation requires endpoint discovery then the SDK must enable endpoint discovery\n // by default for all operations of that service, including operations where endpoint discovery is optional.\n optionalDiscoverEndpoint(request);\n request.addNamedListener('INVALIDATE_CACHED_ENDPOINTS', 'extractError', invalidateCachedEndpoints);\n }\n done();\n break;\n case 'REQUIRED':\n if (isEnabled === false) {\n // For a given operation; if endpoint discovery is required and it has been disabled on the SDK client,\n // then the SDK must return a clear and actionable exception.\n request.response.error = util.error(new Error(), {\n code: 'ConfigurationException',\n message: 'Endpoint Discovery is disabled but ' + service.api.className + '.' + request.operation +\n '() requires it. Please check your configurations.'\n });\n done();\n break;\n }\n request.addNamedListener('INVALIDATE_CACHED_ENDPOINTS', 'extractError', invalidateCachedEndpoints);\n requiredDiscoverEndpoint(request, done);\n break;\n case 'NULL':\n default:\n done();\n break;\n }\n}\n\nmodule.exports = {\n discoverEndpoint: discoverEndpoint,\n requiredDiscoverEndpoint: requiredDiscoverEndpoint,\n optionalDiscoverEndpoint: optionalDiscoverEndpoint,\n marshallCustomIdentifiers: marshallCustomIdentifiers,\n getCacheKey: getCacheKey,\n invalidateCachedEndpoint: invalidateCachedEndpoints,\n};\n","var AWS = require('../core');\nvar util = AWS.util;\nvar typeOf = require('./types').typeOf;\nvar DynamoDBSet = require('./set');\nvar NumberValue = require('./numberValue');\n\nAWS.DynamoDB.Converter = {\n /**\n * Convert a JavaScript value to its equivalent DynamoDB AttributeValue type\n *\n * @param data [any] The data to convert to a DynamoDB AttributeValue\n * @param options [map]\n * @option options convertEmptyValues [Boolean] Whether to automatically\n * convert empty strings, blobs,\n * and sets to `null`\n * @option options wrapNumbers [Boolean] Whether to return numbers as a\n * NumberValue object instead of\n * converting them to native JavaScript\n * numbers. This allows for the safe\n * round-trip transport of numbers of\n * arbitrary size.\n * @return [map] An object in the Amazon DynamoDB AttributeValue format\n *\n * @see AWS.DynamoDB.Converter.marshall AWS.DynamoDB.Converter.marshall to\n * convert entire records (rather than individual attributes)\n */\n input: function convertInput(data, options) {\n options = options || {};\n var type = typeOf(data);\n if (type === 'Object') {\n return formatMap(data, options);\n } else if (type === 'Array') {\n return formatList(data, options);\n } else if (type === 'Set') {\n return formatSet(data, options);\n } else if (type === 'String') {\n if (data.length === 0 && options.convertEmptyValues) {\n return convertInput(null);\n }\n return { S: data };\n } else if (type === 'Number' || type === 'NumberValue') {\n return { N: data.toString() };\n } else if (type === 'Binary') {\n if (data.length === 0 && options.convertEmptyValues) {\n return convertInput(null);\n }\n return { B: data };\n } else if (type === 'Boolean') {\n return { BOOL: data };\n } else if (type === 'null') {\n return { NULL: true };\n } else if (type !== 'undefined' && type !== 'Function') {\n // this value has a custom constructor\n return formatMap(data, options);\n }\n },\n\n /**\n * Convert a JavaScript object into a DynamoDB record.\n *\n * @param data [any] The data to convert to a DynamoDB record\n * @param options [map]\n * @option options convertEmptyValues [Boolean] Whether to automatically\n * convert empty strings, blobs,\n * and sets to `null`\n * @option options wrapNumbers [Boolean] Whether to return numbers as a\n * NumberValue object instead of\n * converting them to native JavaScript\n * numbers. This allows for the safe\n * round-trip transport of numbers of\n * arbitrary size.\n *\n * @return [map] An object in the DynamoDB record format.\n *\n * @example Convert a JavaScript object into a DynamoDB record\n * var marshalled = AWS.DynamoDB.Converter.marshall({\n * string: 'foo',\n * list: ['fizz', 'buzz', 'pop'],\n * map: {\n * nestedMap: {\n * key: 'value',\n * }\n * },\n * number: 123,\n * nullValue: null,\n * boolValue: true,\n * stringSet: new DynamoDBSet(['foo', 'bar', 'baz'])\n * });\n */\n marshall: function marshallItem(data, options) {\n return AWS.DynamoDB.Converter.input(data, options).M;\n },\n\n /**\n * Convert a DynamoDB AttributeValue object to its equivalent JavaScript type.\n *\n * @param data [map] An object in the Amazon DynamoDB AttributeValue format\n * @param options [map]\n * @option options convertEmptyValues [Boolean] Whether to automatically\n * convert empty strings, blobs,\n * and sets to `null`\n * @option options wrapNumbers [Boolean] Whether to return numbers as a\n * NumberValue object instead of\n * converting them to native JavaScript\n * numbers. This allows for the safe\n * round-trip transport of numbers of\n * arbitrary size.\n *\n * @return [Object|Array|String|Number|Boolean|null]\n *\n * @see AWS.DynamoDB.Converter.unmarshall AWS.DynamoDB.Converter.unmarshall to\n * convert entire records (rather than individual attributes)\n */\n output: function convertOutput(data, options) {\n options = options || {};\n var list, map, i;\n for (var type in data) {\n var values = data[type];\n if (type === 'M') {\n map = {};\n for (var key in values) {\n map[key] = convertOutput(values[key], options);\n }\n return map;\n } else if (type === 'L') {\n list = [];\n for (i = 0; i < values.length; i++) {\n list.push(convertOutput(values[i], options));\n }\n return list;\n } else if (type === 'SS') {\n list = [];\n for (i = 0; i < values.length; i++) {\n list.push(values[i] + '');\n }\n return new DynamoDBSet(list);\n } else if (type === 'NS') {\n list = [];\n for (i = 0; i < values.length; i++) {\n list.push(convertNumber(values[i], options.wrapNumbers));\n }\n return new DynamoDBSet(list);\n } else if (type === 'BS') {\n list = [];\n for (i = 0; i < values.length; i++) {\n list.push(AWS.util.buffer.toBuffer(values[i]));\n }\n return new DynamoDBSet(list);\n } else if (type === 'S') {\n return values + '';\n } else if (type === 'N') {\n return convertNumber(values, options.wrapNumbers);\n } else if (type === 'B') {\n return util.buffer.toBuffer(values);\n } else if (type === 'BOOL') {\n return (values === 'true' || values === 'TRUE' || values === true);\n } else if (type === 'NULL') {\n return null;\n }\n }\n },\n\n /**\n * Convert a DynamoDB record into a JavaScript object.\n *\n * @param data [any] The DynamoDB record\n * @param options [map]\n * @option options convertEmptyValues [Boolean] Whether to automatically\n * convert empty strings, blobs,\n * and sets to `null`\n * @option options wrapNumbers [Boolean] Whether to return numbers as a\n * NumberValue object instead of\n * converting them to native JavaScript\n * numbers. This allows for the safe\n * round-trip transport of numbers of\n * arbitrary size.\n *\n * @return [map] An object whose properties have been converted from\n * DynamoDB's AttributeValue format into their corresponding native\n * JavaScript types.\n *\n * @example Convert a record received from a DynamoDB stream\n * var unmarshalled = AWS.DynamoDB.Converter.unmarshall({\n * string: {S: 'foo'},\n * list: {L: [{S: 'fizz'}, {S: 'buzz'}, {S: 'pop'}]},\n * map: {\n * M: {\n * nestedMap: {\n * M: {\n * key: {S: 'value'}\n * }\n * }\n * }\n * },\n * number: {N: '123'},\n * nullValue: {NULL: true},\n * boolValue: {BOOL: true}\n * });\n */\n unmarshall: function unmarshall(data, options) {\n return AWS.DynamoDB.Converter.output({M: data}, options);\n }\n};\n\n/**\n * @api private\n * @param data [Array]\n * @param options [map]\n */\nfunction formatList(data, options) {\n var list = {L: []};\n for (var i = 0; i < data.length; i++) {\n list['L'].push(AWS.DynamoDB.Converter.input(data[i], options));\n }\n return list;\n}\n\n/**\n * @api private\n * @param value [String]\n * @param wrapNumbers [Boolean]\n */\nfunction convertNumber(value, wrapNumbers) {\n return wrapNumbers ? new NumberValue(value) : Number(value);\n}\n\n/**\n * @api private\n * @param data [map]\n * @param options [map]\n */\nfunction formatMap(data, options) {\n var map = {M: {}};\n for (var key in data) {\n var formatted = AWS.DynamoDB.Converter.input(data[key], options);\n if (formatted !== void 0) {\n map['M'][key] = formatted;\n }\n }\n return map;\n}\n\n/**\n * @api private\n */\nfunction formatSet(data, options) {\n options = options || {};\n var values = data.values;\n if (options.convertEmptyValues) {\n values = filterEmptySetValues(data);\n if (values.length === 0) {\n return AWS.DynamoDB.Converter.input(null);\n }\n }\n\n var map = {};\n switch (data.type) {\n case 'String': map['SS'] = values; break;\n case 'Binary': map['BS'] = values; break;\n case 'Number': map['NS'] = values.map(function (value) {\n return value.toString();\n });\n }\n return map;\n}\n\n/**\n * @api private\n */\nfunction filterEmptySetValues(set) {\n var nonEmptyValues = [];\n var potentiallyEmptyTypes = {\n String: true,\n Binary: true,\n Number: false\n };\n if (potentiallyEmptyTypes[set.type]) {\n for (var i = 0; i < set.values.length; i++) {\n if (set.values[i].length === 0) {\n continue;\n }\n nonEmptyValues.push(set.values[i]);\n }\n\n return nonEmptyValues;\n }\n\n return set.values;\n}\n\n/**\n * @api private\n */\nmodule.exports = AWS.DynamoDB.Converter;\n","var AWS = require('../core');\nvar Translator = require('./translator');\nvar DynamoDBSet = require('./set');\n\n/**\n * The document client simplifies working with items in Amazon DynamoDB\n * by abstracting away the notion of attribute values. This abstraction\n * annotates native JavaScript types supplied as input parameters, as well\n * as converts annotated response data to native JavaScript types.\n *\n * ## Marshalling Input and Unmarshalling Response Data\n *\n * The document client affords developers the use of native JavaScript types\n * instead of `AttributeValue`s to simplify the JavaScript development\n * experience with Amazon DynamoDB. JavaScript objects passed in as parameters\n * are marshalled into `AttributeValue` shapes required by Amazon DynamoDB.\n * Responses from DynamoDB are unmarshalled into plain JavaScript objects\n * by the `DocumentClient`. The `DocumentClient`, does not accept\n * `AttributeValue`s in favor of native JavaScript types.\n *\n * | JavaScript Type | DynamoDB AttributeValue |\n * |:----------------------------------------------------------------------:|-------------------------|\n * | String | S |\n * | Number | N |\n * | Boolean | BOOL |\n * | null | NULL |\n * | Array | L |\n * | Object | M |\n * | Buffer, File, Blob, ArrayBuffer, DataView, and JavaScript typed arrays | B |\n *\n * ## Support for Sets\n *\n * The `DocumentClient` offers a convenient way to create sets from\n * JavaScript Arrays. The type of set is inferred from the first element\n * in the array. DynamoDB supports string, number, and binary sets. To\n * learn more about supported types see the\n * [Amazon DynamoDB Data Model Documentation](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html)\n * For more information see {AWS.DynamoDB.DocumentClient.createSet}\n *\n */\nAWS.DynamoDB.DocumentClient = AWS.util.inherit({\n\n /**\n * Creates a DynamoDB document client with a set of configuration options.\n *\n * @option options params [map] An optional map of parameters to bind to every\n * request sent by this service object.\n * @option options service [AWS.DynamoDB] An optional pre-configured instance\n * of the AWS.DynamoDB service object to use for requests. The object may\n * bound parameters used by the document client.\n * @option options convertEmptyValues [Boolean] set to true if you would like\n * the document client to convert empty values (0-length strings, binary\n * buffers, and sets) to be converted to NULL types when persisting to\n * DynamoDB.\n * @option options wrapNumbers [Boolean] Set to true to return numbers as a\n * NumberValue object instead of converting them to native JavaScript numbers.\n * This allows for the safe round-trip transport of numbers of arbitrary size.\n * @see AWS.DynamoDB.constructor\n *\n */\n constructor: function DocumentClient(options) {\n var self = this;\n self.options = options || {};\n self.configure(self.options);\n },\n\n /**\n * @api private\n */\n configure: function configure(options) {\n var self = this;\n self.service = options.service;\n self.bindServiceObject(options);\n self.attrValue = options.attrValue =\n self.service.api.operations.putItem.input.members.Item.value.shape;\n },\n\n /**\n * @api private\n */\n bindServiceObject: function bindServiceObject(options) {\n var self = this;\n options = options || {};\n\n if (!self.service) {\n self.service = new AWS.DynamoDB(options);\n } else {\n var config = AWS.util.copy(self.service.config);\n self.service = new self.service.constructor.__super__(config);\n self.service.config.params =\n AWS.util.merge(self.service.config.params || {}, options.params);\n }\n },\n\n /**\n * @api private\n */\n makeServiceRequest: function(operation, params, callback) {\n var self = this;\n var request = self.service[operation](params);\n self.setupRequest(request);\n self.setupResponse(request);\n if (typeof callback === 'function') {\n request.send(callback);\n }\n return request;\n },\n\n /**\n * @api private\n */\n serviceClientOperationsMap: {\n batchGet: 'batchGetItem',\n batchWrite: 'batchWriteItem',\n delete: 'deleteItem',\n get: 'getItem',\n put: 'putItem',\n query: 'query',\n scan: 'scan',\n update: 'updateItem',\n transactGet: 'transactGetItems',\n transactWrite: 'transactWriteItems'\n },\n\n /**\n * Returns the attributes of one or more items from one or more tables\n * by delegating to `AWS.DynamoDB.batchGetItem()`.\n *\n * Supply the same parameters as {AWS.DynamoDB.batchGetItem} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.batchGetItem\n * @example Get items from multiple tables\n * var params = {\n * RequestItems: {\n * 'Table-1': {\n * Keys: [\n * {\n * HashKey: 'haskey',\n * NumberRangeKey: 1\n * }\n * ]\n * },\n * 'Table-2': {\n * Keys: [\n * { foo: 'bar' },\n * ]\n * }\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.batchGet(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n batchGet: function(params, callback) {\n var operation = this.serviceClientOperationsMap['batchGet'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Puts or deletes multiple items in one or more tables by delegating\n * to `AWS.DynamoDB.batchWriteItem()`.\n *\n * Supply the same parameters as {AWS.DynamoDB.batchWriteItem} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.batchWriteItem\n * @example Write to and delete from a table\n * var params = {\n * RequestItems: {\n * 'Table-1': [\n * {\n * DeleteRequest: {\n * Key: { HashKey: 'someKey' }\n * }\n * },\n * {\n * PutRequest: {\n * Item: {\n * HashKey: 'anotherKey',\n * NumAttribute: 1,\n * BoolAttribute: true,\n * ListAttribute: [1, 'two', false],\n * MapAttribute: { foo: 'bar' }\n * }\n * }\n * }\n * ]\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.batchWrite(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n batchWrite: function(params, callback) {\n var operation = this.serviceClientOperationsMap['batchWrite'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Deletes a single item in a table by primary key by delegating to\n * `AWS.DynamoDB.deleteItem()`\n *\n * Supply the same parameters as {AWS.DynamoDB.deleteItem} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.deleteItem\n * @example Delete an item from a table\n * var params = {\n * TableName : 'Table',\n * Key: {\n * HashKey: 'hashkey',\n * NumberRangeKey: 1\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.delete(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n delete: function(params, callback) {\n var operation = this.serviceClientOperationsMap['delete'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Returns a set of attributes for the item with the given primary key\n * by delegating to `AWS.DynamoDB.getItem()`.\n *\n * Supply the same parameters as {AWS.DynamoDB.getItem} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.getItem\n * @example Get an item from a table\n * var params = {\n * TableName : 'Table',\n * Key: {\n * HashKey: 'hashkey'\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.get(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n get: function(params, callback) {\n var operation = this.serviceClientOperationsMap['get'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Creates a new item, or replaces an old item with a new item by\n * delegating to `AWS.DynamoDB.putItem()`.\n *\n * Supply the same parameters as {AWS.DynamoDB.putItem} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.putItem\n * @example Create a new item in a table\n * var params = {\n * TableName : 'Table',\n * Item: {\n * HashKey: 'haskey',\n * NumAttribute: 1,\n * BoolAttribute: true,\n * ListAttribute: [1, 'two', false],\n * MapAttribute: { foo: 'bar'},\n * NullAttribute: null\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.put(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n put: function(params, callback) {\n var operation = this.serviceClientOperationsMap['put'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Edits an existing item's attributes, or adds a new item to the table if\n * it does not already exist by delegating to `AWS.DynamoDB.updateItem()`.\n *\n * Supply the same parameters as {AWS.DynamoDB.updateItem} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.updateItem\n * @example Update an item with expressions\n * var params = {\n * TableName: 'Table',\n * Key: { HashKey : 'hashkey' },\n * UpdateExpression: 'set #a = :x + :y',\n * ConditionExpression: '#a < :MAX',\n * ExpressionAttributeNames: {'#a' : 'Sum'},\n * ExpressionAttributeValues: {\n * ':x' : 20,\n * ':y' : 45,\n * ':MAX' : 100,\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.update(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n update: function(params, callback) {\n var operation = this.serviceClientOperationsMap['update'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Returns one or more items and item attributes by accessing every item\n * in a table or a secondary index.\n *\n * Supply the same parameters as {AWS.DynamoDB.scan} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.scan\n * @example Scan the table with a filter expression\n * var params = {\n * TableName : 'Table',\n * FilterExpression : 'Year = :this_year',\n * ExpressionAttributeValues : {':this_year' : 2015}\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.scan(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n scan: function(params, callback) {\n var operation = this.serviceClientOperationsMap['scan'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Directly access items from a table by primary key or a secondary index.\n *\n * Supply the same parameters as {AWS.DynamoDB.query} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.query\n * @example Query an index\n * var params = {\n * TableName: 'Table',\n * IndexName: 'Index',\n * KeyConditionExpression: 'HashKey = :hkey and RangeKey > :rkey',\n * ExpressionAttributeValues: {\n * ':hkey': 'key',\n * ':rkey': 2015\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.query(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n query: function(params, callback) {\n var operation = this.serviceClientOperationsMap['query'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Synchronous write operation that groups up to 10 action requests\n *\n * Supply the same parameters as {AWS.DynamoDB.transactWriteItems} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.transactWriteItems\n * @example Get items from multiple tables\n * var params = {\n * TransactItems: [{\n * Put: {\n * TableName : 'Table0',\n * Item: {\n * HashKey: 'haskey',\n * NumAttribute: 1,\n * BoolAttribute: true,\n * ListAttribute: [1, 'two', false],\n * MapAttribute: { foo: 'bar'},\n * NullAttribute: null\n * }\n * }\n * }, {\n * Update: {\n * TableName: 'Table1',\n * Key: { HashKey : 'hashkey' },\n * UpdateExpression: 'set #a = :x + :y',\n * ConditionExpression: '#a < :MAX',\n * ExpressionAttributeNames: {'#a' : 'Sum'},\n * ExpressionAttributeValues: {\n * ':x' : 20,\n * ':y' : 45,\n * ':MAX' : 100,\n * }\n * }\n * }]\n * };\n *\n * documentClient.transactWrite(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n */\n transactWrite: function(params, callback) {\n var operation = this.serviceClientOperationsMap['transactWrite'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Atomically retrieves multiple items from one or more tables (but not from indexes)\n * in a single account and region.\n *\n * Supply the same parameters as {AWS.DynamoDB.transactGetItems} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.transactGetItems\n * @example Get items from multiple tables\n * var params = {\n * TransactItems: [{\n * Get: {\n * TableName : 'Table0',\n * Key: {\n * HashKey: 'hashkey0'\n * }\n * }\n * }, {\n * Get: {\n * TableName : 'Table1',\n * Key: {\n * HashKey: 'hashkey1'\n * }\n * }\n * }]\n * };\n *\n * documentClient.transactGet(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n */\n transactGet: function(params, callback) {\n var operation = this.serviceClientOperationsMap['transactGet'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Creates a set of elements inferring the type of set from\n * the type of the first element. Amazon DynamoDB currently supports\n * the number sets, string sets, and binary sets. For more information\n * about DynamoDB data types see the documentation on the\n * [Amazon DynamoDB Data Model](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModel.DataTypes).\n *\n * @param list [Array] Collection to represent your DynamoDB Set\n * @param options [map]\n * * **validate** [Boolean] set to true if you want to validate the type\n * of each element in the set. Defaults to `false`.\n * @example Creating a number set\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * var params = {\n * Item: {\n * hashkey: 'hashkey'\n * numbers: documentClient.createSet([1, 2, 3]);\n * }\n * };\n *\n * documentClient.put(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n createSet: function(list, options) {\n options = options || {};\n return new DynamoDBSet(list, options);\n },\n\n /**\n * @api private\n */\n getTranslator: function() {\n return new Translator(this.options);\n },\n\n /**\n * @api private\n */\n setupRequest: function setupRequest(request) {\n var self = this;\n var translator = self.getTranslator();\n var operation = request.operation;\n var inputShape = request.service.api.operations[operation].input;\n request._events.validate.unshift(function(req) {\n req.rawParams = AWS.util.copy(req.params);\n req.params = translator.translateInput(req.rawParams, inputShape);\n });\n },\n\n /**\n * @api private\n */\n setupResponse: function setupResponse(request) {\n var self = this;\n var translator = self.getTranslator();\n var outputShape = self.service.api.operations[request.operation].output;\n request.on('extractData', function(response) {\n response.data = translator.translateOutput(response.data, outputShape);\n });\n\n var response = request.response;\n response.nextPage = function(cb) {\n var resp = this;\n var req = resp.request;\n var config;\n var service = req.service;\n var operation = req.operation;\n try {\n config = service.paginationConfig(operation, true);\n } catch (e) { resp.error = e; }\n\n if (!resp.hasNextPage()) {\n if (cb) cb(resp.error, null);\n else if (resp.error) throw resp.error;\n return null;\n }\n\n var params = AWS.util.copy(req.rawParams);\n if (!resp.nextPageTokens) {\n return cb ? cb(null, null) : null;\n } else {\n var inputTokens = config.inputToken;\n if (typeof inputTokens === 'string') inputTokens = [inputTokens];\n for (var i = 0; i < inputTokens.length; i++) {\n params[inputTokens[i]] = resp.nextPageTokens[i];\n }\n return self[operation](params, cb);\n }\n };\n }\n\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.DynamoDB.DocumentClient;\n","var util = require('../core').util;\n\n/**\n * An object recognizable as a numeric value that stores the underlying number\n * as a string.\n *\n * Intended to be a deserialization target for the DynamoDB Document Client when\n * the `wrapNumbers` flag is set. This allows for numeric values that lose\n * precision when converted to JavaScript's `number` type.\n */\nvar DynamoDBNumberValue = util.inherit({\n constructor: function NumberValue(value) {\n this.wrapperName = 'NumberValue';\n this.value = value.toString();\n },\n\n /**\n * Render the underlying value as a number when converting to JSON.\n */\n toJSON: function () {\n return this.toNumber();\n },\n\n /**\n * Convert the underlying value to a JavaScript number.\n */\n toNumber: function () {\n return Number(this.value);\n },\n\n /**\n * Return a string representing the unaltered value provided to the\n * constructor.\n */\n toString: function () {\n return this.value;\n }\n});\n\n/**\n * @api private\n */\nmodule.exports = DynamoDBNumberValue;\n","var util = require('../core').util;\nvar typeOf = require('./types').typeOf;\n\n/**\n * @api private\n */\nvar memberTypeToSetType = {\n 'String': 'String',\n 'Number': 'Number',\n 'NumberValue': 'Number',\n 'Binary': 'Binary'\n};\n\n/**\n * @api private\n */\nvar DynamoDBSet = util.inherit({\n\n constructor: function Set(list, options) {\n options = options || {};\n this.wrapperName = 'Set';\n this.initialize(list, options.validate);\n },\n\n initialize: function(list, validate) {\n var self = this;\n self.values = [].concat(list);\n self.detectType();\n if (validate) {\n self.validate();\n }\n },\n\n detectType: function() {\n this.type = memberTypeToSetType[typeOf(this.values[0])];\n if (!this.type) {\n throw util.error(new Error(), {\n code: 'InvalidSetType',\n message: 'Sets can contain string, number, or binary values'\n });\n }\n },\n\n validate: function() {\n var self = this;\n var length = self.values.length;\n var values = self.values;\n for (var i = 0; i < length; i++) {\n if (memberTypeToSetType[typeOf(values[i])] !== self.type) {\n throw util.error(new Error(), {\n code: 'InvalidType',\n message: self.type + ' Set contains ' + typeOf(values[i]) + ' value'\n });\n }\n }\n },\n\n /**\n * Render the underlying values only when converting to JSON.\n */\n toJSON: function() {\n var self = this;\n return self.values;\n }\n\n});\n\n/**\n * @api private\n */\nmodule.exports = DynamoDBSet;\n","var util = require('../core').util;\nvar convert = require('./converter');\n\nvar Translator = function(options) {\n options = options || {};\n this.attrValue = options.attrValue;\n this.convertEmptyValues = Boolean(options.convertEmptyValues);\n this.wrapNumbers = Boolean(options.wrapNumbers);\n};\n\nTranslator.prototype.translateInput = function(value, shape) {\n this.mode = 'input';\n return this.translate(value, shape);\n};\n\nTranslator.prototype.translateOutput = function(value, shape) {\n this.mode = 'output';\n return this.translate(value, shape);\n};\n\nTranslator.prototype.translate = function(value, shape) {\n var self = this;\n if (!shape || value === undefined) return undefined;\n\n if (shape.shape === self.attrValue) {\n return convert[self.mode](value, {\n convertEmptyValues: self.convertEmptyValues,\n wrapNumbers: self.wrapNumbers,\n });\n }\n switch (shape.type) {\n case 'structure': return self.translateStructure(value, shape);\n case 'map': return self.translateMap(value, shape);\n case 'list': return self.translateList(value, shape);\n default: return self.translateScalar(value, shape);\n }\n};\n\nTranslator.prototype.translateStructure = function(structure, shape) {\n var self = this;\n if (structure == null) return undefined;\n\n var struct = {};\n util.each(structure, function(name, value) {\n var memberShape = shape.members[name];\n if (memberShape) {\n var result = self.translate(value, memberShape);\n if (result !== undefined) struct[name] = result;\n }\n });\n return struct;\n};\n\nTranslator.prototype.translateList = function(list, shape) {\n var self = this;\n if (list == null) return undefined;\n\n var out = [];\n util.arrayEach(list, function(value) {\n var result = self.translate(value, shape.member);\n if (result === undefined) out.push(null);\n else out.push(result);\n });\n return out;\n};\n\nTranslator.prototype.translateMap = function(map, shape) {\n var self = this;\n if (map == null) return undefined;\n\n var out = {};\n util.each(map, function(key, value) {\n var result = self.translate(value, shape.value);\n if (result === undefined) out[key] = null;\n else out[key] = result;\n });\n return out;\n};\n\nTranslator.prototype.translateScalar = function(value, shape) {\n return shape.toType(value);\n};\n\n/**\n * @api private\n */\nmodule.exports = Translator;\n","var util = require('../core').util;\n\nfunction typeOf(data) {\n if (data === null && typeof data === 'object') {\n return 'null';\n } else if (data !== undefined && isBinary(data)) {\n return 'Binary';\n } else if (data !== undefined && data.constructor) {\n return data.wrapperName || util.typeName(data.constructor);\n } else if (data !== undefined && typeof data === 'object') {\n // this object is the result of Object.create(null), hence the absence of a\n // defined constructor\n return 'Object';\n } else {\n return 'undefined';\n }\n}\n\nfunction isBinary(data) {\n var types = [\n 'Buffer', 'File', 'Blob', 'ArrayBuffer', 'DataView',\n 'Int8Array', 'Uint8Array', 'Uint8ClampedArray',\n 'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array',\n 'Float32Array', 'Float64Array'\n ];\n if (util.isNode()) {\n var Stream = util.stream.Stream;\n if (util.Buffer.isBuffer(data) || data instanceof Stream) {\n return true;\n }\n }\n\n for (var i = 0; i < types.length; i++) {\n if (data !== undefined && data.constructor) {\n if (util.isType(data, types[i])) return true;\n if (util.typeName(data.constructor) === types[i]) return true;\n }\n }\n\n return false;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n typeOf: typeOf,\n isBinary: isBinary\n};\n","var eventMessageChunker = require('../event-stream/event-message-chunker').eventMessageChunker;\nvar parseEvent = require('./parse-event').parseEvent;\n\nfunction createEventStream(body, parser, model) {\n var eventMessages = eventMessageChunker(body);\n\n var events = [];\n\n for (var i = 0; i < eventMessages.length; i++) {\n events.push(parseEvent(parser, eventMessages[i], model));\n }\n\n return events;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n createEventStream: createEventStream\n};\n","var util = require('../core').util;\nvar Transform = require('stream').Transform;\nvar allocBuffer = util.buffer.alloc;\n\n/** @type {Transform} */\nfunction EventMessageChunkerStream(options) {\n Transform.call(this, options);\n\n this.currentMessageTotalLength = 0;\n this.currentMessagePendingLength = 0;\n /** @type {Buffer} */\n this.currentMessage = null;\n\n /** @type {Buffer} */\n this.messageLengthBuffer = null;\n}\n\nEventMessageChunkerStream.prototype = Object.create(Transform.prototype);\n\n/**\n *\n * @param {Buffer} chunk\n * @param {string} encoding\n * @param {*} callback\n */\nEventMessageChunkerStream.prototype._transform = function(chunk, encoding, callback) {\n var chunkLength = chunk.length;\n var currentOffset = 0;\n\n while (currentOffset < chunkLength) {\n // create new message if necessary\n if (!this.currentMessage) {\n // working on a new message, determine total length\n var bytesRemaining = chunkLength - currentOffset;\n // prevent edge case where total length spans 2 chunks\n if (!this.messageLengthBuffer) {\n this.messageLengthBuffer = allocBuffer(4);\n }\n var numBytesForTotal = Math.min(\n 4 - this.currentMessagePendingLength, // remaining bytes to fill the messageLengthBuffer\n bytesRemaining // bytes left in chunk\n );\n\n chunk.copy(\n this.messageLengthBuffer,\n this.currentMessagePendingLength,\n currentOffset,\n currentOffset + numBytesForTotal\n );\n\n this.currentMessagePendingLength += numBytesForTotal;\n currentOffset += numBytesForTotal;\n\n if (this.currentMessagePendingLength < 4) {\n // not enough information to create the current message\n break;\n }\n this.allocateMessage(this.messageLengthBuffer.readUInt32BE(0));\n this.messageLengthBuffer = null;\n }\n\n // write data into current message\n var numBytesToWrite = Math.min(\n this.currentMessageTotalLength - this.currentMessagePendingLength, // number of bytes left to complete message\n chunkLength - currentOffset // number of bytes left in the original chunk\n );\n chunk.copy(\n this.currentMessage, // target buffer\n this.currentMessagePendingLength, // target offset\n currentOffset, // chunk offset\n currentOffset + numBytesToWrite // chunk end to write\n );\n this.currentMessagePendingLength += numBytesToWrite;\n currentOffset += numBytesToWrite;\n\n // check if a message is ready to be pushed\n if (this.currentMessageTotalLength && this.currentMessageTotalLength === this.currentMessagePendingLength) {\n // push out the message\n this.push(this.currentMessage);\n // cleanup\n this.currentMessage = null;\n this.currentMessageTotalLength = 0;\n this.currentMessagePendingLength = 0;\n }\n }\n\n callback();\n};\n\nEventMessageChunkerStream.prototype._flush = function(callback) {\n if (this.currentMessageTotalLength) {\n if (this.currentMessageTotalLength === this.currentMessagePendingLength) {\n callback(null, this.currentMessage);\n } else {\n callback(new Error('Truncated event message received.'));\n }\n } else {\n callback();\n }\n};\n\n/**\n * @param {number} size Size of the message to be allocated.\n * @api private\n */\nEventMessageChunkerStream.prototype.allocateMessage = function(size) {\n if (typeof size !== 'number') {\n throw new Error('Attempted to allocate an event message where size was not a number: ' + size);\n }\n this.currentMessageTotalLength = size;\n this.currentMessagePendingLength = 4;\n this.currentMessage = allocBuffer(size);\n this.currentMessage.writeUInt32BE(size, 0);\n};\n\n/**\n * @api private\n */\nmodule.exports = {\n EventMessageChunkerStream: EventMessageChunkerStream\n};\n","/**\n * Takes in a buffer of event messages and splits them into individual messages.\n * @param {Buffer} buffer\n * @api private\n */\nfunction eventMessageChunker(buffer) {\n /** @type Buffer[] */\n var messages = [];\n var offset = 0;\n\n while (offset < buffer.length) {\n var totalLength = buffer.readInt32BE(offset);\n\n // create new buffer for individual message (shares memory with original)\n var message = buffer.slice(offset, totalLength + offset);\n // increment offset to it starts at the next message\n offset += totalLength;\n\n messages.push(message);\n }\n\n return messages;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n eventMessageChunker: eventMessageChunker\n};\n","var Transform = require('stream').Transform;\nvar parseEvent = require('./parse-event').parseEvent;\n\n/** @type {Transform} */\nfunction EventUnmarshallerStream(options) {\n options = options || {};\n // set output to object mode\n options.readableObjectMode = true;\n Transform.call(this, options);\n this._readableState.objectMode = true;\n\n this.parser = options.parser;\n this.eventStreamModel = options.eventStreamModel;\n}\n\nEventUnmarshallerStream.prototype = Object.create(Transform.prototype);\n\n/**\n *\n * @param {Buffer} chunk\n * @param {string} encoding\n * @param {*} callback\n */\nEventUnmarshallerStream.prototype._transform = function(chunk, encoding, callback) {\n try {\n var event = parseEvent(this.parser, chunk, this.eventStreamModel);\n this.push(event);\n return callback();\n } catch (err) {\n callback(err);\n }\n};\n\n/**\n * @api private\n */\nmodule.exports = {\n EventUnmarshallerStream: EventUnmarshallerStream\n};\n","var util = require('../core').util;\nvar toBuffer = util.buffer.toBuffer;\n\n/**\n * A lossless representation of a signed, 64-bit integer. Instances of this\n * class may be used in arithmetic expressions as if they were numeric\n * primitives, but the binary representation will be preserved unchanged as the\n * `bytes` property of the object. The bytes should be encoded as big-endian,\n * two's complement integers.\n * @param {Buffer} bytes\n *\n * @api private\n */\nfunction Int64(bytes) {\n if (bytes.length !== 8) {\n throw new Error('Int64 buffers must be exactly 8 bytes');\n }\n if (!util.Buffer.isBuffer(bytes)) bytes = toBuffer(bytes);\n\n this.bytes = bytes;\n}\n\n/**\n * @param {number} number\n * @returns {Int64}\n *\n * @api private\n */\nInt64.fromNumber = function(number) {\n if (number > 9223372036854775807 || number < -9223372036854775808) {\n throw new Error(\n number + ' is too large (or, if negative, too small) to represent as an Int64'\n );\n }\n\n var bytes = new Uint8Array(8);\n for (\n var i = 7, remaining = Math.abs(Math.round(number));\n i > -1 && remaining > 0;\n i--, remaining /= 256\n ) {\n bytes[i] = remaining;\n }\n\n if (number < 0) {\n negate(bytes);\n }\n\n return new Int64(bytes);\n};\n\n/**\n * @returns {number}\n *\n * @api private\n */\nInt64.prototype.valueOf = function() {\n var bytes = this.bytes.slice(0);\n var negative = bytes[0] & 128;\n if (negative) {\n negate(bytes);\n }\n\n return parseInt(bytes.toString('hex'), 16) * (negative ? -1 : 1);\n};\n\nInt64.prototype.toString = function() {\n return String(this.valueOf());\n};\n\n/**\n * @param {Buffer} bytes\n *\n * @api private\n */\nfunction negate(bytes) {\n for (var i = 0; i < 8; i++) {\n bytes[i] ^= 0xFF;\n }\n for (var i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0) {\n break;\n }\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n Int64: Int64\n};\n","var parseMessage = require('./parse-message').parseMessage;\n\n/**\n *\n * @param {*} parser\n * @param {Buffer} message\n * @param {*} shape\n * @api private\n */\nfunction parseEvent(parser, message, shape) {\n var parsedMessage = parseMessage(message);\n\n // check if message is an event or error\n var messageType = parsedMessage.headers[':message-type'];\n if (messageType) {\n if (messageType.value === 'error') {\n throw parseError(parsedMessage);\n } else if (messageType.value !== 'event') {\n // not sure how to parse non-events/non-errors, ignore for now\n return;\n }\n }\n\n // determine event type\n var eventType = parsedMessage.headers[':event-type'];\n // check that the event type is modeled\n var eventModel = shape.members[eventType.value];\n if (!eventModel) {\n return;\n }\n\n var result = {};\n // check if an event payload exists\n var eventPayloadMemberName = eventModel.eventPayloadMemberName;\n if (eventPayloadMemberName) {\n var payloadShape = eventModel.members[eventPayloadMemberName];\n // if the shape is binary, return the byte array\n if (payloadShape.type === 'binary') {\n result[eventPayloadMemberName] = parsedMessage.body;\n } else {\n result[eventPayloadMemberName] = parser.parse(parsedMessage.body.toString(), payloadShape);\n }\n }\n\n // read event headers\n var eventHeaderNames = eventModel.eventHeaderMemberNames;\n for (var i = 0; i < eventHeaderNames.length; i++) {\n var name = eventHeaderNames[i];\n if (parsedMessage.headers[name]) {\n // parse the header!\n result[name] = eventModel.members[name].toType(parsedMessage.headers[name].value);\n }\n }\n\n var output = {};\n output[eventType.value] = result;\n return output;\n}\n\nfunction parseError(message) {\n var errorCode = message.headers[':error-code'];\n var errorMessage = message.headers[':error-message'];\n var error = new Error(errorMessage.value || errorMessage);\n error.code = error.name = errorCode.value || errorCode;\n return error;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n parseEvent: parseEvent\n};\n","var Int64 = require('./int64').Int64;\n\nvar splitMessage = require('./split-message').splitMessage;\n\nvar BOOLEAN_TAG = 'boolean';\nvar BYTE_TAG = 'byte';\nvar SHORT_TAG = 'short';\nvar INT_TAG = 'integer';\nvar LONG_TAG = 'long';\nvar BINARY_TAG = 'binary';\nvar STRING_TAG = 'string';\nvar TIMESTAMP_TAG = 'timestamp';\nvar UUID_TAG = 'uuid';\n\n/**\n * @api private\n *\n * @param {Buffer} headers\n */\nfunction parseHeaders(headers) {\n var out = {};\n var position = 0;\n while (position < headers.length) {\n var nameLength = headers.readUInt8(position++);\n var name = headers.slice(position, position + nameLength).toString();\n position += nameLength;\n switch (headers.readUInt8(position++)) {\n case 0 /* boolTrue */:\n out[name] = {\n type: BOOLEAN_TAG,\n value: true\n };\n break;\n case 1 /* boolFalse */:\n out[name] = {\n type: BOOLEAN_TAG,\n value: false\n };\n break;\n case 2 /* byte */:\n out[name] = {\n type: BYTE_TAG,\n value: headers.readInt8(position++)\n };\n break;\n case 3 /* short */:\n out[name] = {\n type: SHORT_TAG,\n value: headers.readInt16BE(position)\n };\n position += 2;\n break;\n case 4 /* integer */:\n out[name] = {\n type: INT_TAG,\n value: headers.readInt32BE(position)\n };\n position += 4;\n break;\n case 5 /* long */:\n out[name] = {\n type: LONG_TAG,\n value: new Int64(headers.slice(position, position + 8))\n };\n position += 8;\n break;\n case 6 /* byteArray */:\n var binaryLength = headers.readUInt16BE(position);\n position += 2;\n out[name] = {\n type: BINARY_TAG,\n value: headers.slice(position, position + binaryLength)\n };\n position += binaryLength;\n break;\n case 7 /* string */:\n var stringLength = headers.readUInt16BE(position);\n position += 2;\n out[name] = {\n type: STRING_TAG,\n value: headers.slice(\n position,\n position + stringLength\n ).toString()\n };\n position += stringLength;\n break;\n case 8 /* timestamp */:\n out[name] = {\n type: TIMESTAMP_TAG,\n value: new Date(\n new Int64(headers.slice(position, position + 8))\n .valueOf()\n )\n };\n position += 8;\n break;\n case 9 /* uuid */:\n var uuidChars = headers.slice(position, position + 16)\n .toString('hex');\n position += 16;\n out[name] = {\n type: UUID_TAG,\n value: uuidChars.substr(0, 8) + '-' +\n uuidChars.substr(8, 4) + '-' +\n uuidChars.substr(12, 4) + '-' +\n uuidChars.substr(16, 4) + '-' +\n uuidChars.substr(20)\n };\n break;\n default:\n throw new Error('Unrecognized header type tag');\n }\n }\n return out;\n}\n\nfunction parseMessage(message) {\n var parsed = splitMessage(message);\n return { headers: parseHeaders(parsed.headers), body: parsed.body };\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n parseMessage: parseMessage\n};\n","var util = require('../core').util;\nvar toBuffer = util.buffer.toBuffer;\n\n// All prelude components are unsigned, 32-bit integers\nvar PRELUDE_MEMBER_LENGTH = 4;\n// The prelude consists of two components\nvar PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;\n// Checksums are always CRC32 hashes.\nvar CHECKSUM_LENGTH = 4;\n// Messages must include a full prelude, a prelude checksum, and a message checksum\nvar MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;\n\n/**\n * @api private\n *\n * @param {Buffer} message\n */\nfunction splitMessage(message) {\n if (!util.Buffer.isBuffer(message)) message = toBuffer(message);\n\n if (message.length < MINIMUM_MESSAGE_LENGTH) {\n throw new Error('Provided message too short to accommodate event stream message overhead');\n }\n\n if (message.length !== message.readUInt32BE(0)) {\n throw new Error('Reported message length does not match received message length');\n }\n\n var expectedPreludeChecksum = message.readUInt32BE(PRELUDE_LENGTH);\n\n if (\n expectedPreludeChecksum !== util.crypto.crc32(\n message.slice(0, PRELUDE_LENGTH)\n )\n ) {\n throw new Error(\n 'The prelude checksum specified in the message (' +\n expectedPreludeChecksum +\n ') does not match the calculated CRC32 checksum.'\n );\n }\n\n var expectedMessageChecksum = message.readUInt32BE(message.length - CHECKSUM_LENGTH);\n\n if (\n expectedMessageChecksum !== util.crypto.crc32(\n message.slice(0, message.length - CHECKSUM_LENGTH)\n )\n ) {\n throw new Error(\n 'The message checksum did not match the expected value of ' +\n expectedMessageChecksum\n );\n }\n\n var headersStart = PRELUDE_LENGTH + CHECKSUM_LENGTH;\n var headersEnd = headersStart + message.readUInt32BE(PRELUDE_MEMBER_LENGTH);\n\n return {\n headers: message.slice(headersStart, headersEnd),\n body: message.slice(headersEnd, message.length - CHECKSUM_LENGTH),\n };\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n splitMessage: splitMessage\n};\n","/**\n * What is necessary to create an event stream in node?\n * - http response stream\n * - parser\n * - event stream model\n */\n\nvar EventMessageChunkerStream = require('../event-stream/event-message-chunker-stream').EventMessageChunkerStream;\nvar EventUnmarshallerStream = require('../event-stream/event-message-unmarshaller-stream').EventUnmarshallerStream;\n\nfunction createEventStream(stream, parser, model) {\n var eventStream = new EventUnmarshallerStream({\n parser: parser,\n eventStreamModel: model\n });\n\n var eventMessageChunker = new EventMessageChunkerStream();\n\n stream.pipe(\n eventMessageChunker\n ).pipe(eventStream);\n\n stream.on('error', function(err) {\n eventMessageChunker.emit('error', err);\n });\n\n eventMessageChunker.on('error', function(err) {\n eventStream.emit('error', err);\n });\n\n return eventStream;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n createEventStream: createEventStream\n};\n","var AWS = require('./core');\nvar SequentialExecutor = require('./sequential_executor');\nvar DISCOVER_ENDPOINT = require('./discover_endpoint').discoverEndpoint;\n/**\n * The namespace used to register global event listeners for request building\n * and sending.\n */\nAWS.EventListeners = {\n /**\n * @!attribute VALIDATE_CREDENTIALS\n * A request listener that validates whether the request is being\n * sent with credentials.\n * Handles the {AWS.Request~validate 'validate' Request event}\n * @example Sending a request without validating credentials\n * var listener = AWS.EventListeners.Core.VALIDATE_CREDENTIALS;\n * request.removeListener('validate', listener);\n * @readonly\n * @return [Function]\n * @!attribute VALIDATE_REGION\n * A request listener that validates whether the region is set\n * for a request.\n * Handles the {AWS.Request~validate 'validate' Request event}\n * @example Sending a request without validating region configuration\n * var listener = AWS.EventListeners.Core.VALIDATE_REGION;\n * request.removeListener('validate', listener);\n * @readonly\n * @return [Function]\n * @!attribute VALIDATE_PARAMETERS\n * A request listener that validates input parameters in a request.\n * Handles the {AWS.Request~validate 'validate' Request event}\n * @example Sending a request without validating parameters\n * var listener = AWS.EventListeners.Core.VALIDATE_PARAMETERS;\n * request.removeListener('validate', listener);\n * @example Disable parameter validation globally\n * AWS.EventListeners.Core.removeListener('validate',\n * AWS.EventListeners.Core.VALIDATE_REGION);\n * @readonly\n * @return [Function]\n * @!attribute SEND\n * A request listener that initiates the HTTP connection for a\n * request being sent. Handles the {AWS.Request~send 'send' Request event}\n * @example Replacing the HTTP handler\n * var listener = AWS.EventListeners.Core.SEND;\n * request.removeListener('send', listener);\n * request.on('send', function(response) {\n * customHandler.send(response);\n * });\n * @return [Function]\n * @readonly\n * @!attribute HTTP_DATA\n * A request listener that reads data from the HTTP connection in order\n * to build the response data.\n * Handles the {AWS.Request~httpData 'httpData' Request event}.\n * Remove this handler if you are overriding the 'httpData' event and\n * do not want extra data processing and buffering overhead.\n * @example Disabling default data processing\n * var listener = AWS.EventListeners.Core.HTTP_DATA;\n * request.removeListener('httpData', listener);\n * @return [Function]\n * @readonly\n */\n Core: {} /* doc hack */\n};\n\n/**\n * @api private\n */\nfunction getOperationAuthtype(req) {\n if (!req.service.api.operations) {\n return '';\n }\n var operation = req.service.api.operations[req.operation];\n return operation ? operation.authtype : '';\n}\n\nAWS.EventListeners = {\n Core: new SequentialExecutor().addNamedListeners(function(add, addAsync) {\n addAsync('VALIDATE_CREDENTIALS', 'validate',\n function VALIDATE_CREDENTIALS(req, done) {\n if (!req.service.api.signatureVersion && !req.service.config.signatureVersion) return done(); // none\n req.service.config.getCredentials(function(err) {\n if (err) {\n req.response.error = AWS.util.error(err,\n {code: 'CredentialsError', message: 'Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1'});\n }\n done();\n });\n });\n\n add('VALIDATE_REGION', 'validate', function VALIDATE_REGION(req) {\n if (!req.service.isGlobalEndpoint) {\n var dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);\n if (!req.service.config.region) {\n req.response.error = AWS.util.error(new Error(),\n {code: 'ConfigError', message: 'Missing region in config'});\n } else if (!dnsHostRegex.test(req.service.config.region)) {\n req.response.error = AWS.util.error(new Error(),\n {code: 'ConfigError', message: 'Invalid region in config'});\n }\n }\n });\n\n add('BUILD_IDEMPOTENCY_TOKENS', 'validate', function BUILD_IDEMPOTENCY_TOKENS(req) {\n if (!req.service.api.operations) {\n return;\n }\n var operation = req.service.api.operations[req.operation];\n if (!operation) {\n return;\n }\n var idempotentMembers = operation.idempotentMembers;\n if (!idempotentMembers.length) {\n return;\n }\n // creates a copy of params so user's param object isn't mutated\n var params = AWS.util.copy(req.params);\n for (var i = 0, iLen = idempotentMembers.length; i < iLen; i++) {\n if (!params[idempotentMembers[i]]) {\n // add the member\n params[idempotentMembers[i]] = AWS.util.uuid.v4();\n }\n }\n req.params = params;\n });\n\n add('VALIDATE_PARAMETERS', 'validate', function VALIDATE_PARAMETERS(req) {\n if (!req.service.api.operations) {\n return;\n }\n var rules = req.service.api.operations[req.operation].input;\n var validation = req.service.config.paramValidation;\n new AWS.ParamValidator(validation).validate(rules, req.params);\n });\n\n addAsync('COMPUTE_SHA256', 'afterBuild', function COMPUTE_SHA256(req, done) {\n req.haltHandlersOnError();\n if (!req.service.api.operations) {\n return;\n }\n var operation = req.service.api.operations[req.operation];\n var authtype = operation ? operation.authtype : '';\n if (!req.service.api.signatureVersion && !authtype && !req.service.config.signatureVersion) return done(); // none\n if (req.service.getSignerClass(req) === AWS.Signers.V4) {\n var body = req.httpRequest.body || '';\n if (authtype.indexOf('unsigned-body') >= 0) {\n req.httpRequest.headers['X-Amz-Content-Sha256'] = 'UNSIGNED-PAYLOAD';\n return done();\n }\n AWS.util.computeSha256(body, function(err, sha) {\n if (err) {\n done(err);\n }\n else {\n req.httpRequest.headers['X-Amz-Content-Sha256'] = sha;\n done();\n }\n });\n } else {\n done();\n }\n });\n\n add('SET_CONTENT_LENGTH', 'afterBuild', function SET_CONTENT_LENGTH(req) {\n var authtype = getOperationAuthtype(req);\n var payloadMember = AWS.util.getRequestPayloadShape(req);\n if (req.httpRequest.headers['Content-Length'] === undefined) {\n try {\n var length = AWS.util.string.byteLength(req.httpRequest.body);\n req.httpRequest.headers['Content-Length'] = length;\n } catch (err) {\n if (payloadMember && payloadMember.isStreaming) {\n if (payloadMember.requiresLength) {\n //streaming payload requires length(s3, glacier)\n throw err;\n } else if (authtype.indexOf('unsigned-body') >= 0) {\n //unbounded streaming payload(lex, mediastore)\n req.httpRequest.headers['Transfer-Encoding'] = 'chunked';\n return;\n } else {\n throw err;\n }\n }\n throw err;\n }\n }\n });\n\n add('SET_HTTP_HOST', 'afterBuild', function SET_HTTP_HOST(req) {\n req.httpRequest.headers['Host'] = req.httpRequest.endpoint.host;\n });\n\n add('RESTART', 'restart', function RESTART() {\n var err = this.response.error;\n if (!err || !err.retryable) return;\n\n this.httpRequest = new AWS.HttpRequest(\n this.service.endpoint,\n this.service.region\n );\n\n if (this.response.retryCount < this.service.config.maxRetries) {\n this.response.retryCount++;\n } else {\n this.response.error = null;\n }\n });\n\n var addToHead = true;\n addAsync('DISCOVER_ENDPOINT', 'sign', DISCOVER_ENDPOINT, addToHead);\n\n addAsync('SIGN', 'sign', function SIGN(req, done) {\n var service = req.service;\n var operations = req.service.api.operations || {};\n var operation = operations[req.operation];\n var authtype = operation ? operation.authtype : '';\n if (!service.api.signatureVersion && !authtype && !service.config.signatureVersion) return done(); // none\n\n service.config.getCredentials(function (err, credentials) {\n if (err) {\n req.response.error = err;\n return done();\n }\n\n try {\n var date = service.getSkewCorrectedDate();\n var SignerClass = service.getSignerClass(req);\n var signer = new SignerClass(req.httpRequest,\n service.getSigningName(req),\n {\n signatureCache: service.config.signatureCache,\n operation: operation,\n signatureVersion: service.api.signatureVersion\n });\n signer.setServiceClientId(service._clientId);\n\n // clear old authorization headers\n delete req.httpRequest.headers['Authorization'];\n delete req.httpRequest.headers['Date'];\n delete req.httpRequest.headers['X-Amz-Date'];\n\n // add new authorization\n signer.addAuthorization(credentials, date);\n req.signedAt = date;\n } catch (e) {\n req.response.error = e;\n }\n done();\n });\n });\n\n add('VALIDATE_RESPONSE', 'validateResponse', function VALIDATE_RESPONSE(resp) {\n if (this.service.successfulResponse(resp, this)) {\n resp.data = {};\n resp.error = null;\n } else {\n resp.data = null;\n resp.error = AWS.util.error(new Error(),\n {code: 'UnknownError', message: 'An unknown error occurred.'});\n }\n });\n\n addAsync('SEND', 'send', function SEND(resp, done) {\n resp.httpResponse._abortCallback = done;\n resp.error = null;\n resp.data = null;\n\n function callback(httpResp) {\n resp.httpResponse.stream = httpResp;\n var stream = resp.request.httpRequest.stream;\n var service = resp.request.service;\n var api = service.api;\n var operationName = resp.request.operation;\n var operation = api.operations[operationName] || {};\n\n httpResp.on('headers', function onHeaders(statusCode, headers, statusMessage) {\n resp.request.emit(\n 'httpHeaders',\n [statusCode, headers, resp, statusMessage]\n );\n\n if (!resp.httpResponse.streaming) {\n if (AWS.HttpClient.streamsApiVersion === 2) { // streams2 API check\n // if we detect event streams, we're going to have to\n // return the stream immediately\n if (operation.hasEventOutput && service.successfulResponse(resp)) {\n // skip reading the IncomingStream\n resp.request.emit('httpDone');\n done();\n return;\n }\n\n httpResp.on('readable', function onReadable() {\n var data = httpResp.read();\n if (data !== null) {\n resp.request.emit('httpData', [data, resp]);\n }\n });\n } else { // legacy streams API\n httpResp.on('data', function onData(data) {\n resp.request.emit('httpData', [data, resp]);\n });\n }\n }\n });\n\n httpResp.on('end', function onEnd() {\n if (!stream || !stream.didCallback) {\n if (AWS.HttpClient.streamsApiVersion === 2 && (operation.hasEventOutput && service.successfulResponse(resp))) {\n // don't concatenate response chunks when streaming event stream data when response is successful\n return;\n }\n resp.request.emit('httpDone');\n done();\n }\n });\n }\n\n function progress(httpResp) {\n httpResp.on('sendProgress', function onSendProgress(value) {\n resp.request.emit('httpUploadProgress', [value, resp]);\n });\n\n httpResp.on('receiveProgress', function onReceiveProgress(value) {\n resp.request.emit('httpDownloadProgress', [value, resp]);\n });\n }\n\n function error(err) {\n if (err.code !== 'RequestAbortedError') {\n var errCode = err.code === 'TimeoutError' ? err.code : 'NetworkingError';\n err = AWS.util.error(err, {\n code: errCode,\n region: resp.request.httpRequest.region,\n hostname: resp.request.httpRequest.endpoint.hostname,\n retryable: true\n });\n }\n resp.error = err;\n resp.request.emit('httpError', [resp.error, resp], function() {\n done();\n });\n }\n\n function executeSend() {\n var http = AWS.HttpClient.getInstance();\n var httpOptions = resp.request.service.config.httpOptions || {};\n try {\n var stream = http.handleRequest(resp.request.httpRequest, httpOptions,\n callback, error);\n progress(stream);\n } catch (err) {\n error(err);\n }\n }\n var timeDiff = (resp.request.service.getSkewCorrectedDate() - this.signedAt) / 1000;\n if (timeDiff >= 60 * 10) { // if we signed 10min ago, re-sign\n this.emit('sign', [this], function(err) {\n if (err) done(err);\n else executeSend();\n });\n } else {\n executeSend();\n }\n });\n\n add('HTTP_HEADERS', 'httpHeaders',\n function HTTP_HEADERS(statusCode, headers, resp, statusMessage) {\n resp.httpResponse.statusCode = statusCode;\n resp.httpResponse.statusMessage = statusMessage;\n resp.httpResponse.headers = headers;\n resp.httpResponse.body = AWS.util.buffer.toBuffer('');\n resp.httpResponse.buffers = [];\n resp.httpResponse.numBytes = 0;\n var dateHeader = headers.date || headers.Date;\n var service = resp.request.service;\n if (dateHeader) {\n var serverTime = Date.parse(dateHeader);\n if (service.config.correctClockSkew\n && service.isClockSkewed(serverTime)) {\n service.applyClockOffset(serverTime);\n }\n }\n });\n\n add('HTTP_DATA', 'httpData', function HTTP_DATA(chunk, resp) {\n if (chunk) {\n if (AWS.util.isNode()) {\n resp.httpResponse.numBytes += chunk.length;\n\n var total = resp.httpResponse.headers['content-length'];\n var progress = { loaded: resp.httpResponse.numBytes, total: total };\n resp.request.emit('httpDownloadProgress', [progress, resp]);\n }\n\n resp.httpResponse.buffers.push(AWS.util.buffer.toBuffer(chunk));\n }\n });\n\n add('HTTP_DONE', 'httpDone', function HTTP_DONE(resp) {\n // convert buffers array into single buffer\n if (resp.httpResponse.buffers && resp.httpResponse.buffers.length > 0) {\n var body = AWS.util.buffer.concat(resp.httpResponse.buffers);\n resp.httpResponse.body = body;\n }\n delete resp.httpResponse.numBytes;\n delete resp.httpResponse.buffers;\n });\n\n add('FINALIZE_ERROR', 'retry', function FINALIZE_ERROR(resp) {\n if (resp.httpResponse.statusCode) {\n resp.error.statusCode = resp.httpResponse.statusCode;\n if (resp.error.retryable === undefined) {\n resp.error.retryable = this.service.retryableError(resp.error, this);\n }\n }\n });\n\n add('INVALIDATE_CREDENTIALS', 'retry', function INVALIDATE_CREDENTIALS(resp) {\n if (!resp.error) return;\n switch (resp.error.code) {\n case 'RequestExpired': // EC2 only\n case 'ExpiredTokenException':\n case 'ExpiredToken':\n resp.error.retryable = true;\n resp.request.service.config.credentials.expired = true;\n }\n });\n\n add('EXPIRED_SIGNATURE', 'retry', function EXPIRED_SIGNATURE(resp) {\n var err = resp.error;\n if (!err) return;\n if (typeof err.code === 'string' && typeof err.message === 'string') {\n if (err.code.match(/Signature/) && err.message.match(/expired/)) {\n resp.error.retryable = true;\n }\n }\n });\n\n add('CLOCK_SKEWED', 'retry', function CLOCK_SKEWED(resp) {\n if (!resp.error) return;\n if (this.service.clockSkewError(resp.error)\n && this.service.config.correctClockSkew) {\n resp.error.retryable = true;\n }\n });\n\n add('REDIRECT', 'retry', function REDIRECT(resp) {\n if (resp.error && resp.error.statusCode >= 300 &&\n resp.error.statusCode < 400 && resp.httpResponse.headers['location']) {\n this.httpRequest.endpoint =\n new AWS.Endpoint(resp.httpResponse.headers['location']);\n this.httpRequest.headers['Host'] = this.httpRequest.endpoint.host;\n resp.error.redirect = true;\n resp.error.retryable = true;\n }\n });\n\n add('RETRY_CHECK', 'retry', function RETRY_CHECK(resp) {\n if (resp.error) {\n if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) {\n resp.error.retryDelay = 0;\n } else if (resp.retryCount < resp.maxRetries) {\n resp.error.retryDelay = this.service.retryDelays(resp.retryCount, resp.error) || 0;\n }\n }\n });\n\n addAsync('RESET_RETRY_STATE', 'afterRetry', function RESET_RETRY_STATE(resp, done) {\n var delay, willRetry = false;\n\n if (resp.error) {\n delay = resp.error.retryDelay || 0;\n if (resp.error.retryable && resp.retryCount < resp.maxRetries) {\n resp.retryCount++;\n willRetry = true;\n } else if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) {\n resp.redirectCount++;\n willRetry = true;\n }\n }\n\n // delay < 0 is a signal from customBackoff to skip retries\n if (willRetry && delay >= 0) {\n resp.error = null;\n setTimeout(done, delay);\n } else {\n done();\n }\n });\n }),\n\n CorePost: new SequentialExecutor().addNamedListeners(function(add) {\n add('EXTRACT_REQUEST_ID', 'extractData', AWS.util.extractRequestId);\n add('EXTRACT_REQUEST_ID', 'extractError', AWS.util.extractRequestId);\n\n add('ENOTFOUND_ERROR', 'httpError', function ENOTFOUND_ERROR(err) {\n function isDNSError(err) {\n return err.errno === 'ENOTFOUND' ||\n typeof err.errno === 'number' &&\n typeof AWS.util.getSystemErrorName === 'function' &&\n ['EAI_NONAME', 'EAI_NODATA'].indexOf(AWS.util.getSystemErrorName(err.errno) >= 0);\n }\n if (err.code === 'NetworkingError' && isDNSError(err)) {\n var message = 'Inaccessible host: `' + err.hostname +\n '\\'. This service may not be available in the `' + err.region +\n '\\' region.';\n this.response.error = AWS.util.error(new Error(message), {\n code: 'UnknownEndpoint',\n region: err.region,\n hostname: err.hostname,\n retryable: true,\n originalError: err\n });\n }\n });\n }),\n\n Logger: new SequentialExecutor().addNamedListeners(function(add) {\n add('LOG_REQUEST', 'complete', function LOG_REQUEST(resp) {\n var req = resp.request;\n var logger = req.service.config.logger;\n if (!logger) return;\n function filterSensitiveLog(inputShape, shape) {\n if (!shape) {\n return shape;\n }\n if (inputShape.isSensitive) {\n return '***SensitiveInformation***';\n }\n switch (inputShape.type) {\n case 'structure':\n var struct = {};\n AWS.util.each(shape, function(subShapeName, subShape) {\n if (Object.prototype.hasOwnProperty.call(inputShape.members, subShapeName)) {\n struct[subShapeName] = filterSensitiveLog(inputShape.members[subShapeName], subShape);\n } else {\n struct[subShapeName] = subShape;\n }\n });\n return struct;\n case 'list':\n var list = [];\n AWS.util.arrayEach(shape, function(subShape, index) {\n list.push(filterSensitiveLog(inputShape.member, subShape));\n });\n return list;\n case 'map':\n var map = {};\n AWS.util.each(shape, function(key, value) {\n map[key] = filterSensitiveLog(inputShape.value, value);\n });\n return map;\n default:\n return shape;\n }\n }\n\n function buildMessage() {\n var time = resp.request.service.getSkewCorrectedDate().getTime();\n var delta = (time - req.startTime.getTime()) / 1000;\n var ansi = logger.isTTY ? true : false;\n var status = resp.httpResponse.statusCode;\n var censoredParams = req.params;\n if (\n req.service.api.operations &&\n req.service.api.operations[req.operation] &&\n req.service.api.operations[req.operation].input\n ) {\n var inputShape = req.service.api.operations[req.operation].input;\n censoredParams = filterSensitiveLog(inputShape, req.params);\n }\n var params = require('util').inspect(censoredParams, true, null);\n var message = '';\n if (ansi) message += '\\x1B[33m';\n message += '[AWS ' + req.service.serviceIdentifier + ' ' + status;\n message += ' ' + delta.toString() + 's ' + resp.retryCount + ' retries]';\n if (ansi) message += '\\x1B[0;1m';\n message += ' ' + AWS.util.string.lowerFirst(req.operation);\n message += '(' + params + ')';\n if (ansi) message += '\\x1B[0m';\n return message;\n }\n\n var line = buildMessage();\n if (typeof logger.log === 'function') {\n logger.log(line);\n } else if (typeof logger.write === 'function') {\n logger.write(line + '\\n');\n }\n });\n }),\n\n Json: new SequentialExecutor().addNamedListeners(function(add) {\n var svc = require('./protocol/json');\n add('BUILD', 'build', svc.buildRequest);\n add('EXTRACT_DATA', 'extractData', svc.extractData);\n add('EXTRACT_ERROR', 'extractError', svc.extractError);\n }),\n\n Rest: new SequentialExecutor().addNamedListeners(function(add) {\n var svc = require('./protocol/rest');\n add('BUILD', 'build', svc.buildRequest);\n add('EXTRACT_DATA', 'extractData', svc.extractData);\n add('EXTRACT_ERROR', 'extractError', svc.extractError);\n }),\n\n RestJson: new SequentialExecutor().addNamedListeners(function(add) {\n var svc = require('./protocol/rest_json');\n add('BUILD', 'build', svc.buildRequest);\n add('EXTRACT_DATA', 'extractData', svc.extractData);\n add('EXTRACT_ERROR', 'extractError', svc.extractError);\n }),\n\n RestXml: new SequentialExecutor().addNamedListeners(function(add) {\n var svc = require('./protocol/rest_xml');\n add('BUILD', 'build', svc.buildRequest);\n add('EXTRACT_DATA', 'extractData', svc.extractData);\n add('EXTRACT_ERROR', 'extractError', svc.extractError);\n }),\n\n Query: new SequentialExecutor().addNamedListeners(function(add) {\n var svc = require('./protocol/query');\n add('BUILD', 'build', svc.buildRequest);\n add('EXTRACT_DATA', 'extractData', svc.extractData);\n add('EXTRACT_ERROR', 'extractError', svc.extractError);\n })\n};\n","var AWS = require('./core');\nvar inherit = AWS.util.inherit;\n\n/**\n * The endpoint that a service will talk to, for example,\n * `'https://ec2.ap-southeast-1.amazonaws.com'`. If\n * you need to override an endpoint for a service, you can\n * set the endpoint on a service by passing the endpoint\n * object with the `endpoint` option key:\n *\n * ```javascript\n * var ep = new AWS.Endpoint('awsproxy.example.com');\n * var s3 = new AWS.S3({endpoint: ep});\n * s3.service.endpoint.hostname == 'awsproxy.example.com'\n * ```\n *\n * Note that if you do not specify a protocol, the protocol will\n * be selected based on your current {AWS.config} configuration.\n *\n * @!attribute protocol\n * @return [String] the protocol (http or https) of the endpoint\n * URL\n * @!attribute hostname\n * @return [String] the host portion of the endpoint, e.g.,\n * example.com\n * @!attribute host\n * @return [String] the host portion of the endpoint including\n * the port, e.g., example.com:80\n * @!attribute port\n * @return [Integer] the port of the endpoint\n * @!attribute href\n * @return [String] the full URL of the endpoint\n */\nAWS.Endpoint = inherit({\n\n /**\n * @overload Endpoint(endpoint)\n * Constructs a new endpoint given an endpoint URL. If the\n * URL omits a protocol (http or https), the default protocol\n * set in the global {AWS.config} will be used.\n * @param endpoint [String] the URL to construct an endpoint from\n */\n constructor: function Endpoint(endpoint, config) {\n AWS.util.hideProperties(this, ['slashes', 'auth', 'hash', 'search', 'query']);\n\n if (typeof endpoint === 'undefined' || endpoint === null) {\n throw new Error('Invalid endpoint: ' + endpoint);\n } else if (typeof endpoint !== 'string') {\n return AWS.util.copy(endpoint);\n }\n\n if (!endpoint.match(/^http/)) {\n var useSSL = config && config.sslEnabled !== undefined ?\n config.sslEnabled : AWS.config.sslEnabled;\n endpoint = (useSSL ? 'https' : 'http') + '://' + endpoint;\n }\n\n AWS.util.update(this, AWS.util.urlParse(endpoint));\n\n // Ensure the port property is set as an integer\n if (this.port) {\n this.port = parseInt(this.port, 10);\n } else {\n this.port = this.protocol === 'https:' ? 443 : 80;\n }\n }\n\n});\n\n/**\n * The low level HTTP request object, encapsulating all HTTP header\n * and body data sent by a service request.\n *\n * @!attribute method\n * @return [String] the HTTP method of the request\n * @!attribute path\n * @return [String] the path portion of the URI, e.g.,\n * \"/list/?start=5&num=10\"\n * @!attribute headers\n * @return [map]\n * a map of header keys and their respective values\n * @!attribute body\n * @return [String] the request body payload\n * @!attribute endpoint\n * @return [AWS.Endpoint] the endpoint for the request\n * @!attribute region\n * @api private\n * @return [String] the region, for signing purposes only.\n */\nAWS.HttpRequest = inherit({\n\n /**\n * @api private\n */\n constructor: function HttpRequest(endpoint, region) {\n endpoint = new AWS.Endpoint(endpoint);\n this.method = 'POST';\n this.path = endpoint.path || '/';\n this.headers = {};\n this.body = '';\n this.endpoint = endpoint;\n this.region = region;\n this._userAgent = '';\n this.setUserAgent();\n },\n\n /**\n * @api private\n */\n setUserAgent: function setUserAgent() {\n this._userAgent = this.headers[this.getUserAgentHeaderName()] = AWS.util.userAgent();\n },\n\n getUserAgentHeaderName: function getUserAgentHeaderName() {\n var prefix = AWS.util.isBrowser() ? 'X-Amz-' : '';\n return prefix + 'User-Agent';\n },\n\n /**\n * @api private\n */\n appendToUserAgent: function appendToUserAgent(agentPartial) {\n if (typeof agentPartial === 'string' && agentPartial) {\n this._userAgent += ' ' + agentPartial;\n }\n this.headers[this.getUserAgentHeaderName()] = this._userAgent;\n },\n\n /**\n * @api private\n */\n getUserAgent: function getUserAgent() {\n return this._userAgent;\n },\n\n /**\n * @return [String] the part of the {path} excluding the\n * query string\n */\n pathname: function pathname() {\n return this.path.split('?', 1)[0];\n },\n\n /**\n * @return [String] the query string portion of the {path}\n */\n search: function search() {\n var query = this.path.split('?', 2)[1];\n if (query) {\n query = AWS.util.queryStringParse(query);\n return AWS.util.queryParamsToString(query);\n }\n return '';\n },\n\n /**\n * @api private\n * update httpRequest endpoint with endpoint string\n */\n updateEndpoint: function updateEndpoint(endpointStr) {\n var newEndpoint = new AWS.Endpoint(endpointStr);\n this.endpoint = newEndpoint;\n this.path = newEndpoint.path || '/';\n if (this.headers['Host']) {\n this.headers['Host'] = newEndpoint.host;\n }\n }\n});\n\n/**\n * The low level HTTP response object, encapsulating all HTTP header\n * and body data returned from the request.\n *\n * @!attribute statusCode\n * @return [Integer] the HTTP status code of the response (e.g., 200, 404)\n * @!attribute headers\n * @return [map]\n * a map of response header keys and their respective values\n * @!attribute body\n * @return [String] the response body payload\n * @!attribute [r] streaming\n * @return [Boolean] whether this response is being streamed at a low-level.\n * Defaults to `false` (buffered reads). Do not modify this manually, use\n * {createUnbufferedStream} to convert the stream to unbuffered mode\n * instead.\n */\nAWS.HttpResponse = inherit({\n\n /**\n * @api private\n */\n constructor: function HttpResponse() {\n this.statusCode = undefined;\n this.headers = {};\n this.body = undefined;\n this.streaming = false;\n this.stream = null;\n },\n\n /**\n * Disables buffering on the HTTP response and returns the stream for reading.\n * @return [Stream, XMLHttpRequest, null] the underlying stream object.\n * Use this object to directly read data off of the stream.\n * @note This object is only available after the {AWS.Request~httpHeaders}\n * event has fired. This method must be called prior to\n * {AWS.Request~httpData}.\n * @example Taking control of a stream\n * request.on('httpHeaders', function(statusCode, headers) {\n * if (statusCode < 300) {\n * if (headers.etag === 'xyz') {\n * // pipe the stream, disabling buffering\n * var stream = this.response.httpResponse.createUnbufferedStream();\n * stream.pipe(process.stdout);\n * } else { // abort this request and set a better error message\n * this.abort();\n * this.response.error = new Error('Invalid ETag');\n * }\n * }\n * }).send(console.log);\n */\n createUnbufferedStream: function createUnbufferedStream() {\n this.streaming = true;\n return this.stream;\n }\n});\n\n\nAWS.HttpClient = inherit({});\n\n/**\n * @api private\n */\nAWS.HttpClient.getInstance = function getInstance() {\n if (this.singleton === undefined) {\n this.singleton = new this();\n }\n return this.singleton;\n};\n","var AWS = require('../core');\nvar Stream = AWS.util.stream.Stream;\nvar TransformStream = AWS.util.stream.Transform;\nvar ReadableStream = AWS.util.stream.Readable;\nrequire('../http');\nvar CONNECTION_REUSE_ENV_NAME = 'AWS_NODEJS_CONNECTION_REUSE_ENABLED';\n\n/**\n * @api private\n */\nAWS.NodeHttpClient = AWS.util.inherit({\n handleRequest: function handleRequest(httpRequest, httpOptions, callback, errCallback) {\n var self = this;\n var endpoint = httpRequest.endpoint;\n var pathPrefix = '';\n if (!httpOptions) httpOptions = {};\n if (httpOptions.proxy) {\n pathPrefix = endpoint.protocol + '//' + endpoint.hostname;\n if (endpoint.port !== 80 && endpoint.port !== 443) {\n pathPrefix += ':' + endpoint.port;\n }\n endpoint = new AWS.Endpoint(httpOptions.proxy);\n }\n\n var useSSL = endpoint.protocol === 'https:';\n var http = useSSL ? require('https') : require('http');\n var options = {\n host: endpoint.hostname,\n port: endpoint.port,\n method: httpRequest.method,\n headers: httpRequest.headers,\n path: pathPrefix + httpRequest.path\n };\n\n if (!httpOptions.agent) {\n options.agent = this.getAgent(useSSL, {\n keepAlive: process.env[CONNECTION_REUSE_ENV_NAME] === '1' ? true : false\n });\n }\n\n AWS.util.update(options, httpOptions);\n delete options.proxy; // proxy isn't an HTTP option\n delete options.timeout; // timeout isn't an HTTP option\n\n var stream = http.request(options, function (httpResp) {\n if (stream.didCallback) return;\n\n callback(httpResp);\n httpResp.emit(\n 'headers',\n httpResp.statusCode,\n httpResp.headers,\n httpResp.statusMessage\n );\n });\n httpRequest.stream = stream; // attach stream to httpRequest\n stream.didCallback = false;\n\n // connection timeout support\n if (httpOptions.connectTimeout) {\n var connectTimeoutId;\n stream.on('socket', function(socket) {\n if (socket.connecting) {\n connectTimeoutId = setTimeout(function connectTimeout() {\n if (stream.didCallback) return; stream.didCallback = true;\n\n stream.abort();\n errCallback(AWS.util.error(\n new Error('Socket timed out without establishing a connection'),\n {code: 'TimeoutError'}\n ));\n }, httpOptions.connectTimeout);\n socket.on('connect', function() {\n clearTimeout(connectTimeoutId);\n connectTimeoutId = null;\n });\n }\n });\n }\n\n // timeout support\n stream.setTimeout(httpOptions.timeout || 0, function() {\n if (stream.didCallback) return; stream.didCallback = true;\n\n var msg = 'Connection timed out after ' + httpOptions.timeout + 'ms';\n errCallback(AWS.util.error(new Error(msg), {code: 'TimeoutError'}));\n stream.abort();\n });\n\n stream.on('error', function() {\n if (connectTimeoutId) {\n clearTimeout(connectTimeoutId);\n connectTimeoutId = null;\n }\n if (stream.didCallback) return; stream.didCallback = true;\n errCallback.apply(stream, arguments);\n });\n\n var expect = httpRequest.headers.Expect || httpRequest.headers.expect;\n if (expect === '100-continue') {\n stream.once('continue', function() {\n self.writeBody(stream, httpRequest);\n });\n } else {\n this.writeBody(stream, httpRequest);\n }\n\n return stream;\n },\n\n writeBody: function writeBody(stream, httpRequest) {\n var body = httpRequest.body;\n var totalBytes = parseInt(httpRequest.headers['Content-Length'], 10);\n\n if (body instanceof Stream) {\n // For progress support of streaming content -\n // pipe the data through a transform stream to emit 'sendProgress' events\n var progressStream = this.progressStream(stream, totalBytes);\n if (progressStream) {\n body.pipe(progressStream).pipe(stream);\n } else {\n body.pipe(stream);\n }\n } else if (body) {\n // The provided body is a buffer/string and is already fully available in memory -\n // For performance it's best to send it as a whole by calling stream.end(body),\n // Callers expect a 'sendProgress' event which is best emitted once\n // the http request stream has been fully written and all data flushed.\n // The use of totalBytes is important over body.length for strings where\n // length is char length and not byte length.\n stream.once('finish', function() {\n stream.emit('sendProgress', {\n loaded: totalBytes,\n total: totalBytes\n });\n });\n stream.end(body);\n } else {\n // no request body\n stream.end();\n }\n },\n\n /**\n * Create the https.Agent or http.Agent according to the request schema.\n */\n getAgent: function getAgent(useSSL, agentOptions) {\n var http = useSSL ? require('https') : require('http');\n if (useSSL) {\n if (!AWS.NodeHttpClient.sslAgent) {\n AWS.NodeHttpClient.sslAgent = new http.Agent(AWS.util.merge({\n rejectUnauthorized: process.env.NODE_TLS_REJECT_UNAUTHORIZED === '0' ? false : true\n }, agentOptions || {}));\n AWS.NodeHttpClient.sslAgent.setMaxListeners(0);\n\n // delegate maxSockets to globalAgent, set a default limit of 50 if current value is Infinity.\n // Users can bypass this default by supplying their own Agent as part of SDK configuration.\n Object.defineProperty(AWS.NodeHttpClient.sslAgent, 'maxSockets', {\n enumerable: true,\n get: function() {\n var defaultMaxSockets = 50;\n var globalAgent = http.globalAgent;\n if (globalAgent && globalAgent.maxSockets !== Infinity && typeof globalAgent.maxSockets === 'number') {\n return globalAgent.maxSockets;\n }\n return defaultMaxSockets;\n }\n });\n }\n return AWS.NodeHttpClient.sslAgent;\n } else {\n if (!AWS.NodeHttpClient.agent) {\n AWS.NodeHttpClient.agent = new http.Agent(agentOptions);\n }\n return AWS.NodeHttpClient.agent;\n }\n },\n\n progressStream: function progressStream(stream, totalBytes) {\n if (typeof TransformStream === 'undefined') {\n // for node 0.8 there is no streaming progress\n return;\n }\n var loadedBytes = 0;\n var reporter = new TransformStream();\n reporter._transform = function(chunk, encoding, callback) {\n if (chunk) {\n loadedBytes += chunk.length;\n stream.emit('sendProgress', {\n loaded: loadedBytes,\n total: totalBytes\n });\n }\n callback(null, chunk);\n };\n return reporter;\n },\n\n emitter: null\n});\n\n/**\n * @!ignore\n */\n\n/**\n * @api private\n */\nAWS.HttpClient.prototype = AWS.NodeHttpClient.prototype;\n\n/**\n * @api private\n */\nAWS.HttpClient.streamsApiVersion = ReadableStream ? 2 : 1;\n","var util = require('../util');\n\nfunction JsonBuilder() { }\n\nJsonBuilder.prototype.build = function(value, shape) {\n return JSON.stringify(translate(value, shape));\n};\n\nfunction translate(value, shape) {\n if (!shape || value === undefined || value === null) return undefined;\n\n switch (shape.type) {\n case 'structure': return translateStructure(value, shape);\n case 'map': return translateMap(value, shape);\n case 'list': return translateList(value, shape);\n default: return translateScalar(value, shape);\n }\n}\n\nfunction translateStructure(structure, shape) {\n var struct = {};\n util.each(structure, function(name, value) {\n var memberShape = shape.members[name];\n if (memberShape) {\n if (memberShape.location !== 'body') return;\n var locationName = memberShape.isLocationName ? memberShape.name : name;\n var result = translate(value, memberShape);\n if (result !== undefined) struct[locationName] = result;\n }\n });\n return struct;\n}\n\nfunction translateList(list, shape) {\n var out = [];\n util.arrayEach(list, function(value) {\n var result = translate(value, shape.member);\n if (result !== undefined) out.push(result);\n });\n return out;\n}\n\nfunction translateMap(map, shape) {\n var out = {};\n util.each(map, function(key, value) {\n var result = translate(value, shape.value);\n if (result !== undefined) out[key] = result;\n });\n return out;\n}\n\nfunction translateScalar(value, shape) {\n return shape.toWireFormat(value);\n}\n\n/**\n * @api private\n */\nmodule.exports = JsonBuilder;\n","var util = require('../util');\n\nfunction JsonParser() { }\n\nJsonParser.prototype.parse = function(value, shape) {\n return translate(JSON.parse(value), shape);\n};\n\nfunction translate(value, shape) {\n if (!shape || value === undefined) return undefined;\n\n switch (shape.type) {\n case 'structure': return translateStructure(value, shape);\n case 'map': return translateMap(value, shape);\n case 'list': return translateList(value, shape);\n default: return translateScalar(value, shape);\n }\n}\n\nfunction translateStructure(structure, shape) {\n if (structure == null) return undefined;\n\n var struct = {};\n var shapeMembers = shape.members;\n util.each(shapeMembers, function(name, memberShape) {\n var locationName = memberShape.isLocationName ? memberShape.name : name;\n if (Object.prototype.hasOwnProperty.call(structure, locationName)) {\n var value = structure[locationName];\n var result = translate(value, memberShape);\n if (result !== undefined) struct[name] = result;\n }\n });\n return struct;\n}\n\nfunction translateList(list, shape) {\n if (list == null) return undefined;\n\n var out = [];\n util.arrayEach(list, function(value) {\n var result = translate(value, shape.member);\n if (result === undefined) out.push(null);\n else out.push(result);\n });\n return out;\n}\n\nfunction translateMap(map, shape) {\n if (map == null) return undefined;\n\n var out = {};\n util.each(map, function(key, value) {\n var result = translate(value, shape.value);\n if (result === undefined) out[key] = null;\n else out[key] = result;\n });\n return out;\n}\n\nfunction translateScalar(value, shape) {\n return shape.toType(value);\n}\n\n/**\n * @api private\n */\nmodule.exports = JsonParser;\n","var AWS = require('./core');\nrequire('./http');\nvar inherit = AWS.util.inherit;\n\n/**\n * Represents a metadata service available on EC2 instances. Using the\n * {request} method, you can receieve metadata about any available resource\n * on the metadata service.\n *\n * You can disable the use of the IMDS by setting the AWS_EC2_METADATA_DISABLED\n * environment variable to a truthy value.\n *\n * @!attribute [r] httpOptions\n * @return [map] a map of options to pass to the underlying HTTP request:\n *\n * * **timeout** (Number) — a timeout value in milliseconds to wait\n * before aborting the connection. Set to 0 for no timeout.\n *\n * @!macro nobrowser\n */\nAWS.MetadataService = inherit({\n /**\n * @return [String] the hostname of the instance metadata service\n */\n host: '169.254.169.254',\n\n /**\n * @!ignore\n */\n\n /**\n * Default HTTP options. By default, the metadata service is set to not\n * timeout on long requests. This means that on non-EC2 machines, this\n * request will never return. If you are calling this operation from an\n * environment that may not always run on EC2, set a `timeout` value so\n * the SDK will abort the request after a given number of milliseconds.\n */\n httpOptions: { timeout: 0 },\n\n /**\n * when enabled, metadata service will not fetch token\n */\n disableFetchToken: false,\n\n /**\n * Creates a new MetadataService object with a given set of options.\n *\n * @option options host [String] the hostname of the instance metadata\n * service\n * @option options httpOptions [map] a map of options to pass to the\n * underlying HTTP request:\n *\n * * **timeout** (Number) — a timeout value in milliseconds to wait\n * before aborting the connection. Set to 0 for no timeout.\n * @option options maxRetries [Integer] the maximum number of retries to\n * perform for timeout errors\n * @option options retryDelayOptions [map] A set of options to configure the\n * retry delay on retryable errors. See AWS.Config for details.\n */\n constructor: function MetadataService(options) {\n AWS.util.update(this, options);\n },\n\n /**\n * Sends a request to the instance metadata service for a given resource.\n *\n * @param path [String] the path of the resource to get\n *\n * @param options [map] an optional map used to make request\n *\n * * **method** (String) — HTTP request method\n *\n * * **headers** (map) — a map of response header keys and their respective values\n *\n * @callback callback function(err, data)\n * Called when a response is available from the service.\n * @param err [Error, null] if an error occurred, this value will be set\n * @param data [String, null] if the request was successful, the body of\n * the response\n */\n request: function request(path, options, callback) {\n if (arguments.length === 2) {\n callback = options;\n options = {};\n }\n\n if (process.env[AWS.util.imdsDisabledEnv]) {\n callback(new Error('EC2 Instance Metadata Service access disabled'));\n return;\n }\n\n path = path || '/';\n var httpRequest = new AWS.HttpRequest('http://' + this.host + path);\n httpRequest.method = options.method || 'GET';\n if (options.headers) {\n httpRequest.headers = options.headers;\n }\n AWS.util.handleRequestWithRetries(httpRequest, this, callback);\n },\n\n /**\n * @api private\n */\n loadCredentialsCallbacks: [],\n\n /**\n * Fetches metadata token used for getting credentials\n *\n * @api private\n * @callback callback function(err, token)\n * Called when token is loaded from the resource\n */\n fetchMetadataToken: function fetchMetadataToken(callback) {\n var self = this;\n var tokenFetchPath = '/latest/api/token';\n self.request(\n tokenFetchPath,\n {\n 'method': 'PUT',\n 'headers': {\n 'x-aws-ec2-metadata-token-ttl-seconds': '21600'\n }\n },\n callback\n );\n },\n\n /**\n * Fetches credentials\n *\n * @api private\n * @callback cb function(err, creds)\n * Called when credentials are loaded from the resource\n */\n fetchCredentials: function fetchCredentials(options, cb) {\n var self = this;\n var basePath = '/latest/meta-data/iam/security-credentials/';\n\n self.request(basePath, options, function (err, roleName) {\n if (err) {\n self.disableFetchToken = !(err.statusCode === 401);\n cb(AWS.util.error(\n err,\n {\n message: 'EC2 Metadata roleName request returned error'\n }\n ));\n return;\n }\n roleName = roleName.split('\\n')[0]; // grab first (and only) role\n self.request(basePath + roleName, options, function (credErr, credData) {\n if (credErr) {\n self.disableFetchToken = !(credErr.statusCode === 401);\n cb(AWS.util.error(\n credErr,\n {\n message: 'EC2 Metadata creds request returned error'\n }\n ));\n return;\n }\n try {\n var credentials = JSON.parse(credData);\n cb(null, credentials);\n } catch (parseError) {\n cb(parseError);\n }\n });\n });\n },\n\n /**\n * Loads a set of credentials stored in the instance metadata service\n *\n * @api private\n * @callback callback function(err, credentials)\n * Called when credentials are loaded from the resource\n * @param err [Error] if an error occurred, this value will be set\n * @param credentials [Object] the raw JSON object containing all\n * metadata from the credentials resource\n */\n loadCredentials: function loadCredentials(callback) {\n var self = this;\n self.loadCredentialsCallbacks.push(callback);\n if (self.loadCredentialsCallbacks.length > 1) { return; }\n\n function callbacks(err, creds) {\n var cb;\n while ((cb = self.loadCredentialsCallbacks.shift()) !== undefined) {\n cb(err, creds);\n }\n }\n\n if (self.disableFetchToken) {\n self.fetchCredentials({}, callbacks);\n } else {\n self.fetchMetadataToken(function(tokenError, token) {\n if (tokenError) {\n if (tokenError.code === 'TimeoutError') {\n self.disableFetchToken = true;\n } else if (tokenError.retryable === true) {\n callbacks(AWS.util.error(\n tokenError,\n {\n message: 'EC2 Metadata token request returned error'\n }\n ));\n return;\n } else if (tokenError.statusCode === 400) {\n callbacks(AWS.util.error(\n tokenError,\n {\n message: 'EC2 Metadata token request returned 400'\n }\n ));\n return;\n }\n }\n var options = {};\n if (token) {\n options.headers = {\n 'x-aws-ec2-metadata-token': token\n };\n }\n self.fetchCredentials(options, callbacks);\n });\n\n }\n }\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.MetadataService;\n","var Collection = require('./collection');\nvar Operation = require('./operation');\nvar Shape = require('./shape');\nvar Paginator = require('./paginator');\nvar ResourceWaiter = require('./resource_waiter');\nvar metadata = require('../../apis/metadata.json');\n\nvar util = require('../util');\nvar property = util.property;\nvar memoizedProperty = util.memoizedProperty;\n\nfunction Api(api, options) {\n var self = this;\n api = api || {};\n options = options || {};\n options.api = this;\n\n api.metadata = api.metadata || {};\n\n var serviceIdentifier = options.serviceIdentifier;\n delete options.serviceIdentifier;\n\n property(this, 'isApi', true, false);\n property(this, 'apiVersion', api.metadata.apiVersion);\n property(this, 'endpointPrefix', api.metadata.endpointPrefix);\n property(this, 'signingName', api.metadata.signingName);\n property(this, 'globalEndpoint', api.metadata.globalEndpoint);\n property(this, 'signatureVersion', api.metadata.signatureVersion);\n property(this, 'jsonVersion', api.metadata.jsonVersion);\n property(this, 'targetPrefix', api.metadata.targetPrefix);\n property(this, 'protocol', api.metadata.protocol);\n property(this, 'timestampFormat', api.metadata.timestampFormat);\n property(this, 'xmlNamespaceUri', api.metadata.xmlNamespace);\n property(this, 'abbreviation', api.metadata.serviceAbbreviation);\n property(this, 'fullName', api.metadata.serviceFullName);\n property(this, 'serviceId', api.metadata.serviceId);\n if (serviceIdentifier && metadata[serviceIdentifier]) {\n property(this, 'xmlNoDefaultLists', metadata[serviceIdentifier].xmlNoDefaultLists, false);\n }\n\n memoizedProperty(this, 'className', function() {\n var name = api.metadata.serviceAbbreviation || api.metadata.serviceFullName;\n if (!name) return null;\n\n name = name.replace(/^Amazon|AWS\\s*|\\(.*|\\s+|\\W+/g, '');\n if (name === 'ElasticLoadBalancing') name = 'ELB';\n return name;\n });\n\n function addEndpointOperation(name, operation) {\n if (operation.endpointoperation === true) {\n property(self, 'endpointOperation', util.string.lowerFirst(name));\n }\n if (operation.endpointdiscovery && !self.hasRequiredEndpointDiscovery) {\n property(\n self,\n 'hasRequiredEndpointDiscovery',\n operation.endpointdiscovery.required === true\n );\n }\n }\n\n property(this, 'operations', new Collection(api.operations, options, function(name, operation) {\n return new Operation(name, operation, options);\n }, util.string.lowerFirst, addEndpointOperation));\n\n property(this, 'shapes', new Collection(api.shapes, options, function(name, shape) {\n return Shape.create(shape, options);\n }));\n\n property(this, 'paginators', new Collection(api.paginators, options, function(name, paginator) {\n return new Paginator(name, paginator, options);\n }));\n\n property(this, 'waiters', new Collection(api.waiters, options, function(name, waiter) {\n return new ResourceWaiter(name, waiter, options);\n }, util.string.lowerFirst));\n\n if (options.documentation) {\n property(this, 'documentation', api.documentation);\n property(this, 'documentationUrl', api.documentationUrl);\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = Api;\n","var memoizedProperty = require('../util').memoizedProperty;\n\nfunction memoize(name, value, factory, nameTr) {\n memoizedProperty(this, nameTr(name), function() {\n return factory(name, value);\n });\n}\n\nfunction Collection(iterable, options, factory, nameTr, callback) {\n nameTr = nameTr || String;\n var self = this;\n\n for (var id in iterable) {\n if (Object.prototype.hasOwnProperty.call(iterable, id)) {\n memoize.call(self, id, iterable[id], factory, nameTr);\n if (callback) callback(id, iterable[id]);\n }\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = Collection;\n","var Shape = require('./shape');\n\nvar util = require('../util');\nvar property = util.property;\nvar memoizedProperty = util.memoizedProperty;\n\nfunction Operation(name, operation, options) {\n var self = this;\n options = options || {};\n\n property(this, 'name', operation.name || name);\n property(this, 'api', options.api, false);\n\n operation.http = operation.http || {};\n property(this, 'endpoint', operation.endpoint);\n property(this, 'httpMethod', operation.http.method || 'POST');\n property(this, 'httpPath', operation.http.requestUri || '/');\n property(this, 'authtype', operation.authtype || '');\n property(\n this,\n 'endpointDiscoveryRequired',\n operation.endpointdiscovery ?\n (operation.endpointdiscovery.required ? 'REQUIRED' : 'OPTIONAL') :\n 'NULL'\n );\n\n memoizedProperty(this, 'input', function() {\n if (!operation.input) {\n return new Shape.create({type: 'structure'}, options);\n }\n return Shape.create(operation.input, options);\n });\n\n memoizedProperty(this, 'output', function() {\n if (!operation.output) {\n return new Shape.create({type: 'structure'}, options);\n }\n return Shape.create(operation.output, options);\n });\n\n memoizedProperty(this, 'errors', function() {\n var list = [];\n if (!operation.errors) return null;\n\n for (var i = 0; i < operation.errors.length; i++) {\n list.push(Shape.create(operation.errors[i], options));\n }\n\n return list;\n });\n\n memoizedProperty(this, 'paginator', function() {\n return options.api.paginators[name];\n });\n\n if (options.documentation) {\n property(this, 'documentation', operation.documentation);\n property(this, 'documentationUrl', operation.documentationUrl);\n }\n\n // idempotentMembers only tracks top-level input shapes\n memoizedProperty(this, 'idempotentMembers', function() {\n var idempotentMembers = [];\n var input = self.input;\n var members = input.members;\n if (!input.members) {\n return idempotentMembers;\n }\n for (var name in members) {\n if (!members.hasOwnProperty(name)) {\n continue;\n }\n if (members[name].isIdempotent === true) {\n idempotentMembers.push(name);\n }\n }\n return idempotentMembers;\n });\n\n memoizedProperty(this, 'hasEventOutput', function() {\n var output = self.output;\n return hasEventStream(output);\n });\n}\n\nfunction hasEventStream(topLevelShape) {\n var members = topLevelShape.members;\n var payload = topLevelShape.payload;\n\n if (!topLevelShape.members) {\n return false;\n }\n\n if (payload) {\n var payloadMember = members[payload];\n return payloadMember.isEventStream;\n }\n\n // check if any member is an event stream\n for (var name in members) {\n if (!members.hasOwnProperty(name)) {\n if (members[name].isEventStream === true) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * @api private\n */\nmodule.exports = Operation;\n","var property = require('../util').property;\n\nfunction Paginator(name, paginator) {\n property(this, 'inputToken', paginator.input_token);\n property(this, 'limitKey', paginator.limit_key);\n property(this, 'moreResults', paginator.more_results);\n property(this, 'outputToken', paginator.output_token);\n property(this, 'resultKey', paginator.result_key);\n}\n\n/**\n * @api private\n */\nmodule.exports = Paginator;\n","var util = require('../util');\nvar property = util.property;\n\nfunction ResourceWaiter(name, waiter, options) {\n options = options || {};\n property(this, 'name', name);\n property(this, 'api', options.api, false);\n\n if (waiter.operation) {\n property(this, 'operation', util.string.lowerFirst(waiter.operation));\n }\n\n var self = this;\n var keys = [\n 'type',\n 'description',\n 'delay',\n 'maxAttempts',\n 'acceptors'\n ];\n\n keys.forEach(function(key) {\n var value = waiter[key];\n if (value) {\n property(self, key, value);\n }\n });\n}\n\n/**\n * @api private\n */\nmodule.exports = ResourceWaiter;\n","var Collection = require('./collection');\n\nvar util = require('../util');\n\nfunction property(obj, name, value) {\n if (value !== null && value !== undefined) {\n util.property.apply(this, arguments);\n }\n}\n\nfunction memoizedProperty(obj, name) {\n if (!obj.constructor.prototype[name]) {\n util.memoizedProperty.apply(this, arguments);\n }\n}\n\nfunction Shape(shape, options, memberName) {\n options = options || {};\n\n property(this, 'shape', shape.shape);\n property(this, 'api', options.api, false);\n property(this, 'type', shape.type);\n property(this, 'enum', shape.enum);\n property(this, 'min', shape.min);\n property(this, 'max', shape.max);\n property(this, 'pattern', shape.pattern);\n property(this, 'location', shape.location || this.location || 'body');\n property(this, 'name', this.name || shape.xmlName || shape.queryName ||\n shape.locationName || memberName);\n property(this, 'isStreaming', shape.streaming || this.isStreaming || false);\n property(this, 'requiresLength', shape.requiresLength, false);\n property(this, 'isComposite', shape.isComposite || false);\n property(this, 'isShape', true, false);\n property(this, 'isQueryName', Boolean(shape.queryName), false);\n property(this, 'isLocationName', Boolean(shape.locationName), false);\n property(this, 'isIdempotent', shape.idempotencyToken === true);\n property(this, 'isJsonValue', shape.jsonvalue === true);\n property(this, 'isSensitive', shape.sensitive === true || shape.prototype && shape.prototype.sensitive === true);\n property(this, 'isEventStream', Boolean(shape.eventstream), false);\n property(this, 'isEvent', Boolean(shape.event), false);\n property(this, 'isEventPayload', Boolean(shape.eventpayload), false);\n property(this, 'isEventHeader', Boolean(shape.eventheader), false);\n property(this, 'isTimestampFormatSet', Boolean(shape.timestampFormat) || shape.prototype && shape.prototype.isTimestampFormatSet === true, false);\n property(this, 'endpointDiscoveryId', Boolean(shape.endpointdiscoveryid), false);\n property(this, 'hostLabel', Boolean(shape.hostLabel), false);\n\n if (options.documentation) {\n property(this, 'documentation', shape.documentation);\n property(this, 'documentationUrl', shape.documentationUrl);\n }\n\n if (shape.xmlAttribute) {\n property(this, 'isXmlAttribute', shape.xmlAttribute || false);\n }\n\n // type conversion and parsing\n property(this, 'defaultValue', null);\n this.toWireFormat = function(value) {\n if (value === null || value === undefined) return '';\n return value;\n };\n this.toType = function(value) { return value; };\n}\n\n/**\n * @api private\n */\nShape.normalizedTypes = {\n character: 'string',\n double: 'float',\n long: 'integer',\n short: 'integer',\n biginteger: 'integer',\n bigdecimal: 'float',\n blob: 'binary'\n};\n\n/**\n * @api private\n */\nShape.types = {\n 'structure': StructureShape,\n 'list': ListShape,\n 'map': MapShape,\n 'boolean': BooleanShape,\n 'timestamp': TimestampShape,\n 'float': FloatShape,\n 'integer': IntegerShape,\n 'string': StringShape,\n 'base64': Base64Shape,\n 'binary': BinaryShape\n};\n\nShape.resolve = function resolve(shape, options) {\n if (shape.shape) {\n var refShape = options.api.shapes[shape.shape];\n if (!refShape) {\n throw new Error('Cannot find shape reference: ' + shape.shape);\n }\n\n return refShape;\n } else {\n return null;\n }\n};\n\nShape.create = function create(shape, options, memberName) {\n if (shape.isShape) return shape;\n\n var refShape = Shape.resolve(shape, options);\n if (refShape) {\n var filteredKeys = Object.keys(shape);\n if (!options.documentation) {\n filteredKeys = filteredKeys.filter(function(name) {\n return !name.match(/documentation/);\n });\n }\n\n // create an inline shape with extra members\n var InlineShape = function() {\n refShape.constructor.call(this, shape, options, memberName);\n };\n InlineShape.prototype = refShape;\n return new InlineShape();\n } else {\n // set type if not set\n if (!shape.type) {\n if (shape.members) shape.type = 'structure';\n else if (shape.member) shape.type = 'list';\n else if (shape.key) shape.type = 'map';\n else shape.type = 'string';\n }\n\n // normalize types\n var origType = shape.type;\n if (Shape.normalizedTypes[shape.type]) {\n shape.type = Shape.normalizedTypes[shape.type];\n }\n\n if (Shape.types[shape.type]) {\n return new Shape.types[shape.type](shape, options, memberName);\n } else {\n throw new Error('Unrecognized shape type: ' + origType);\n }\n }\n};\n\nfunction CompositeShape(shape) {\n Shape.apply(this, arguments);\n property(this, 'isComposite', true);\n\n if (shape.flattened) {\n property(this, 'flattened', shape.flattened || false);\n }\n}\n\nfunction StructureShape(shape, options) {\n var self = this;\n var requiredMap = null, firstInit = !this.isShape;\n\n CompositeShape.apply(this, arguments);\n\n if (firstInit) {\n property(this, 'defaultValue', function() { return {}; });\n property(this, 'members', {});\n property(this, 'memberNames', []);\n property(this, 'required', []);\n property(this, 'isRequired', function() { return false; });\n }\n\n if (shape.members) {\n property(this, 'members', new Collection(shape.members, options, function(name, member) {\n return Shape.create(member, options, name);\n }));\n memoizedProperty(this, 'memberNames', function() {\n return shape.xmlOrder || Object.keys(shape.members);\n });\n\n if (shape.event) {\n memoizedProperty(this, 'eventPayloadMemberName', function() {\n var members = self.members;\n var memberNames = self.memberNames;\n // iterate over members to find ones that are event payloads\n for (var i = 0, iLen = memberNames.length; i < iLen; i++) {\n if (members[memberNames[i]].isEventPayload) {\n return memberNames[i];\n }\n }\n });\n\n memoizedProperty(this, 'eventHeaderMemberNames', function() {\n var members = self.members;\n var memberNames = self.memberNames;\n var eventHeaderMemberNames = [];\n // iterate over members to find ones that are event headers\n for (var i = 0, iLen = memberNames.length; i < iLen; i++) {\n if (members[memberNames[i]].isEventHeader) {\n eventHeaderMemberNames.push(memberNames[i]);\n }\n }\n return eventHeaderMemberNames;\n });\n }\n }\n\n if (shape.required) {\n property(this, 'required', shape.required);\n property(this, 'isRequired', function(name) {\n if (!requiredMap) {\n requiredMap = {};\n for (var i = 0; i < shape.required.length; i++) {\n requiredMap[shape.required[i]] = true;\n }\n }\n\n return requiredMap[name];\n }, false, true);\n }\n\n property(this, 'resultWrapper', shape.resultWrapper || null);\n\n if (shape.payload) {\n property(this, 'payload', shape.payload);\n }\n\n if (typeof shape.xmlNamespace === 'string') {\n property(this, 'xmlNamespaceUri', shape.xmlNamespace);\n } else if (typeof shape.xmlNamespace === 'object') {\n property(this, 'xmlNamespacePrefix', shape.xmlNamespace.prefix);\n property(this, 'xmlNamespaceUri', shape.xmlNamespace.uri);\n }\n}\n\nfunction ListShape(shape, options) {\n var self = this, firstInit = !this.isShape;\n CompositeShape.apply(this, arguments);\n\n if (firstInit) {\n property(this, 'defaultValue', function() { return []; });\n }\n\n if (shape.member) {\n memoizedProperty(this, 'member', function() {\n return Shape.create(shape.member, options);\n });\n }\n\n if (this.flattened) {\n var oldName = this.name;\n memoizedProperty(this, 'name', function() {\n return self.member.name || oldName;\n });\n }\n}\n\nfunction MapShape(shape, options) {\n var firstInit = !this.isShape;\n CompositeShape.apply(this, arguments);\n\n if (firstInit) {\n property(this, 'defaultValue', function() { return {}; });\n property(this, 'key', Shape.create({type: 'string'}, options));\n property(this, 'value', Shape.create({type: 'string'}, options));\n }\n\n if (shape.key) {\n memoizedProperty(this, 'key', function() {\n return Shape.create(shape.key, options);\n });\n }\n if (shape.value) {\n memoizedProperty(this, 'value', function() {\n return Shape.create(shape.value, options);\n });\n }\n}\n\nfunction TimestampShape(shape) {\n var self = this;\n Shape.apply(this, arguments);\n\n if (shape.timestampFormat) {\n property(this, 'timestampFormat', shape.timestampFormat);\n } else if (self.isTimestampFormatSet && this.timestampFormat) {\n property(this, 'timestampFormat', this.timestampFormat);\n } else if (this.location === 'header') {\n property(this, 'timestampFormat', 'rfc822');\n } else if (this.location === 'querystring') {\n property(this, 'timestampFormat', 'iso8601');\n } else if (this.api) {\n switch (this.api.protocol) {\n case 'json':\n case 'rest-json':\n property(this, 'timestampFormat', 'unixTimestamp');\n break;\n case 'rest-xml':\n case 'query':\n case 'ec2':\n property(this, 'timestampFormat', 'iso8601');\n break;\n }\n }\n\n this.toType = function(value) {\n if (value === null || value === undefined) return null;\n if (typeof value.toUTCString === 'function') return value;\n return typeof value === 'string' || typeof value === 'number' ?\n util.date.parseTimestamp(value) : null;\n };\n\n this.toWireFormat = function(value) {\n return util.date.format(value, self.timestampFormat);\n };\n}\n\nfunction StringShape() {\n Shape.apply(this, arguments);\n\n var nullLessProtocols = ['rest-xml', 'query', 'ec2'];\n this.toType = function(value) {\n value = this.api && nullLessProtocols.indexOf(this.api.protocol) > -1 ?\n value || '' : value;\n if (this.isJsonValue) {\n return JSON.parse(value);\n }\n\n return value && typeof value.toString === 'function' ?\n value.toString() : value;\n };\n\n this.toWireFormat = function(value) {\n return this.isJsonValue ? JSON.stringify(value) : value;\n };\n}\n\nfunction FloatShape() {\n Shape.apply(this, arguments);\n\n this.toType = function(value) {\n if (value === null || value === undefined) return null;\n return parseFloat(value);\n };\n this.toWireFormat = this.toType;\n}\n\nfunction IntegerShape() {\n Shape.apply(this, arguments);\n\n this.toType = function(value) {\n if (value === null || value === undefined) return null;\n return parseInt(value, 10);\n };\n this.toWireFormat = this.toType;\n}\n\nfunction BinaryShape() {\n Shape.apply(this, arguments);\n this.toType = function(value) {\n var buf = util.base64.decode(value);\n if (this.isSensitive && util.isNode() && typeof util.Buffer.alloc === 'function') {\n /* Node.js can create a Buffer that is not isolated.\n * i.e. buf.byteLength !== buf.buffer.byteLength\n * This means that the sensitive data is accessible to anyone with access to buf.buffer.\n * If this is the node shared Buffer, then other code within this process _could_ find this secret.\n * Copy sensitive data to an isolated Buffer and zero the sensitive data.\n * While this is safe to do here, copying this code somewhere else may produce unexpected results.\n */\n var secureBuf = util.Buffer.alloc(buf.length, buf);\n buf.fill(0);\n buf = secureBuf;\n }\n return buf;\n };\n this.toWireFormat = util.base64.encode;\n}\n\nfunction Base64Shape() {\n BinaryShape.apply(this, arguments);\n}\n\nfunction BooleanShape() {\n Shape.apply(this, arguments);\n\n this.toType = function(value) {\n if (typeof value === 'boolean') return value;\n if (value === null || value === undefined) return null;\n return value === 'true';\n };\n}\n\n/**\n * @api private\n */\nShape.shapes = {\n StructureShape: StructureShape,\n ListShape: ListShape,\n MapShape: MapShape,\n StringShape: StringShape,\n BooleanShape: BooleanShape,\n Base64Shape: Base64Shape\n};\n\n/**\n * @api private\n */\nmodule.exports = Shape;\n","var util = require('./util');\n\nutil.isBrowser = function() { return false; };\nutil.isNode = function() { return true; };\n\n// node.js specific modules\nutil.crypto.lib = require('crypto');\nutil.Buffer = require('buffer').Buffer;\nutil.domain = require('domain');\nutil.stream = require('stream');\nutil.url = require('url');\nutil.querystring = require('querystring');\nutil.environment = 'nodejs';\nutil.createEventStream = util.stream.Readable ?\n require('./event-stream/streaming-create-event-stream').createEventStream : require('./event-stream/buffered-create-event-stream').createEventStream;\nutil.realClock = require('./realclock/nodeClock');\nutil.clientSideMonitoring = {\n Publisher: require('./publisher').Publisher,\n configProvider: require('./publisher/configuration'),\n};\nutil.iniLoader = require('./shared-ini').iniLoader;\nutil.getSystemErrorName = require('util').getSystemErrorName;\n\nvar AWS;\n\n/**\n * @api private\n */\nmodule.exports = AWS = require('./core');\n\nrequire('./credentials');\nrequire('./credentials/credential_provider_chain');\nrequire('./credentials/temporary_credentials');\nrequire('./credentials/chainable_temporary_credentials');\nrequire('./credentials/web_identity_credentials');\nrequire('./credentials/cognito_identity_credentials');\nrequire('./credentials/saml_credentials');\nrequire('./credentials/process_credentials');\n\n// Load the xml2js XML parser\nAWS.XML.Parser = require('./xml/node_parser');\n\n// Load Node HTTP client\nrequire('./http/node');\n\nrequire('./shared-ini/ini-loader');\n\n// Load custom credential providers\nrequire('./credentials/token_file_web_identity_credentials');\nrequire('./credentials/ec2_metadata_credentials');\nrequire('./credentials/remote_credentials');\nrequire('./credentials/ecs_credentials');\nrequire('./credentials/environment_credentials');\nrequire('./credentials/file_system_credentials');\nrequire('./credentials/shared_ini_file_credentials');\nrequire('./credentials/process_credentials');\n\n// Setup default chain providers\n// If this changes, please update documentation for\n// AWS.CredentialProviderChain.defaultProviders in\n// credentials/credential_provider_chain.js\nAWS.CredentialProviderChain.defaultProviders = [\n function () { return new AWS.EnvironmentCredentials('AWS'); },\n function () { return new AWS.EnvironmentCredentials('AMAZON'); },\n function () { return new AWS.SharedIniFileCredentials(); },\n function () { return new AWS.ECSCredentials(); },\n function () { return new AWS.ProcessCredentials(); },\n function () { return new AWS.TokenFileWebIdentityCredentials(); },\n function () { return new AWS.EC2MetadataCredentials(); }\n];\n\n// Update configuration keys\nAWS.util.update(AWS.Config.prototype.keys, {\n credentials: function () {\n var credentials = null;\n new AWS.CredentialProviderChain([\n function () { return new AWS.EnvironmentCredentials('AWS'); },\n function () { return new AWS.EnvironmentCredentials('AMAZON'); },\n function () { return new AWS.SharedIniFileCredentials({ disableAssumeRole: true }); }\n ]).resolve(function(err, creds) {\n if (!err) credentials = creds;\n });\n return credentials;\n },\n credentialProvider: function() {\n return new AWS.CredentialProviderChain();\n },\n logger: function () {\n return process.env.AWSJS_DEBUG ? console : null;\n },\n region: function() {\n var env = process.env;\n var region = env.AWS_REGION || env.AMAZON_REGION;\n if (env[AWS.util.configOptInEnv]) {\n var toCheck = [\n {filename: env[AWS.util.sharedCredentialsFileEnv]},\n {isConfig: true, filename: env[AWS.util.sharedConfigFileEnv]}\n ];\n var iniLoader = AWS.util.iniLoader;\n while (!region && toCheck.length) {\n var configFile = {};\n var fileInfo = toCheck.shift();\n try {\n configFile = iniLoader.loadFrom(fileInfo);\n } catch (err) {\n if (fileInfo.isConfig) throw err;\n }\n var profile = configFile[env.AWS_PROFILE || AWS.util.defaultProfile];\n region = profile && profile.region;\n }\n }\n return region;\n }\n});\n\n// Reset configuration\nAWS.config = new AWS.Config();\n","var AWS = require('./core');\n\n/**\n * @api private\n */\nAWS.ParamValidator = AWS.util.inherit({\n /**\n * Create a new validator object.\n *\n * @param validation [Boolean|map] whether input parameters should be\n * validated against the operation description before sending the\n * request. Pass a map to enable any of the following specific\n * validation features:\n *\n * * **min** [Boolean] — Validates that a value meets the min\n * constraint. This is enabled by default when paramValidation is set\n * to `true`.\n * * **max** [Boolean] — Validates that a value meets the max\n * constraint.\n * * **pattern** [Boolean] — Validates that a string value matches a\n * regular expression.\n * * **enum** [Boolean] — Validates that a string value matches one\n * of the allowable enum values.\n */\n constructor: function ParamValidator(validation) {\n if (validation === true || validation === undefined) {\n validation = {'min': true};\n }\n this.validation = validation;\n },\n\n validate: function validate(shape, params, context) {\n this.errors = [];\n this.validateMember(shape, params || {}, context || 'params');\n\n if (this.errors.length > 1) {\n var msg = this.errors.join('\\n* ');\n msg = 'There were ' + this.errors.length +\n ' validation errors:\\n* ' + msg;\n throw AWS.util.error(new Error(msg),\n {code: 'MultipleValidationErrors', errors: this.errors});\n } else if (this.errors.length === 1) {\n throw this.errors[0];\n } else {\n return true;\n }\n },\n\n fail: function fail(code, message) {\n this.errors.push(AWS.util.error(new Error(message), {code: code}));\n },\n\n validateStructure: function validateStructure(shape, params, context) {\n this.validateType(params, context, ['object'], 'structure');\n\n var paramName;\n for (var i = 0; shape.required && i < shape.required.length; i++) {\n paramName = shape.required[i];\n var value = params[paramName];\n if (value === undefined || value === null) {\n this.fail('MissingRequiredParameter',\n 'Missing required key \\'' + paramName + '\\' in ' + context);\n }\n }\n\n // validate hash members\n for (paramName in params) {\n if (!Object.prototype.hasOwnProperty.call(params, paramName)) continue;\n\n var paramValue = params[paramName],\n memberShape = shape.members[paramName];\n\n if (memberShape !== undefined) {\n var memberContext = [context, paramName].join('.');\n this.validateMember(memberShape, paramValue, memberContext);\n } else if (paramValue !== undefined && paramValue !== null) {\n this.fail('UnexpectedParameter',\n 'Unexpected key \\'' + paramName + '\\' found in ' + context);\n }\n }\n\n return true;\n },\n\n validateMember: function validateMember(shape, param, context) {\n switch (shape.type) {\n case 'structure':\n return this.validateStructure(shape, param, context);\n case 'list':\n return this.validateList(shape, param, context);\n case 'map':\n return this.validateMap(shape, param, context);\n default:\n return this.validateScalar(shape, param, context);\n }\n },\n\n validateList: function validateList(shape, params, context) {\n if (this.validateType(params, context, [Array])) {\n this.validateRange(shape, params.length, context, 'list member count');\n // validate array members\n for (var i = 0; i < params.length; i++) {\n this.validateMember(shape.member, params[i], context + '[' + i + ']');\n }\n }\n },\n\n validateMap: function validateMap(shape, params, context) {\n if (this.validateType(params, context, ['object'], 'map')) {\n // Build up a count of map members to validate range traits.\n var mapCount = 0;\n for (var param in params) {\n if (!Object.prototype.hasOwnProperty.call(params, param)) continue;\n // Validate any map key trait constraints\n this.validateMember(shape.key, param,\n context + '[key=\\'' + param + '\\']');\n this.validateMember(shape.value, params[param],\n context + '[\\'' + param + '\\']');\n mapCount++;\n }\n this.validateRange(shape, mapCount, context, 'map member count');\n }\n },\n\n validateScalar: function validateScalar(shape, value, context) {\n switch (shape.type) {\n case null:\n case undefined:\n case 'string':\n return this.validateString(shape, value, context);\n case 'base64':\n case 'binary':\n return this.validatePayload(value, context);\n case 'integer':\n case 'float':\n return this.validateNumber(shape, value, context);\n case 'boolean':\n return this.validateType(value, context, ['boolean']);\n case 'timestamp':\n return this.validateType(value, context, [Date,\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$/, 'number'],\n 'Date object, ISO-8601 string, or a UNIX timestamp');\n default:\n return this.fail('UnkownType', 'Unhandled type ' +\n shape.type + ' for ' + context);\n }\n },\n\n validateString: function validateString(shape, value, context) {\n var validTypes = ['string'];\n if (shape.isJsonValue) {\n validTypes = validTypes.concat(['number', 'object', 'boolean']);\n }\n if (value !== null && this.validateType(value, context, validTypes)) {\n this.validateEnum(shape, value, context);\n this.validateRange(shape, value.length, context, 'string length');\n this.validatePattern(shape, value, context);\n this.validateUri(shape, value, context);\n }\n },\n\n validateUri: function validateUri(shape, value, context) {\n if (shape['location'] === 'uri') {\n if (value.length === 0) {\n this.fail('UriParameterError', 'Expected uri parameter to have length >= 1,'\n + ' but found \"' + value +'\" for ' + context);\n }\n }\n },\n\n validatePattern: function validatePattern(shape, value, context) {\n if (this.validation['pattern'] && shape['pattern'] !== undefined) {\n if (!(new RegExp(shape['pattern'])).test(value)) {\n this.fail('PatternMatchError', 'Provided value \"' + value + '\" '\n + 'does not match regex pattern /' + shape['pattern'] + '/ for '\n + context);\n }\n }\n },\n\n validateRange: function validateRange(shape, value, context, descriptor) {\n if (this.validation['min']) {\n if (shape['min'] !== undefined && value < shape['min']) {\n this.fail('MinRangeError', 'Expected ' + descriptor + ' >= '\n + shape['min'] + ', but found ' + value + ' for ' + context);\n }\n }\n if (this.validation['max']) {\n if (shape['max'] !== undefined && value > shape['max']) {\n this.fail('MaxRangeError', 'Expected ' + descriptor + ' <= '\n + shape['max'] + ', but found ' + value + ' for ' + context);\n }\n }\n },\n\n validateEnum: function validateRange(shape, value, context) {\n if (this.validation['enum'] && shape['enum'] !== undefined) {\n // Fail if the string value is not present in the enum list\n if (shape['enum'].indexOf(value) === -1) {\n this.fail('EnumError', 'Found string value of ' + value + ', but '\n + 'expected ' + shape['enum'].join('|') + ' for ' + context);\n }\n }\n },\n\n validateType: function validateType(value, context, acceptedTypes, type) {\n // We will not log an error for null or undefined, but we will return\n // false so that callers know that the expected type was not strictly met.\n if (value === null || value === undefined) return false;\n\n var foundInvalidType = false;\n for (var i = 0; i < acceptedTypes.length; i++) {\n if (typeof acceptedTypes[i] === 'string') {\n if (typeof value === acceptedTypes[i]) return true;\n } else if (acceptedTypes[i] instanceof RegExp) {\n if ((value || '').toString().match(acceptedTypes[i])) return true;\n } else {\n if (value instanceof acceptedTypes[i]) return true;\n if (AWS.util.isType(value, acceptedTypes[i])) return true;\n if (!type && !foundInvalidType) acceptedTypes = acceptedTypes.slice();\n acceptedTypes[i] = AWS.util.typeName(acceptedTypes[i]);\n }\n foundInvalidType = true;\n }\n\n var acceptedType = type;\n if (!acceptedType) {\n acceptedType = acceptedTypes.join(', ').replace(/,([^,]+)$/, ', or$1');\n }\n\n var vowel = acceptedType.match(/^[aeiou]/i) ? 'n' : '';\n this.fail('InvalidParameterType', 'Expected ' + context + ' to be a' +\n vowel + ' ' + acceptedType);\n return false;\n },\n\n validateNumber: function validateNumber(shape, value, context) {\n if (value === null || value === undefined) return;\n if (typeof value === 'string') {\n var castedValue = parseFloat(value);\n if (castedValue.toString() === value) value = castedValue;\n }\n if (this.validateType(value, context, ['number'])) {\n this.validateRange(shape, value, context, 'numeric value');\n }\n },\n\n validatePayload: function validatePayload(value, context) {\n if (value === null || value === undefined) return;\n if (typeof value === 'string') return;\n if (value && typeof value.byteLength === 'number') return; // typed arrays\n if (AWS.util.isNode()) { // special check for buffer/stream in Node.js\n var Stream = AWS.util.stream.Stream;\n if (AWS.util.Buffer.isBuffer(value) || value instanceof Stream) return;\n } else {\n if (typeof Blob !== void 0 && value instanceof Blob) return;\n }\n\n var types = ['Buffer', 'Stream', 'File', 'Blob', 'ArrayBuffer', 'DataView'];\n if (value) {\n for (var i = 0; i < types.length; i++) {\n if (AWS.util.isType(value, types[i])) return;\n if (AWS.util.typeName(value.constructor) === types[i]) return;\n }\n }\n\n this.fail('InvalidParameterType', 'Expected ' + context + ' to be a ' +\n 'string, Buffer, Stream, Blob, or typed array object');\n }\n});\n","var AWS = require('../core');\nvar rest = AWS.Protocol.Rest;\n\n/**\n * A presigner object can be used to generate presigned urls for the Polly service.\n */\nAWS.Polly.Presigner = AWS.util.inherit({\n /**\n * Creates a presigner object with a set of configuration options.\n *\n * @option options params [map] An optional map of parameters to bind to every\n * request sent by this service object.\n * @option options service [AWS.Polly] An optional pre-configured instance\n * of the AWS.Polly service object to use for requests. The object may\n * bound parameters used by the presigner.\n * @see AWS.Polly.constructor\n */\n constructor: function Signer(options) {\n options = options || {};\n this.options = options;\n this.service = options.service;\n this.bindServiceObject(options);\n this._operations = {};\n },\n\n /**\n * @api private\n */\n bindServiceObject: function bindServiceObject(options) {\n options = options || {};\n if (!this.service) {\n this.service = new AWS.Polly(options);\n } else {\n var config = AWS.util.copy(this.service.config);\n this.service = new this.service.constructor.__super__(config);\n this.service.config.params = AWS.util.merge(this.service.config.params || {}, options.params);\n }\n },\n\n /**\n * @api private\n */\n modifyInputMembers: function modifyInputMembers(input) {\n // make copies of the input so we don't overwrite the api\n // need to be careful to copy anything we access/modify\n var modifiedInput = AWS.util.copy(input);\n modifiedInput.members = AWS.util.copy(input.members);\n AWS.util.each(input.members, function(name, member) {\n modifiedInput.members[name] = AWS.util.copy(member);\n // update location and locationName\n if (!member.location || member.location === 'body') {\n modifiedInput.members[name].location = 'querystring';\n modifiedInput.members[name].locationName = name;\n }\n });\n return modifiedInput;\n },\n\n /**\n * @api private\n */\n convertPostToGet: function convertPostToGet(req) {\n // convert method\n req.httpRequest.method = 'GET';\n\n var operation = req.service.api.operations[req.operation];\n // get cached operation input first\n var input = this._operations[req.operation];\n if (!input) {\n // modify the original input\n this._operations[req.operation] = input = this.modifyInputMembers(operation.input);\n }\n\n var uri = rest.generateURI(req.httpRequest.endpoint.path, operation.httpPath, input, req.params);\n\n req.httpRequest.path = uri;\n req.httpRequest.body = '';\n\n // don't need these headers on a GET request\n delete req.httpRequest.headers['Content-Length'];\n delete req.httpRequest.headers['Content-Type'];\n },\n\n /**\n * @overload getSynthesizeSpeechUrl(params = {}, [expires = 3600], [callback])\n * Generate a presigned url for {AWS.Polly.synthesizeSpeech}.\n * @note You must ensure that you have static or previously resolved\n * credentials if you call this method synchronously (with no callback),\n * otherwise it may not properly sign the request. If you cannot guarantee\n * this (you are using an asynchronous credential provider, i.e., EC2\n * IAM roles), you should always call this method with an asynchronous\n * callback.\n * @param params [map] parameters to pass to the operation. See the {AWS.Polly.synthesizeSpeech}\n * operation for the expected operation parameters.\n * @param expires [Integer] (3600) the number of seconds to expire the pre-signed URL operation in.\n * Defaults to 1 hour.\n * @return [string] if called synchronously (with no callback), returns the signed URL.\n * @return [null] nothing is returned if a callback is provided.\n * @callback callback function (err, url)\n * If a callback is supplied, it is called when a signed URL has been generated.\n * @param err [Error] the error object returned from the presigner.\n * @param url [String] the signed URL.\n * @see AWS.Polly.synthesizeSpeech\n */\n getSynthesizeSpeechUrl: function getSynthesizeSpeechUrl(params, expires, callback) {\n var self = this;\n var request = this.service.makeRequest('synthesizeSpeech', params);\n // remove existing build listeners\n request.removeAllListeners('build');\n request.on('build', function(req) {\n self.convertPostToGet(req);\n });\n return request.presign(expires, callback);\n }\n});\n","var util = require('../util');\nvar AWS = require('../core');\n\n/**\n * Prepend prefix defined by API model to endpoint that's already\n * constructed. This feature does not apply to operations using\n * endpoint discovery and can be disabled.\n * @api private\n */\nfunction populateHostPrefix(request) {\n var enabled = request.service.config.hostPrefixEnabled;\n if (!enabled) return request;\n var operationModel = request.service.api.operations[request.operation];\n //don't marshal host prefix when operation has endpoint discovery traits\n if (hasEndpointDiscover(request)) return request;\n if (operationModel.endpoint && operationModel.endpoint.hostPrefix) {\n var hostPrefixNotation = operationModel.endpoint.hostPrefix;\n var hostPrefix = expandHostPrefix(hostPrefixNotation, request.params, operationModel.input);\n prependEndpointPrefix(request.httpRequest.endpoint, hostPrefix);\n validateHostname(request.httpRequest.endpoint.hostname);\n }\n return request;\n}\n\n/**\n * @api private\n */\nfunction hasEndpointDiscover(request) {\n var api = request.service.api;\n var operationModel = api.operations[request.operation];\n var isEndpointOperation = api.endpointOperation && (api.endpointOperation === util.string.lowerFirst(operationModel.name));\n return (operationModel.endpointDiscoveryRequired !== 'NULL' || isEndpointOperation === true);\n}\n\n/**\n * @api private\n */\nfunction expandHostPrefix(hostPrefixNotation, params, shape) {\n util.each(shape.members, function(name, member) {\n if (member.hostLabel === true) {\n if (typeof params[name] !== 'string' || params[name] === '') {\n throw util.error(new Error(), {\n message: 'Parameter ' + name + ' should be a non-empty string.',\n code: 'InvalidParameter'\n });\n }\n var regex = new RegExp('\\\\{' + name + '\\\\}', 'g');\n hostPrefixNotation = hostPrefixNotation.replace(regex, params[name]);\n }\n });\n return hostPrefixNotation;\n}\n\n/**\n * @api private\n */\nfunction prependEndpointPrefix(endpoint, prefix) {\n if (endpoint.host) {\n endpoint.host = prefix + endpoint.host;\n }\n if (endpoint.hostname) {\n endpoint.hostname = prefix + endpoint.hostname;\n }\n}\n\n/**\n * @api private\n */\nfunction validateHostname(hostname) {\n var labels = hostname.split('.');\n //Reference: https://tools.ietf.org/html/rfc1123#section-2\n var hostPattern = /^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9]$/;\n util.arrayEach(labels, function(label) {\n if (!label.length || label.length < 1 || label.length > 63) {\n throw util.error(new Error(), {\n code: 'ValidationError',\n message: 'Hostname label length should be between 1 to 63 characters, inclusive.'\n });\n }\n if (!hostPattern.test(label)) {\n throw AWS.util.error(new Error(),\n {code: 'ValidationError', message: label + ' is not hostname compatible.'});\n }\n });\n}\n\nmodule.exports = {\n populateHostPrefix: populateHostPrefix\n};\n","var util = require('../util');\nvar JsonBuilder = require('../json/builder');\nvar JsonParser = require('../json/parser');\nvar populateHostPrefix = require('./helpers').populateHostPrefix;\n\nfunction buildRequest(req) {\n var httpRequest = req.httpRequest;\n var api = req.service.api;\n var target = api.targetPrefix + '.' + api.operations[req.operation].name;\n var version = api.jsonVersion || '1.0';\n var input = api.operations[req.operation].input;\n var builder = new JsonBuilder();\n\n if (version === 1) version = '1.0';\n httpRequest.body = builder.build(req.params || {}, input);\n httpRequest.headers['Content-Type'] = 'application/x-amz-json-' + version;\n httpRequest.headers['X-Amz-Target'] = target;\n\n populateHostPrefix(req);\n}\n\nfunction extractError(resp) {\n var error = {};\n var httpResponse = resp.httpResponse;\n\n error.code = httpResponse.headers['x-amzn-errortype'] || 'UnknownError';\n if (typeof error.code === 'string') {\n error.code = error.code.split(':')[0];\n }\n\n if (httpResponse.body.length > 0) {\n try {\n var e = JSON.parse(httpResponse.body.toString());\n var code = e.__type || e.code || e.Code;\n if (code) {\n error.code = code.split('#').pop();\n }\n if (error.code === 'RequestEntityTooLarge') {\n error.message = 'Request body must be less than 1 MB';\n } else {\n error.message = (e.message || e.Message || null);\n }\n } catch (e) {\n error.statusCode = httpResponse.statusCode;\n error.message = httpResponse.statusMessage;\n }\n } else {\n error.statusCode = httpResponse.statusCode;\n error.message = httpResponse.statusCode.toString();\n }\n\n resp.error = util.error(new Error(), error);\n}\n\nfunction extractData(resp) {\n var body = resp.httpResponse.body.toString() || '{}';\n if (resp.request.service.config.convertResponseTypes === false) {\n resp.data = JSON.parse(body);\n } else {\n var operation = resp.request.service.api.operations[resp.request.operation];\n var shape = operation.output || {};\n var parser = new JsonParser();\n resp.data = parser.parse(body, shape);\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n buildRequest: buildRequest,\n extractError: extractError,\n extractData: extractData\n};\n","var AWS = require('../core');\nvar util = require('../util');\nvar QueryParamSerializer = require('../query/query_param_serializer');\nvar Shape = require('../model/shape');\nvar populateHostPrefix = require('./helpers').populateHostPrefix;\n\nfunction buildRequest(req) {\n var operation = req.service.api.operations[req.operation];\n var httpRequest = req.httpRequest;\n httpRequest.headers['Content-Type'] =\n 'application/x-www-form-urlencoded; charset=utf-8';\n httpRequest.params = {\n Version: req.service.api.apiVersion,\n Action: operation.name\n };\n\n // convert the request parameters into a list of query params,\n // e.g. Deeply.NestedParam.0.Name=value\n var builder = new QueryParamSerializer();\n builder.serialize(req.params, operation.input, function(name, value) {\n httpRequest.params[name] = value;\n });\n httpRequest.body = util.queryParamsToString(httpRequest.params);\n\n populateHostPrefix(req);\n}\n\nfunction extractError(resp) {\n var data, body = resp.httpResponse.body.toString();\n if (body.match('= 0 ? '&' : '?');\n var parts = [];\n util.arrayEach(Object.keys(queryString).sort(), function(key) {\n if (!Array.isArray(queryString[key])) {\n queryString[key] = [queryString[key]];\n }\n for (var i = 0; i < queryString[key].length; i++) {\n parts.push(util.uriEscape(String(key)) + '=' + queryString[key][i]);\n }\n });\n uri += parts.join('&');\n }\n\n return uri;\n}\n\nfunction populateURI(req) {\n var operation = req.service.api.operations[req.operation];\n var input = operation.input;\n\n var uri = generateURI(req.httpRequest.endpoint.path, operation.httpPath, input, req.params);\n req.httpRequest.path = uri;\n}\n\nfunction populateHeaders(req) {\n var operation = req.service.api.operations[req.operation];\n util.each(operation.input.members, function (name, member) {\n var value = req.params[name];\n if (value === null || value === undefined) return;\n\n if (member.location === 'headers' && member.type === 'map') {\n util.each(value, function(key, memberValue) {\n req.httpRequest.headers[member.name + key] = memberValue;\n });\n } else if (member.location === 'header') {\n value = member.toWireFormat(value).toString();\n if (member.isJsonValue) {\n value = util.base64.encode(value);\n }\n req.httpRequest.headers[member.name] = value;\n }\n });\n}\n\nfunction buildRequest(req) {\n populateMethod(req);\n populateURI(req);\n populateHeaders(req);\n populateHostPrefix(req);\n}\n\nfunction extractError() {\n}\n\nfunction extractData(resp) {\n var req = resp.request;\n var data = {};\n var r = resp.httpResponse;\n var operation = req.service.api.operations[req.operation];\n var output = operation.output;\n\n // normalize headers names to lower-cased keys for matching\n var headers = {};\n util.each(r.headers, function (k, v) {\n headers[k.toLowerCase()] = v;\n });\n\n util.each(output.members, function(name, member) {\n var header = (member.name || name).toLowerCase();\n if (member.location === 'headers' && member.type === 'map') {\n data[name] = {};\n var location = member.isLocationName ? member.name : '';\n var pattern = new RegExp('^' + location + '(.+)', 'i');\n util.each(r.headers, function (k, v) {\n var result = k.match(pattern);\n if (result !== null) {\n data[name][result[1]] = v;\n }\n });\n } else if (member.location === 'header') {\n if (headers[header] !== undefined) {\n var value = member.isJsonValue ?\n util.base64.decode(headers[header]) :\n headers[header];\n data[name] = member.toType(value);\n }\n } else if (member.location === 'statusCode') {\n data[name] = parseInt(r.statusCode, 10);\n }\n });\n\n resp.data = data;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n buildRequest: buildRequest,\n extractError: extractError,\n extractData: extractData,\n generateURI: generateURI\n};\n","var util = require('../util');\nvar Rest = require('./rest');\nvar Json = require('./json');\nvar JsonBuilder = require('../json/builder');\nvar JsonParser = require('../json/parser');\n\nfunction populateBody(req) {\n var builder = new JsonBuilder();\n var input = req.service.api.operations[req.operation].input;\n\n if (input.payload) {\n var params = {};\n var payloadShape = input.members[input.payload];\n params = req.params[input.payload];\n if (params === undefined) return;\n\n if (payloadShape.type === 'structure') {\n req.httpRequest.body = builder.build(params, payloadShape);\n applyContentTypeHeader(req);\n } else { // non-JSON payload\n req.httpRequest.body = params;\n if (payloadShape.type === 'binary' || payloadShape.isStreaming) {\n applyContentTypeHeader(req, true);\n }\n }\n } else {\n var body = builder.build(req.params, input);\n if (body !== '{}' || req.httpRequest.method !== 'GET') { //don't send empty body for GET method\n req.httpRequest.body = body;\n }\n applyContentTypeHeader(req);\n }\n}\n\nfunction applyContentTypeHeader(req, isBinary) {\n var operation = req.service.api.operations[req.operation];\n var input = operation.input;\n\n if (!req.httpRequest.headers['Content-Type']) {\n var type = isBinary ? 'binary/octet-stream' : 'application/json';\n req.httpRequest.headers['Content-Type'] = type;\n }\n}\n\nfunction buildRequest(req) {\n Rest.buildRequest(req);\n\n // never send body payload on HEAD/DELETE\n if (['HEAD', 'DELETE'].indexOf(req.httpRequest.method) < 0) {\n populateBody(req);\n }\n}\n\nfunction extractError(resp) {\n Json.extractError(resp);\n}\n\nfunction extractData(resp) {\n Rest.extractData(resp);\n\n var req = resp.request;\n var operation = req.service.api.operations[req.operation];\n var rules = req.service.api.operations[req.operation].output || {};\n var parser;\n var hasEventOutput = operation.hasEventOutput;\n\n if (rules.payload) {\n var payloadMember = rules.members[rules.payload];\n var body = resp.httpResponse.body;\n if (payloadMember.isEventStream) {\n parser = new JsonParser();\n resp.data[payload] = util.createEventStream(\n AWS.HttpClient.streamsApiVersion === 2 ? resp.httpResponse.stream : body,\n parser,\n payloadMember\n );\n } else if (payloadMember.type === 'structure' || payloadMember.type === 'list') {\n var parser = new JsonParser();\n resp.data[rules.payload] = parser.parse(body, payloadMember);\n } else if (payloadMember.type === 'binary' || payloadMember.isStreaming) {\n resp.data[rules.payload] = body;\n } else {\n resp.data[rules.payload] = payloadMember.toType(body);\n }\n } else {\n var data = resp.data;\n Json.extractData(resp);\n resp.data = util.merge(data, resp.data);\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n buildRequest: buildRequest,\n extractError: extractError,\n extractData: extractData\n};\n","var AWS = require('../core');\nvar util = require('../util');\nvar Rest = require('./rest');\n\nfunction populateBody(req) {\n var input = req.service.api.operations[req.operation].input;\n var builder = new AWS.XML.Builder();\n var params = req.params;\n\n var payload = input.payload;\n if (payload) {\n var payloadMember = input.members[payload];\n params = params[payload];\n if (params === undefined) return;\n\n if (payloadMember.type === 'structure') {\n var rootElement = payloadMember.name;\n req.httpRequest.body = builder.toXML(params, payloadMember, rootElement, true);\n } else { // non-xml payload\n req.httpRequest.body = params;\n }\n } else {\n req.httpRequest.body = builder.toXML(params, input, input.name ||\n input.shape || util.string.upperFirst(req.operation) + 'Request');\n }\n}\n\nfunction buildRequest(req) {\n Rest.buildRequest(req);\n\n // never send body payload on GET/HEAD\n if (['GET', 'HEAD'].indexOf(req.httpRequest.method) < 0) {\n populateBody(req);\n }\n}\n\nfunction extractError(resp) {\n Rest.extractError(resp);\n\n var data;\n try {\n data = new AWS.XML.Parser().parse(resp.httpResponse.body.toString());\n } catch (e) {\n data = {\n Code: resp.httpResponse.statusCode,\n Message: resp.httpResponse.statusMessage\n };\n }\n\n if (data.Errors) data = data.Errors;\n if (data.Error) data = data.Error;\n if (data.Code) {\n resp.error = util.error(new Error(), {\n code: data.Code,\n message: data.Message\n });\n } else {\n resp.error = util.error(new Error(), {\n code: resp.httpResponse.statusCode,\n message: null\n });\n }\n}\n\nfunction extractData(resp) {\n Rest.extractData(resp);\n\n var parser;\n var req = resp.request;\n var body = resp.httpResponse.body;\n var operation = req.service.api.operations[req.operation];\n var output = operation.output;\n\n var hasEventOutput = operation.hasEventOutput;\n\n var payload = output.payload;\n if (payload) {\n var payloadMember = output.members[payload];\n if (payloadMember.isEventStream) {\n parser = new AWS.XML.Parser();\n resp.data[payload] = util.createEventStream(\n AWS.HttpClient.streamsApiVersion === 2 ? resp.httpResponse.stream : resp.httpResponse.body,\n parser,\n payloadMember\n );\n } else if (payloadMember.type === 'structure') {\n parser = new AWS.XML.Parser();\n resp.data[payload] = parser.parse(body.toString(), payloadMember);\n } else if (payloadMember.type === 'binary' || payloadMember.isStreaming) {\n resp.data[payload] = body;\n } else {\n resp.data[payload] = payloadMember.toType(body);\n }\n } else if (body.length > 0) {\n parser = new AWS.XML.Parser();\n var data = parser.parse(body.toString(), output);\n util.update(resp.data, data);\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n buildRequest: buildRequest,\n extractError: extractError,\n extractData: extractData\n};\n","var AWS = require('../core');\n\n/**\n * Resolve client-side monitoring configuration from either environmental variables\n * or shared config file. Configurations from environmental variables have higher priority\n * than those from shared config file. The resolver will try to read the shared config file\n * no matter whether the AWS_SDK_LOAD_CONFIG variable is set.\n * @api private\n */\nfunction resolveMonitoringConfig() {\n var config = {\n port: undefined,\n clientId: undefined,\n enabled: undefined,\n host: undefined\n };\n if (fromEnvironment(config) || fromConfigFile(config)) return toJSType(config);\n return toJSType(config);\n}\n\n/**\n * Resolve configurations from environmental variables.\n * @param {object} client side monitoring config object needs to be resolved\n * @returns {boolean} whether resolving configurations is done\n * @api private\n */\nfunction fromEnvironment(config) {\n config.port = config.port || process.env.AWS_CSM_PORT;\n config.enabled = config.enabled || process.env.AWS_CSM_ENABLED;\n config.clientId = config.clientId || process.env.AWS_CSM_CLIENT_ID;\n config.host = config.host || process.env.AWS_CSM_HOST;\n return config.port && config.enabled && config.clientId && config.host ||\n ['false', '0'].indexOf(config.enabled) >= 0; //no need to read shared config file if explicitely disabled\n}\n\n/**\n * Resolve cofigurations from shared config file with specified role name\n * @param {object} client side monitoring config object needs to be resolved\n * @returns {boolean} whether resolving configurations is done\n * @api private\n */\nfunction fromConfigFile(config) {\n var sharedFileConfig;\n try {\n var configFile = AWS.util.iniLoader.loadFrom({\n isConfig: true,\n filename: process.env[AWS.util.sharedConfigFileEnv]\n });\n var sharedFileConfig = configFile[\n process.env.AWS_PROFILE || AWS.util.defaultProfile\n ];\n } catch (err) {\n return false;\n }\n if (!sharedFileConfig) return config;\n config.port = config.port || sharedFileConfig.csm_port;\n config.enabled = config.enabled || sharedFileConfig.csm_enabled;\n config.clientId = config.clientId || sharedFileConfig.csm_client_id;\n config.host = config.host || sharedFileConfig.csm_host;\n return config.port && config.enabled && config.clientId && config.host;\n}\n\n/**\n * Transfer the resolved configuration value to proper types: port as number, enabled\n * as boolean and clientId as string. The 'enabled' flag is valued to false when set\n * to 'false' or '0'.\n * @param {object} resolved client side monitoring config\n * @api private\n */\nfunction toJSType(config) {\n //config.XXX is either undefined or string\n var falsyNotations = ['false', '0', undefined];\n if (!config.enabled || falsyNotations.indexOf(config.enabled.toLowerCase()) >= 0) {\n config.enabled = false;\n } else {\n config.enabled = true;\n }\n config.port = config.port ? parseInt(config.port, 10) : undefined;\n return config;\n}\n\nmodule.exports = resolveMonitoringConfig;\n","var util = require('../core').util;\nvar dgram = require('dgram');\nvar stringToBuffer = util.buffer.toBuffer;\n\nvar MAX_MESSAGE_SIZE = 1024 * 8; // 8 KB\n\n/**\n * Publishes metrics via udp.\n * @param {object} options Paramters for Publisher constructor\n * @param {number} [options.port = 31000] Port number\n * @param {string} [options.clientId = ''] Client Identifier\n * @param {boolean} [options.enabled = false] enable sending metrics datagram\n * @api private\n */\nfunction Publisher(options) {\n // handle configuration\n options = options || {};\n this.enabled = options.enabled || false;\n this.port = options.port || 31000;\n this.clientId = options.clientId || '';\n this.address = options.host || '127.0.0.1';\n if (this.clientId.length > 255) {\n // ClientId has a max length of 255\n this.clientId = this.clientId.substr(0, 255);\n }\n this.messagesInFlight = 0;\n}\n\nPublisher.prototype.fieldsToTrim = {\n UserAgent: 256,\n SdkException: 128,\n SdkExceptionMessage: 512,\n AwsException: 128,\n AwsExceptionMessage: 512,\n FinalSdkException: 128,\n FinalSdkExceptionMessage: 512,\n FinalAwsException: 128,\n FinalAwsExceptionMessage: 512\n\n};\n\n/**\n * Trims fields that have a specified max length.\n * @param {object} event ApiCall or ApiCallAttempt event.\n * @returns {object}\n * @api private\n */\nPublisher.prototype.trimFields = function(event) {\n var trimmableFields = Object.keys(this.fieldsToTrim);\n for (var i = 0, iLen = trimmableFields.length; i < iLen; i++) {\n var field = trimmableFields[i];\n if (event.hasOwnProperty(field)) {\n var maxLength = this.fieldsToTrim[field];\n var value = event[field];\n if (value && value.length > maxLength) {\n event[field] = value.substr(0, maxLength);\n }\n }\n }\n return event;\n};\n\n/**\n * Handles ApiCall and ApiCallAttempt events.\n * @param {Object} event apiCall or apiCallAttempt event.\n * @api private\n */\nPublisher.prototype.eventHandler = function(event) {\n // set the clientId\n event.ClientId = this.clientId;\n\n this.trimFields(event);\n\n var message = stringToBuffer(JSON.stringify(event));\n if (!this.enabled || message.length > MAX_MESSAGE_SIZE) {\n // drop the message if publisher not enabled or it is too large\n return;\n }\n\n this.publishDatagram(message);\n};\n\n/**\n * Publishes message to an agent.\n * @param {Buffer} message JSON message to send to agent.\n * @api private\n */\nPublisher.prototype.publishDatagram = function(message) {\n var self = this;\n var client = this.getClient();\n\n this.messagesInFlight++;\n this.client.send(message, 0, message.length, this.port, this.address, function(err, bytes) {\n if (--self.messagesInFlight <= 0) {\n // destroy existing client so the event loop isn't kept open\n self.destroyClient();\n }\n });\n};\n\n/**\n * Returns an existing udp socket, or creates one if it doesn't already exist.\n * @api private\n */\nPublisher.prototype.getClient = function() {\n if (!this.client) {\n this.client = dgram.createSocket('udp4');\n }\n return this.client;\n};\n\n/**\n * Destroys the udp socket.\n * @api private\n */\nPublisher.prototype.destroyClient = function() {\n if (this.client) {\n this.client.close();\n this.client = void 0;\n }\n};\n\nmodule.exports = {\n Publisher: Publisher\n};\n","var util = require('../util');\n\nfunction QueryParamSerializer() {\n}\n\nQueryParamSerializer.prototype.serialize = function(params, shape, fn) {\n serializeStructure('', params, shape, fn);\n};\n\nfunction ucfirst(shape) {\n if (shape.isQueryName || shape.api.protocol !== 'ec2') {\n return shape.name;\n } else {\n return shape.name[0].toUpperCase() + shape.name.substr(1);\n }\n}\n\nfunction serializeStructure(prefix, struct, rules, fn) {\n util.each(rules.members, function(name, member) {\n var value = struct[name];\n if (value === null || value === undefined) return;\n\n var memberName = ucfirst(member);\n memberName = prefix ? prefix + '.' + memberName : memberName;\n serializeMember(memberName, value, member, fn);\n });\n}\n\nfunction serializeMap(name, map, rules, fn) {\n var i = 1;\n util.each(map, function (key, value) {\n var prefix = rules.flattened ? '.' : '.entry.';\n var position = prefix + (i++) + '.';\n var keyName = position + (rules.key.name || 'key');\n var valueName = position + (rules.value.name || 'value');\n serializeMember(name + keyName, key, rules.key, fn);\n serializeMember(name + valueName, value, rules.value, fn);\n });\n}\n\nfunction serializeList(name, list, rules, fn) {\n var memberRules = rules.member || {};\n\n if (list.length === 0) {\n fn.call(this, name, null);\n return;\n }\n\n util.arrayEach(list, function (v, n) {\n var suffix = '.' + (n + 1);\n if (rules.api.protocol === 'ec2') {\n // Do nothing for EC2\n suffix = suffix + ''; // make linter happy\n } else if (rules.flattened) {\n if (memberRules.name) {\n var parts = name.split('.');\n parts.pop();\n parts.push(ucfirst(memberRules));\n name = parts.join('.');\n }\n } else {\n suffix = '.' + (memberRules.name ? memberRules.name : 'member') + suffix;\n }\n serializeMember(name + suffix, v, memberRules, fn);\n });\n}\n\nfunction serializeMember(name, value, rules, fn) {\n if (value === null || value === undefined) return;\n if (rules.type === 'structure') {\n serializeStructure(name, value, rules, fn);\n } else if (rules.type === 'list') {\n serializeList(name, value, rules, fn);\n } else if (rules.type === 'map') {\n serializeMap(name, value, rules, fn);\n } else {\n fn(name, rules.toWireFormat(value).toString());\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = QueryParamSerializer;\n","var AWS = require('../core');\n\n/**\n * @api private\n */\nvar service = null;\n\n/**\n * @api private\n */\nvar api = {\n signatureVersion: 'v4',\n signingName: 'rds-db',\n operations: {}\n};\n\n/**\n * @api private\n */\nvar requiredAuthTokenOptions = {\n region: 'string',\n hostname: 'string',\n port: 'number',\n username: 'string'\n};\n\n/**\n * A signer object can be used to generate an auth token to a database.\n */\nAWS.RDS.Signer = AWS.util.inherit({\n /**\n * Creates a signer object can be used to generate an auth token.\n *\n * @option options credentials [AWS.Credentials] the AWS credentials\n * to sign requests with. Uses the default credential provider chain\n * if not specified.\n * @option options hostname [String] the hostname of the database to connect to.\n * @option options port [Number] the port number the database is listening on.\n * @option options region [String] the region the database is located in.\n * @option options username [String] the username to login as.\n * @example Passing in options to constructor\n * var signer = new AWS.RDS.Signer({\n * credentials: new AWS.SharedIniFileCredentials({profile: 'default'}),\n * region: 'us-east-1',\n * hostname: 'db.us-east-1.rds.amazonaws.com',\n * port: 8000,\n * username: 'name'\n * });\n */\n constructor: function Signer(options) {\n this.options = options || {};\n },\n\n /**\n * @api private\n * Strips the protocol from a url.\n */\n convertUrlToAuthToken: function convertUrlToAuthToken(url) {\n // we are always using https as the protocol\n var protocol = 'https://';\n if (url.indexOf(protocol) === 0) {\n return url.substring(protocol.length);\n }\n },\n\n /**\n * @overload getAuthToken(options = {}, [callback])\n * Generate an auth token to a database.\n * @note You must ensure that you have static or previously resolved\n * credentials if you call this method synchronously (with no callback),\n * otherwise it may not properly sign the request. If you cannot guarantee\n * this (you are using an asynchronous credential provider, i.e., EC2\n * IAM roles), you should always call this method with an asynchronous\n * callback.\n *\n * @param options [map] The fields to use when generating an auth token.\n * Any options specified here will be merged on top of any options passed\n * to AWS.RDS.Signer:\n *\n * * **credentials** (AWS.Credentials) — the AWS credentials\n * to sign requests with. Uses the default credential provider chain\n * if not specified.\n * * **hostname** (String) — the hostname of the database to connect to.\n * * **port** (Number) — the port number the database is listening on.\n * * **region** (String) — the region the database is located in.\n * * **username** (String) — the username to login as.\n * @return [String] if called synchronously (with no callback), returns the\n * auth token.\n * @return [null] nothing is returned if a callback is provided.\n * @callback callback function (err, token)\n * If a callback is supplied, it is called when an auth token has been generated.\n * @param err [Error] the error object returned from the signer.\n * @param token [String] the auth token.\n *\n * @example Generating an auth token synchronously\n * var signer = new AWS.RDS.Signer({\n * // configure options\n * region: 'us-east-1',\n * username: 'default',\n * hostname: 'db.us-east-1.amazonaws.com',\n * port: 8000\n * });\n * var token = signer.getAuthToken({\n * // these options are merged with those defined when creating the signer, overriding in the case of a duplicate option\n * // credentials are not specified here or when creating the signer, so default credential provider will be used\n * username: 'test' // overriding username\n * });\n * @example Generating an auth token asynchronously\n * var signer = new AWS.RDS.Signer({\n * // configure options\n * region: 'us-east-1',\n * username: 'default',\n * hostname: 'db.us-east-1.amazonaws.com',\n * port: 8000\n * });\n * signer.getAuthToken({\n * // these options are merged with those defined when creating the signer, overriding in the case of a duplicate option\n * // credentials are not specified here or when creating the signer, so default credential provider will be used\n * username: 'test' // overriding username\n * }, function(err, token) {\n * if (err) {\n * // handle error\n * } else {\n * // use token\n * }\n * });\n *\n */\n getAuthToken: function getAuthToken(options, callback) {\n if (typeof options === 'function' && callback === undefined) {\n callback = options;\n options = {};\n }\n var self = this;\n var hasCallback = typeof callback === 'function';\n // merge options with existing options\n options = AWS.util.merge(this.options, options);\n // validate options\n var optionsValidation = this.validateAuthTokenOptions(options);\n if (optionsValidation !== true) {\n if (hasCallback) {\n return callback(optionsValidation, null);\n }\n throw optionsValidation;\n }\n\n // 15 minutes\n var expires = 900;\n // create service to generate a request from\n var serviceOptions = {\n region: options.region,\n endpoint: new AWS.Endpoint(options.hostname + ':' + options.port),\n paramValidation: false,\n signatureVersion: 'v4'\n };\n if (options.credentials) {\n serviceOptions.credentials = options.credentials;\n }\n service = new AWS.Service(serviceOptions);\n // ensure the SDK is using sigv4 signing (config is not enough)\n service.api = api;\n\n var request = service.makeRequest();\n // add listeners to request to properly build auth token\n this.modifyRequestForAuthToken(request, options);\n\n if (hasCallback) {\n request.presign(expires, function(err, url) {\n if (url) {\n url = self.convertUrlToAuthToken(url);\n }\n callback(err, url);\n });\n } else {\n var url = request.presign(expires);\n return this.convertUrlToAuthToken(url);\n }\n },\n\n /**\n * @api private\n * Modifies a request to allow the presigner to generate an auth token.\n */\n modifyRequestForAuthToken: function modifyRequestForAuthToken(request, options) {\n request.on('build', request.buildAsGet);\n var httpRequest = request.httpRequest;\n httpRequest.body = AWS.util.queryParamsToString({\n Action: 'connect',\n DBUser: options.username\n });\n },\n\n /**\n * @api private\n * Validates that the options passed in contain all the keys with values of the correct type that\n * are needed to generate an auth token.\n */\n validateAuthTokenOptions: function validateAuthTokenOptions(options) {\n // iterate over all keys in options\n var message = '';\n options = options || {};\n for (var key in requiredAuthTokenOptions) {\n if (!Object.prototype.hasOwnProperty.call(requiredAuthTokenOptions, key)) {\n continue;\n }\n if (typeof options[key] !== requiredAuthTokenOptions[key]) {\n message += 'option \\'' + key + '\\' should have been type \\'' + requiredAuthTokenOptions[key] + '\\', was \\'' + typeof options[key] + '\\'.\\n';\n }\n }\n if (message.length) {\n return AWS.util.error(new Error(), {\n code: 'InvalidParameter',\n message: message\n });\n }\n return true;\n }\n});\n","module.exports = {\n //provide realtime clock for performance measurement\n now: function now() {\n var second = process.hrtime();\n return second[0] * 1000 + (second[1] / 1000000);\n }\n};\n","var util = require('./util');\nvar regionConfig = require('./region_config_data.json');\n\nfunction generateRegionPrefix(region) {\n if (!region) return null;\n\n var parts = region.split('-');\n if (parts.length < 3) return null;\n return parts.slice(0, parts.length - 2).join('-') + '-*';\n}\n\nfunction derivedKeys(service) {\n var region = service.config.region;\n var regionPrefix = generateRegionPrefix(region);\n var endpointPrefix = service.api.endpointPrefix;\n\n return [\n [region, endpointPrefix],\n [regionPrefix, endpointPrefix],\n [region, '*'],\n [regionPrefix, '*'],\n ['*', endpointPrefix],\n ['*', '*']\n ].map(function(item) {\n return item[0] && item[1] ? item.join('/') : null;\n });\n}\n\nfunction applyConfig(service, config) {\n util.each(config, function(key, value) {\n if (key === 'globalEndpoint') return;\n if (service.config[key] === undefined || service.config[key] === null) {\n service.config[key] = value;\n }\n });\n}\n\nfunction configureEndpoint(service) {\n var keys = derivedKeys(service);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!key) continue;\n\n if (Object.prototype.hasOwnProperty.call(regionConfig.rules, key)) {\n var config = regionConfig.rules[key];\n if (typeof config === 'string') {\n config = regionConfig.patterns[config];\n }\n\n // set dualstack endpoint\n if (service.config.useDualstack && util.isDualstackAvailable(service)) {\n config = util.copy(config);\n config.endpoint = config.endpoint.replace(\n /{service}\\.({region}\\.)?/,\n '{service}.dualstack.{region}.'\n );\n }\n\n // set global endpoint\n service.isGlobalEndpoint = !!config.globalEndpoint;\n if (config.signingRegion) {\n service.signingRegion = config.signingRegion;\n }\n\n // signature version\n if (!config.signatureVersion) config.signatureVersion = 'v4';\n\n // merge config\n applyConfig(service, config);\n return;\n }\n }\n}\n\nfunction getEndpointSuffix(region) {\n var regionRegexes = {\n '^(us|eu|ap|sa|ca|me)\\\\-\\\\w+\\\\-\\\\d+$': 'amazonaws.com',\n '^cn\\\\-\\\\w+\\\\-\\\\d+$': 'amazonaws.com.cn',\n '^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$': 'amazonaws.com',\n '^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$': 'c2s.ic.gov',\n '^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$': 'sc2s.sgov.gov'\n };\n var defaultSuffix = 'amazonaws.com';\n var regexes = Object.keys(regionRegexes);\n for (var i = 0; i < regexes.length; i++) {\n var regionPattern = RegExp(regexes[i]);\n var dnsSuffix = regionRegexes[regexes[i]];\n if (regionPattern.test(region)) return dnsSuffix;\n }\n return defaultSuffix;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n configureEndpoint: configureEndpoint,\n getEndpointSuffix: getEndpointSuffix\n};\n","var AWS = require('./core');\nvar AcceptorStateMachine = require('./state_machine');\nvar inherit = AWS.util.inherit;\nvar domain = AWS.util.domain;\nvar jmespath = require('jmespath');\n\n/**\n * @api private\n */\nvar hardErrorStates = {success: 1, error: 1, complete: 1};\n\nfunction isTerminalState(machine) {\n return Object.prototype.hasOwnProperty.call(hardErrorStates, machine._asm.currentState);\n}\n\nvar fsm = new AcceptorStateMachine();\nfsm.setupStates = function() {\n var transition = function(_, done) {\n var self = this;\n self._haltHandlersOnError = false;\n\n self.emit(self._asm.currentState, function(err) {\n if (err) {\n if (isTerminalState(self)) {\n if (domain && self.domain instanceof domain.Domain) {\n err.domainEmitter = self;\n err.domain = self.domain;\n err.domainThrown = false;\n self.domain.emit('error', err);\n } else {\n throw err;\n }\n } else {\n self.response.error = err;\n done(err);\n }\n } else {\n done(self.response.error);\n }\n });\n\n };\n\n this.addState('validate', 'build', 'error', transition);\n this.addState('build', 'afterBuild', 'restart', transition);\n this.addState('afterBuild', 'sign', 'restart', transition);\n this.addState('sign', 'send', 'retry', transition);\n this.addState('retry', 'afterRetry', 'afterRetry', transition);\n this.addState('afterRetry', 'sign', 'error', transition);\n this.addState('send', 'validateResponse', 'retry', transition);\n this.addState('validateResponse', 'extractData', 'extractError', transition);\n this.addState('extractError', 'extractData', 'retry', transition);\n this.addState('extractData', 'success', 'retry', transition);\n this.addState('restart', 'build', 'error', transition);\n this.addState('success', 'complete', 'complete', transition);\n this.addState('error', 'complete', 'complete', transition);\n this.addState('complete', null, null, transition);\n};\nfsm.setupStates();\n\n/**\n * ## Asynchronous Requests\n *\n * All requests made through the SDK are asynchronous and use a\n * callback interface. Each service method that kicks off a request\n * returns an `AWS.Request` object that you can use to register\n * callbacks.\n *\n * For example, the following service method returns the request\n * object as \"request\", which can be used to register callbacks:\n *\n * ```javascript\n * // request is an AWS.Request object\n * var request = ec2.describeInstances();\n *\n * // register callbacks on request to retrieve response data\n * request.on('success', function(response) {\n * console.log(response.data);\n * });\n * ```\n *\n * When a request is ready to be sent, the {send} method should\n * be called:\n *\n * ```javascript\n * request.send();\n * ```\n *\n * Since registered callbacks may or may not be idempotent, requests should only\n * be sent once. To perform the same operation multiple times, you will need to\n * create multiple request objects, each with its own registered callbacks.\n *\n * ## Removing Default Listeners for Events\n *\n * Request objects are built with default listeners for the various events,\n * depending on the service type. In some cases, you may want to remove\n * some built-in listeners to customize behaviour. Doing this requires\n * access to the built-in listener functions, which are exposed through\n * the {AWS.EventListeners.Core} namespace. For instance, you may\n * want to customize the HTTP handler used when sending a request. In this\n * case, you can remove the built-in listener associated with the 'send'\n * event, the {AWS.EventListeners.Core.SEND} listener and add your own.\n *\n * ## Multiple Callbacks and Chaining\n *\n * You can register multiple callbacks on any request object. The\n * callbacks can be registered for different events, or all for the\n * same event. In addition, you can chain callback registration, for\n * example:\n *\n * ```javascript\n * request.\n * on('success', function(response) {\n * console.log(\"Success!\");\n * }).\n * on('error', function(error, response) {\n * console.log(\"Error!\");\n * }).\n * on('complete', function(response) {\n * console.log(\"Always!\");\n * }).\n * send();\n * ```\n *\n * The above example will print either \"Success! Always!\", or \"Error! Always!\",\n * depending on whether the request succeeded or not.\n *\n * @!attribute httpRequest\n * @readonly\n * @!group HTTP Properties\n * @return [AWS.HttpRequest] the raw HTTP request object\n * containing request headers and body information\n * sent by the service.\n *\n * @!attribute startTime\n * @readonly\n * @!group Operation Properties\n * @return [Date] the time that the request started\n *\n * @!group Request Building Events\n *\n * @!event validate(request)\n * Triggered when a request is being validated. Listeners\n * should throw an error if the request should not be sent.\n * @param request [Request] the request object being sent\n * @see AWS.EventListeners.Core.VALIDATE_CREDENTIALS\n * @see AWS.EventListeners.Core.VALIDATE_REGION\n * @example Ensuring that a certain parameter is set before sending a request\n * var req = s3.putObject(params);\n * req.on('validate', function() {\n * if (!req.params.Body.match(/^Hello\\s/)) {\n * throw new Error('Body must start with \"Hello \"');\n * }\n * });\n * req.send(function(err, data) { ... });\n *\n * @!event build(request)\n * Triggered when the request payload is being built. Listeners\n * should fill the necessary information to send the request\n * over HTTP.\n * @param (see AWS.Request~validate)\n * @example Add a custom HTTP header to a request\n * var req = s3.putObject(params);\n * req.on('build', function() {\n * req.httpRequest.headers['Custom-Header'] = 'value';\n * });\n * req.send(function(err, data) { ... });\n *\n * @!event sign(request)\n * Triggered when the request is being signed. Listeners should\n * add the correct authentication headers and/or adjust the body,\n * depending on the authentication mechanism being used.\n * @param (see AWS.Request~validate)\n *\n * @!group Request Sending Events\n *\n * @!event send(response)\n * Triggered when the request is ready to be sent. Listeners\n * should call the underlying transport layer to initiate\n * the sending of the request.\n * @param response [Response] the response object\n * @context [Request] the request object that was sent\n * @see AWS.EventListeners.Core.SEND\n *\n * @!event retry(response)\n * Triggered when a request failed and might need to be retried or redirected.\n * If the response is retryable, the listener should set the\n * `response.error.retryable` property to `true`, and optionally set\n * `response.error.retryDelay` to the millisecond delay for the next attempt.\n * In the case of a redirect, `response.error.redirect` should be set to\n * `true` with `retryDelay` set to an optional delay on the next request.\n *\n * If a listener decides that a request should not be retried,\n * it should set both `retryable` and `redirect` to false.\n *\n * Note that a retryable error will be retried at most\n * {AWS.Config.maxRetries} times (based on the service object's config).\n * Similarly, a request that is redirected will only redirect at most\n * {AWS.Config.maxRedirects} times.\n *\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n * @example Adding a custom retry for a 404 response\n * request.on('retry', function(response) {\n * // this resource is not yet available, wait 10 seconds to get it again\n * if (response.httpResponse.statusCode === 404 && response.error) {\n * response.error.retryable = true; // retry this error\n * response.error.retryDelay = 10000; // wait 10 seconds\n * }\n * });\n *\n * @!group Data Parsing Events\n *\n * @!event extractError(response)\n * Triggered on all non-2xx requests so that listeners can extract\n * error details from the response body. Listeners to this event\n * should set the `response.error` property.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @!event extractData(response)\n * Triggered in successful requests to allow listeners to\n * de-serialize the response body into `response.data`.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @!group Completion Events\n *\n * @!event success(response)\n * Triggered when the request completed successfully.\n * `response.data` will contain the response data and\n * `response.error` will be null.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @!event error(error, response)\n * Triggered when an error occurs at any point during the\n * request. `response.error` will contain details about the error\n * that occurred. `response.data` will be null.\n * @param error [Error] the error object containing details about\n * the error that occurred.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @!event complete(response)\n * Triggered whenever a request cycle completes. `response.error`\n * should be checked, since the request may have failed.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @!group HTTP Events\n *\n * @!event httpHeaders(statusCode, headers, response, statusMessage)\n * Triggered when headers are sent by the remote server\n * @param statusCode [Integer] the HTTP response code\n * @param headers [map] the response headers\n * @param (see AWS.Request~send)\n * @param statusMessage [String] A status message corresponding to the HTTP\n * response code\n * @context (see AWS.Request~send)\n *\n * @!event httpData(chunk, response)\n * Triggered when data is sent by the remote server\n * @param chunk [Buffer] the buffer data containing the next data chunk\n * from the server\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n * @see AWS.EventListeners.Core.HTTP_DATA\n *\n * @!event httpUploadProgress(progress, response)\n * Triggered when the HTTP request has uploaded more data\n * @param progress [map] An object containing the `loaded` and `total` bytes\n * of the request.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n * @note This event will not be emitted in Node.js 0.8.x.\n *\n * @!event httpDownloadProgress(progress, response)\n * Triggered when the HTTP request has downloaded more data\n * @param progress [map] An object containing the `loaded` and `total` bytes\n * of the request.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n * @note This event will not be emitted in Node.js 0.8.x.\n *\n * @!event httpError(error, response)\n * Triggered when the HTTP request failed\n * @param error [Error] the error object that was thrown\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @!event httpDone(response)\n * Triggered when the server is finished sending data\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @see AWS.Response\n */\nAWS.Request = inherit({\n\n /**\n * Creates a request for an operation on a given service with\n * a set of input parameters.\n *\n * @param service [AWS.Service] the service to perform the operation on\n * @param operation [String] the operation to perform on the service\n * @param params [Object] parameters to send to the operation.\n * See the operation's documentation for the format of the\n * parameters.\n */\n constructor: function Request(service, operation, params) {\n var endpoint = service.endpoint;\n var region = service.config.region;\n var customUserAgent = service.config.customUserAgent;\n\n if (service.isGlobalEndpoint) {\n if (service.signingRegion) {\n region = service.signingRegion;\n } else {\n region = 'us-east-1';\n }\n }\n\n this.domain = domain && domain.active;\n this.service = service;\n this.operation = operation;\n this.params = params || {};\n this.httpRequest = new AWS.HttpRequest(endpoint, region);\n this.httpRequest.appendToUserAgent(customUserAgent);\n this.startTime = service.getSkewCorrectedDate();\n\n this.response = new AWS.Response(this);\n this._asm = new AcceptorStateMachine(fsm.states, 'validate');\n this._haltHandlersOnError = false;\n\n AWS.SequentialExecutor.call(this);\n this.emit = this.emitEvent;\n },\n\n /**\n * @!group Sending a Request\n */\n\n /**\n * @overload send(callback = null)\n * Sends the request object.\n *\n * @callback callback function(err, data)\n * If a callback is supplied, it is called when a response is returned\n * from the service.\n * @context [AWS.Request] the request object being sent.\n * @param err [Error] the error object returned from the request.\n * Set to `null` if the request is successful.\n * @param data [Object] the de-serialized data returned from\n * the request. Set to `null` if a request error occurs.\n * @example Sending a request with a callback\n * request = s3.putObject({Bucket: 'bucket', Key: 'key'});\n * request.send(function(err, data) { console.log(err, data); });\n * @example Sending a request with no callback (using event handlers)\n * request = s3.putObject({Bucket: 'bucket', Key: 'key'});\n * request.on('complete', function(response) { ... }); // register a callback\n * request.send();\n */\n send: function send(callback) {\n if (callback) {\n // append to user agent\n this.httpRequest.appendToUserAgent('callback');\n this.on('complete', function (resp) {\n callback.call(resp, resp.error, resp.data);\n });\n }\n this.runTo();\n\n return this.response;\n },\n\n /**\n * @!method promise()\n * Sends the request and returns a 'thenable' promise.\n *\n * Two callbacks can be provided to the `then` method on the returned promise.\n * The first callback will be called if the promise is fulfilled, and the second\n * callback will be called if the promise is rejected.\n * @callback fulfilledCallback function(data)\n * Called if the promise is fulfilled.\n * @param data [Object] the de-serialized data returned from the request.\n * @callback rejectedCallback function(error)\n * Called if the promise is rejected.\n * @param error [Error] the error object returned from the request.\n * @return [Promise] A promise that represents the state of the request.\n * @example Sending a request using promises.\n * var request = s3.putObject({Bucket: 'bucket', Key: 'key'});\n * var result = request.promise();\n * result.then(function(data) { ... }, function(error) { ... });\n */\n\n /**\n * @api private\n */\n build: function build(callback) {\n return this.runTo('send', callback);\n },\n\n /**\n * @api private\n */\n runTo: function runTo(state, done) {\n this._asm.runTo(state, done, this);\n return this;\n },\n\n /**\n * Aborts a request, emitting the error and complete events.\n *\n * @!macro nobrowser\n * @example Aborting a request after sending\n * var params = {\n * Bucket: 'bucket', Key: 'key',\n * Body: Buffer.alloc(1024 * 1024 * 5) // 5MB payload\n * };\n * var request = s3.putObject(params);\n * request.send(function (err, data) {\n * if (err) console.log(\"Error:\", err.code, err.message);\n * else console.log(data);\n * });\n *\n * // abort request in 1 second\n * setTimeout(request.abort.bind(request), 1000);\n *\n * // prints \"Error: RequestAbortedError Request aborted by user\"\n * @return [AWS.Request] the same request object, for chaining.\n * @since v1.4.0\n */\n abort: function abort() {\n this.removeAllListeners('validateResponse');\n this.removeAllListeners('extractError');\n this.on('validateResponse', function addAbortedError(resp) {\n resp.error = AWS.util.error(new Error('Request aborted by user'), {\n code: 'RequestAbortedError', retryable: false\n });\n });\n\n if (this.httpRequest.stream && !this.httpRequest.stream.didCallback) { // abort HTTP stream\n this.httpRequest.stream.abort();\n if (this.httpRequest._abortCallback) {\n this.httpRequest._abortCallback();\n } else {\n this.removeAllListeners('send'); // haven't sent yet, so let's not\n }\n }\n\n return this;\n },\n\n /**\n * Iterates over each page of results given a pageable request, calling\n * the provided callback with each page of data. After all pages have been\n * retrieved, the callback is called with `null` data.\n *\n * @note This operation can generate multiple requests to a service.\n * @example Iterating over multiple pages of objects in an S3 bucket\n * var pages = 1;\n * s3.listObjects().eachPage(function(err, data) {\n * if (err) return;\n * console.log(\"Page\", pages++);\n * console.log(data);\n * });\n * @example Iterating over multiple pages with an asynchronous callback\n * s3.listObjects(params).eachPage(function(err, data, done) {\n * doSomethingAsyncAndOrExpensive(function() {\n * // The next page of results isn't fetched until done is called\n * done();\n * });\n * });\n * @callback callback function(err, data, [doneCallback])\n * Called with each page of resulting data from the request. If the\n * optional `doneCallback` is provided in the function, it must be called\n * when the callback is complete.\n *\n * @param err [Error] an error object, if an error occurred.\n * @param data [Object] a single page of response data. If there is no\n * more data, this object will be `null`.\n * @param doneCallback [Function] an optional done callback. If this\n * argument is defined in the function declaration, it should be called\n * when the next page is ready to be retrieved. This is useful for\n * controlling serial pagination across asynchronous operations.\n * @return [Boolean] if the callback returns `false`, pagination will\n * stop.\n *\n * @see AWS.Request.eachItem\n * @see AWS.Response.nextPage\n * @since v1.4.0\n */\n eachPage: function eachPage(callback) {\n // Make all callbacks async-ish\n callback = AWS.util.fn.makeAsync(callback, 3);\n\n function wrappedCallback(response) {\n callback.call(response, response.error, response.data, function (result) {\n if (result === false) return;\n\n if (response.hasNextPage()) {\n response.nextPage().on('complete', wrappedCallback).send();\n } else {\n callback.call(response, null, null, AWS.util.fn.noop);\n }\n });\n }\n\n this.on('complete', wrappedCallback).send();\n },\n\n /**\n * Enumerates over individual items of a request, paging the responses if\n * necessary.\n *\n * @api experimental\n * @since v1.4.0\n */\n eachItem: function eachItem(callback) {\n var self = this;\n function wrappedCallback(err, data) {\n if (err) return callback(err, null);\n if (data === null) return callback(null, null);\n\n var config = self.service.paginationConfig(self.operation);\n var resultKey = config.resultKey;\n if (Array.isArray(resultKey)) resultKey = resultKey[0];\n var items = jmespath.search(data, resultKey);\n var continueIteration = true;\n AWS.util.arrayEach(items, function(item) {\n continueIteration = callback(null, item);\n if (continueIteration === false) {\n return AWS.util.abort;\n }\n });\n return continueIteration;\n }\n\n this.eachPage(wrappedCallback);\n },\n\n /**\n * @return [Boolean] whether the operation can return multiple pages of\n * response data.\n * @see AWS.Response.eachPage\n * @since v1.4.0\n */\n isPageable: function isPageable() {\n return this.service.paginationConfig(this.operation) ? true : false;\n },\n\n /**\n * Sends the request and converts the request object into a readable stream\n * that can be read from or piped into a writable stream.\n *\n * @note The data read from a readable stream contains only\n * the raw HTTP body contents.\n * @example Manually reading from a stream\n * request.createReadStream().on('data', function(data) {\n * console.log(\"Got data:\", data.toString());\n * });\n * @example Piping a request body into a file\n * var out = fs.createWriteStream('/path/to/outfile.jpg');\n * s3.service.getObject(params).createReadStream().pipe(out);\n * @return [Stream] the readable stream object that can be piped\n * or read from (by registering 'data' event listeners).\n * @!macro nobrowser\n */\n createReadStream: function createReadStream() {\n var streams = AWS.util.stream;\n var req = this;\n var stream = null;\n\n if (AWS.HttpClient.streamsApiVersion === 2) {\n stream = new streams.PassThrough();\n process.nextTick(function() { req.send(); });\n } else {\n stream = new streams.Stream();\n stream.readable = true;\n\n stream.sent = false;\n stream.on('newListener', function(event) {\n if (!stream.sent && event === 'data') {\n stream.sent = true;\n process.nextTick(function() { req.send(); });\n }\n });\n }\n\n this.on('error', function(err) {\n stream.emit('error', err);\n });\n\n this.on('httpHeaders', function streamHeaders(statusCode, headers, resp) {\n if (statusCode < 300) {\n req.removeListener('httpData', AWS.EventListeners.Core.HTTP_DATA);\n req.removeListener('httpError', AWS.EventListeners.Core.HTTP_ERROR);\n req.on('httpError', function streamHttpError(error) {\n resp.error = error;\n resp.error.retryable = false;\n });\n\n var shouldCheckContentLength = false;\n var expectedLen;\n if (req.httpRequest.method !== 'HEAD') {\n expectedLen = parseInt(headers['content-length'], 10);\n }\n if (expectedLen !== undefined && !isNaN(expectedLen) && expectedLen >= 0) {\n shouldCheckContentLength = true;\n var receivedLen = 0;\n }\n\n var checkContentLengthAndEmit = function checkContentLengthAndEmit() {\n if (shouldCheckContentLength && receivedLen !== expectedLen) {\n stream.emit('error', AWS.util.error(\n new Error('Stream content length mismatch. Received ' +\n receivedLen + ' of ' + expectedLen + ' bytes.'),\n { code: 'StreamContentLengthMismatch' }\n ));\n } else if (AWS.HttpClient.streamsApiVersion === 2) {\n stream.end();\n } else {\n stream.emit('end');\n }\n };\n\n var httpStream = resp.httpResponse.createUnbufferedStream();\n\n if (AWS.HttpClient.streamsApiVersion === 2) {\n if (shouldCheckContentLength) {\n var lengthAccumulator = new streams.PassThrough();\n lengthAccumulator._write = function(chunk) {\n if (chunk && chunk.length) {\n receivedLen += chunk.length;\n }\n return streams.PassThrough.prototype._write.apply(this, arguments);\n };\n\n lengthAccumulator.on('end', checkContentLengthAndEmit);\n stream.on('error', function(err) {\n shouldCheckContentLength = false;\n httpStream.unpipe(lengthAccumulator);\n lengthAccumulator.emit('end');\n lengthAccumulator.end();\n });\n httpStream.pipe(lengthAccumulator).pipe(stream, { end: false });\n } else {\n httpStream.pipe(stream);\n }\n } else {\n\n if (shouldCheckContentLength) {\n httpStream.on('data', function(arg) {\n if (arg && arg.length) {\n receivedLen += arg.length;\n }\n });\n }\n\n httpStream.on('data', function(arg) {\n stream.emit('data', arg);\n });\n httpStream.on('end', checkContentLengthAndEmit);\n }\n\n httpStream.on('error', function(err) {\n shouldCheckContentLength = false;\n stream.emit('error', err);\n });\n }\n });\n\n return stream;\n },\n\n /**\n * @param [Array,Response] args This should be the response object,\n * or an array of args to send to the event.\n * @api private\n */\n emitEvent: function emit(eventName, args, done) {\n if (typeof args === 'function') { done = args; args = null; }\n if (!done) done = function() { };\n if (!args) args = this.eventParameters(eventName, this.response);\n\n var origEmit = AWS.SequentialExecutor.prototype.emit;\n origEmit.call(this, eventName, args, function (err) {\n if (err) this.response.error = err;\n done.call(this, err);\n });\n },\n\n /**\n * @api private\n */\n eventParameters: function eventParameters(eventName) {\n switch (eventName) {\n case 'restart':\n case 'validate':\n case 'sign':\n case 'build':\n case 'afterValidate':\n case 'afterBuild':\n return [this];\n case 'error':\n return [this.response.error, this.response];\n default:\n return [this.response];\n }\n },\n\n /**\n * @api private\n */\n presign: function presign(expires, callback) {\n if (!callback && typeof expires === 'function') {\n callback = expires;\n expires = null;\n }\n return new AWS.Signers.Presign().sign(this.toGet(), expires, callback);\n },\n\n /**\n * @api private\n */\n isPresigned: function isPresigned() {\n return Object.prototype.hasOwnProperty.call(this.httpRequest.headers, 'presigned-expires');\n },\n\n /**\n * @api private\n */\n toUnauthenticated: function toUnauthenticated() {\n this._unAuthenticated = true;\n this.removeListener('validate', AWS.EventListeners.Core.VALIDATE_CREDENTIALS);\n this.removeListener('sign', AWS.EventListeners.Core.SIGN);\n return this;\n },\n\n /**\n * @api private\n */\n toGet: function toGet() {\n if (this.service.api.protocol === 'query' ||\n this.service.api.protocol === 'ec2') {\n this.removeListener('build', this.buildAsGet);\n this.addListener('build', this.buildAsGet);\n }\n return this;\n },\n\n /**\n * @api private\n */\n buildAsGet: function buildAsGet(request) {\n request.httpRequest.method = 'GET';\n request.httpRequest.path = request.service.endpoint.path +\n '?' + request.httpRequest.body;\n request.httpRequest.body = '';\n\n // don't need these headers on a GET request\n delete request.httpRequest.headers['Content-Length'];\n delete request.httpRequest.headers['Content-Type'];\n },\n\n /**\n * @api private\n */\n haltHandlersOnError: function haltHandlersOnError() {\n this._haltHandlersOnError = true;\n }\n});\n\n/**\n * @api private\n */\nAWS.Request.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n this.prototype.promise = function promise() {\n var self = this;\n // append to user agent\n this.httpRequest.appendToUserAgent('promise');\n return new PromiseDependency(function(resolve, reject) {\n self.on('complete', function(resp) {\n if (resp.error) {\n reject(resp.error);\n } else {\n // define $response property so that it is not enumerable\n // this prevents circular reference errors when stringifying the JSON object\n resolve(Object.defineProperty(\n resp.data || {},\n '$response',\n {value: resp}\n ));\n }\n });\n self.runTo();\n });\n };\n};\n\n/**\n * @api private\n */\nAWS.Request.deletePromisesFromClass = function deletePromisesFromClass() {\n delete this.prototype.promise;\n};\n\nAWS.util.addPromises(AWS.Request);\n\nAWS.util.mixin(AWS.Request, AWS.SequentialExecutor);\n","/**\n * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You\n * may not use this file except in compliance with the License. A copy of\n * the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n * ANY KIND, either express or implied. See the License for the specific\n * language governing permissions and limitations under the License.\n */\n\nvar AWS = require('./core');\nvar inherit = AWS.util.inherit;\nvar jmespath = require('jmespath');\n\n/**\n * @api private\n */\nfunction CHECK_ACCEPTORS(resp) {\n var waiter = resp.request._waiter;\n var acceptors = waiter.config.acceptors;\n var acceptorMatched = false;\n var state = 'retry';\n\n acceptors.forEach(function(acceptor) {\n if (!acceptorMatched) {\n var matcher = waiter.matchers[acceptor.matcher];\n if (matcher && matcher(resp, acceptor.expected, acceptor.argument)) {\n acceptorMatched = true;\n state = acceptor.state;\n }\n }\n });\n\n if (!acceptorMatched && resp.error) state = 'failure';\n\n if (state === 'success') {\n waiter.setSuccess(resp);\n } else {\n waiter.setError(resp, state === 'retry');\n }\n}\n\n/**\n * @api private\n */\nAWS.ResourceWaiter = inherit({\n /**\n * Waits for a given state on a service object\n * @param service [Service] the service object to wait on\n * @param state [String] the state (defined in waiter configuration) to wait\n * for.\n * @example Create a waiter for running EC2 instances\n * var ec2 = new AWS.EC2;\n * var waiter = new AWS.ResourceWaiter(ec2, 'instanceRunning');\n */\n constructor: function constructor(service, state) {\n this.service = service;\n this.state = state;\n this.loadWaiterConfig(this.state);\n },\n\n service: null,\n\n state: null,\n\n config: null,\n\n matchers: {\n path: function(resp, expected, argument) {\n try {\n var result = jmespath.search(resp.data, argument);\n } catch (err) {\n return false;\n }\n\n return jmespath.strictDeepEqual(result,expected);\n },\n\n pathAll: function(resp, expected, argument) {\n try {\n var results = jmespath.search(resp.data, argument);\n } catch (err) {\n return false;\n }\n\n if (!Array.isArray(results)) results = [results];\n var numResults = results.length;\n if (!numResults) return false;\n for (var ind = 0 ; ind < numResults; ind++) {\n if (!jmespath.strictDeepEqual(results[ind], expected)) {\n return false;\n }\n }\n return true;\n },\n\n pathAny: function(resp, expected, argument) {\n try {\n var results = jmespath.search(resp.data, argument);\n } catch (err) {\n return false;\n }\n\n if (!Array.isArray(results)) results = [results];\n var numResults = results.length;\n for (var ind = 0 ; ind < numResults; ind++) {\n if (jmespath.strictDeepEqual(results[ind], expected)) {\n return true;\n }\n }\n return false;\n },\n\n status: function(resp, expected) {\n var statusCode = resp.httpResponse.statusCode;\n return (typeof statusCode === 'number') && (statusCode === expected);\n },\n\n error: function(resp, expected) {\n if (typeof expected === 'string' && resp.error) {\n return expected === resp.error.code;\n }\n // if expected is not string, can be boolean indicating presence of error\n return expected === !!resp.error;\n }\n },\n\n listeners: new AWS.SequentialExecutor().addNamedListeners(function(add) {\n add('RETRY_CHECK', 'retry', function(resp) {\n var waiter = resp.request._waiter;\n if (resp.error && resp.error.code === 'ResourceNotReady') {\n resp.error.retryDelay = (waiter.config.delay || 0) * 1000;\n }\n });\n\n add('CHECK_OUTPUT', 'extractData', CHECK_ACCEPTORS);\n\n add('CHECK_ERROR', 'extractError', CHECK_ACCEPTORS);\n }),\n\n /**\n * @return [AWS.Request]\n */\n wait: function wait(params, callback) {\n if (typeof params === 'function') {\n callback = params; params = undefined;\n }\n\n if (params && params.$waiter) {\n params = AWS.util.copy(params);\n if (typeof params.$waiter.delay === 'number') {\n this.config.delay = params.$waiter.delay;\n }\n if (typeof params.$waiter.maxAttempts === 'number') {\n this.config.maxAttempts = params.$waiter.maxAttempts;\n }\n delete params.$waiter;\n }\n\n var request = this.service.makeRequest(this.config.operation, params);\n request._waiter = this;\n request.response.maxRetries = this.config.maxAttempts;\n request.addListeners(this.listeners);\n\n if (callback) request.send(callback);\n return request;\n },\n\n setSuccess: function setSuccess(resp) {\n resp.error = null;\n resp.data = resp.data || {};\n resp.request.removeAllListeners('extractData');\n },\n\n setError: function setError(resp, retryable) {\n resp.data = null;\n resp.error = AWS.util.error(resp.error || new Error(), {\n code: 'ResourceNotReady',\n message: 'Resource is not in the state ' + this.state,\n retryable: retryable\n });\n },\n\n /**\n * Loads waiter configuration from API configuration\n *\n * @api private\n */\n loadWaiterConfig: function loadWaiterConfig(state) {\n if (!this.service.api.waiters[state]) {\n throw new AWS.util.error(new Error(), {\n code: 'StateNotFoundError',\n message: 'State ' + state + ' not found.'\n });\n }\n\n this.config = AWS.util.copy(this.service.api.waiters[state]);\n }\n});\n","var AWS = require('./core');\nvar inherit = AWS.util.inherit;\nvar jmespath = require('jmespath');\n\n/**\n * This class encapsulates the response information\n * from a service request operation sent through {AWS.Request}.\n * The response object has two main properties for getting information\n * back from a request:\n *\n * ## The `data` property\n *\n * The `response.data` property contains the serialized object data\n * retrieved from the service request. For instance, for an\n * Amazon DynamoDB `listTables` method call, the response data might\n * look like:\n *\n * ```\n * > resp.data\n * { TableNames:\n * [ 'table1', 'table2', ... ] }\n * ```\n *\n * The `data` property can be null if an error occurs (see below).\n *\n * ## The `error` property\n *\n * In the event of a service error (or transfer error), the\n * `response.error` property will be filled with the given\n * error data in the form:\n *\n * ```\n * { code: 'SHORT_UNIQUE_ERROR_CODE',\n * message: 'Some human readable error message' }\n * ```\n *\n * In the case of an error, the `data` property will be `null`.\n * Note that if you handle events that can be in a failure state,\n * you should always check whether `response.error` is set\n * before attempting to access the `response.data` property.\n *\n * @!attribute data\n * @readonly\n * @!group Data Properties\n * @note Inside of a {AWS.Request~httpData} event, this\n * property contains a single raw packet instead of the\n * full de-serialized service response.\n * @return [Object] the de-serialized response data\n * from the service.\n *\n * @!attribute error\n * An structure containing information about a service\n * or networking error.\n * @readonly\n * @!group Data Properties\n * @note This attribute is only filled if a service or\n * networking error occurs.\n * @return [Error]\n * * code [String] a unique short code representing the\n * error that was emitted.\n * * message [String] a longer human readable error message\n * * retryable [Boolean] whether the error message is\n * retryable.\n * * statusCode [Numeric] in the case of a request that reached the service,\n * this value contains the response status code.\n * * time [Date] the date time object when the error occurred.\n * * hostname [String] set when a networking error occurs to easily\n * identify the endpoint of the request.\n * * region [String] set when a networking error occurs to easily\n * identify the region of the request.\n *\n * @!attribute requestId\n * @readonly\n * @!group Data Properties\n * @return [String] the unique request ID associated with the response.\n * Log this value when debugging requests for AWS support.\n *\n * @!attribute retryCount\n * @readonly\n * @!group Operation Properties\n * @return [Integer] the number of retries that were\n * attempted before the request was completed.\n *\n * @!attribute redirectCount\n * @readonly\n * @!group Operation Properties\n * @return [Integer] the number of redirects that were\n * followed before the request was completed.\n *\n * @!attribute httpResponse\n * @readonly\n * @!group HTTP Properties\n * @return [AWS.HttpResponse] the raw HTTP response object\n * containing the response headers and body information\n * from the server.\n *\n * @see AWS.Request\n */\nAWS.Response = inherit({\n\n /**\n * @api private\n */\n constructor: function Response(request) {\n this.request = request;\n this.data = null;\n this.error = null;\n this.retryCount = 0;\n this.redirectCount = 0;\n this.httpResponse = new AWS.HttpResponse();\n if (request) {\n this.maxRetries = request.service.numRetries();\n this.maxRedirects = request.service.config.maxRedirects;\n }\n },\n\n /**\n * Creates a new request for the next page of response data, calling the\n * callback with the page data if a callback is provided.\n *\n * @callback callback function(err, data)\n * Called when a page of data is returned from the next request.\n *\n * @param err [Error] an error object, if an error occurred in the request\n * @param data [Object] the next page of data, or null, if there are no\n * more pages left.\n * @return [AWS.Request] the request object for the next page of data\n * @return [null] if no callback is provided and there are no pages left\n * to retrieve.\n * @since v1.4.0\n */\n nextPage: function nextPage(callback) {\n var config;\n var service = this.request.service;\n var operation = this.request.operation;\n try {\n config = service.paginationConfig(operation, true);\n } catch (e) { this.error = e; }\n\n if (!this.hasNextPage()) {\n if (callback) callback(this.error, null);\n else if (this.error) throw this.error;\n return null;\n }\n\n var params = AWS.util.copy(this.request.params);\n if (!this.nextPageTokens) {\n return callback ? callback(null, null) : null;\n } else {\n var inputTokens = config.inputToken;\n if (typeof inputTokens === 'string') inputTokens = [inputTokens];\n for (var i = 0; i < inputTokens.length; i++) {\n params[inputTokens[i]] = this.nextPageTokens[i];\n }\n return service.makeRequest(this.request.operation, params, callback);\n }\n },\n\n /**\n * @return [Boolean] whether more pages of data can be returned by further\n * requests\n * @since v1.4.0\n */\n hasNextPage: function hasNextPage() {\n this.cacheNextPageTokens();\n if (this.nextPageTokens) return true;\n if (this.nextPageTokens === undefined) return undefined;\n else return false;\n },\n\n /**\n * @api private\n */\n cacheNextPageTokens: function cacheNextPageTokens() {\n if (Object.prototype.hasOwnProperty.call(this, 'nextPageTokens')) return this.nextPageTokens;\n this.nextPageTokens = undefined;\n\n var config = this.request.service.paginationConfig(this.request.operation);\n if (!config) return this.nextPageTokens;\n\n this.nextPageTokens = null;\n if (config.moreResults) {\n if (!jmespath.search(this.data, config.moreResults)) {\n return this.nextPageTokens;\n }\n }\n\n var exprs = config.outputToken;\n if (typeof exprs === 'string') exprs = [exprs];\n AWS.util.arrayEach.call(this, exprs, function (expr) {\n var output = jmespath.search(this.data, expr);\n if (output) {\n this.nextPageTokens = this.nextPageTokens || [];\n this.nextPageTokens.push(output);\n }\n });\n\n return this.nextPageTokens;\n }\n\n});\n","var AWS = require('../core');\nvar byteLength = AWS.util.string.byteLength;\nvar Buffer = AWS.util.Buffer;\n\n/**\n * The managed uploader allows for easy and efficient uploading of buffers,\n * blobs, or streams, using a configurable amount of concurrency to perform\n * multipart uploads where possible. This abstraction also enables uploading\n * streams of unknown size due to the use of multipart uploads.\n *\n * To construct a managed upload object, see the {constructor} function.\n *\n * ## Tracking upload progress\n *\n * The managed upload object can also track progress by attaching an\n * 'httpUploadProgress' listener to the upload manager. This event is similar\n * to {AWS.Request~httpUploadProgress} but groups all concurrent upload progress\n * into a single event. See {AWS.S3.ManagedUpload~httpUploadProgress} for more\n * information.\n *\n * ## Handling Multipart Cleanup\n *\n * By default, this class will automatically clean up any multipart uploads\n * when an individual part upload fails. This behavior can be disabled in order\n * to manually handle failures by setting the `leavePartsOnError` configuration\n * option to `true` when initializing the upload object.\n *\n * @!event httpUploadProgress(progress)\n * Triggered when the uploader has uploaded more data.\n * @note The `total` property may not be set if the stream being uploaded has\n * not yet finished chunking. In this case the `total` will be undefined\n * until the total stream size is known.\n * @note This event will not be emitted in Node.js 0.8.x.\n * @param progress [map] An object containing the `loaded` and `total` bytes\n * of the request and the `key` of the S3 object. Note that `total` may be undefined until the payload\n * size is known.\n * @context (see AWS.Request~send)\n */\nAWS.S3.ManagedUpload = AWS.util.inherit({\n /**\n * Creates a managed upload object with a set of configuration options.\n *\n * @note A \"Body\" parameter is required to be set prior to calling {send}.\n * @note In Node.js, sending \"Body\" as {https://nodejs.org/dist/latest/docs/api/stream.html#stream_object_mode object-mode stream}\n * may result in upload hangs. Using buffer stream is preferable.\n * @option options params [map] a map of parameters to pass to the upload\n * requests. The \"Body\" parameter is required to be specified either on\n * the service or in the params option.\n * @note ContentMD5 should not be provided when using the managed upload object.\n * Instead, setting \"computeChecksums\" to true will enable automatic ContentMD5 generation\n * by the managed upload object.\n * @option options queueSize [Number] (4) the size of the concurrent queue\n * manager to upload parts in parallel. Set to 1 for synchronous uploading\n * of parts. Note that the uploader will buffer at most queueSize * partSize\n * bytes into memory at any given time.\n * @option options partSize [Number] (5mb) the size in bytes for each\n * individual part to be uploaded. Adjust the part size to ensure the number\n * of parts does not exceed {maxTotalParts}. See {minPartSize} for the\n * minimum allowed part size.\n * @option options leavePartsOnError [Boolean] (false) whether to abort the\n * multipart upload if an error occurs. Set to true if you want to handle\n * failures manually.\n * @option options service [AWS.S3] an optional S3 service object to use for\n * requests. This object might have bound parameters used by the uploader.\n * @option options tags [Array] The tags to apply to the uploaded object.\n * Each tag should have a `Key` and `Value` keys.\n * @example Creating a default uploader for a stream object\n * var upload = new AWS.S3.ManagedUpload({\n * params: {Bucket: 'bucket', Key: 'key', Body: stream}\n * });\n * @example Creating an uploader with concurrency of 1 and partSize of 10mb\n * var upload = new AWS.S3.ManagedUpload({\n * partSize: 10 * 1024 * 1024, queueSize: 1,\n * params: {Bucket: 'bucket', Key: 'key', Body: stream}\n * });\n * @example Creating an uploader with tags\n * var upload = new AWS.S3.ManagedUpload({\n * params: {Bucket: 'bucket', Key: 'key', Body: stream},\n * tags: [{Key: 'tag1', Value: 'value1'}, {Key: 'tag2', Value: 'value2'}]\n * });\n * @see send\n */\n constructor: function ManagedUpload(options) {\n var self = this;\n AWS.SequentialExecutor.call(self);\n self.body = null;\n self.sliceFn = null;\n self.callback = null;\n self.parts = {};\n self.completeInfo = [];\n self.fillQueue = function() {\n self.callback(new Error('Unsupported body payload ' + typeof self.body));\n };\n\n self.configure(options);\n },\n\n /**\n * @api private\n */\n configure: function configure(options) {\n options = options || {};\n this.partSize = this.minPartSize;\n\n if (options.queueSize) this.queueSize = options.queueSize;\n if (options.partSize) this.partSize = options.partSize;\n if (options.leavePartsOnError) this.leavePartsOnError = true;\n if (options.tags) {\n if (!Array.isArray(options.tags)) {\n throw new Error('Tags must be specified as an array; ' +\n typeof options.tags + ' provided.');\n }\n this.tags = options.tags;\n }\n\n if (this.partSize < this.minPartSize) {\n throw new Error('partSize must be greater than ' +\n this.minPartSize);\n }\n\n this.service = options.service;\n this.bindServiceObject(options.params);\n this.validateBody();\n this.adjustTotalBytes();\n },\n\n /**\n * @api private\n */\n leavePartsOnError: false,\n\n /**\n * @api private\n */\n queueSize: 4,\n\n /**\n * @api private\n */\n partSize: null,\n\n /**\n * @readonly\n * @return [Number] the minimum number of bytes for an individual part\n * upload.\n */\n minPartSize: 1024 * 1024 * 5,\n\n /**\n * @readonly\n * @return [Number] the maximum allowed number of parts in a multipart upload.\n */\n maxTotalParts: 10000,\n\n /**\n * Initiates the managed upload for the payload.\n *\n * @callback callback function(err, data)\n * @param err [Error] an error or null if no error occurred.\n * @param data [map] The response data from the successful upload:\n * * `Location` (String) the URL of the uploaded object\n * * `ETag` (String) the ETag of the uploaded object\n * * `Bucket` (String) the bucket to which the object was uploaded\n * * `Key` (String) the key to which the object was uploaded\n * @example Sending a managed upload object\n * var params = {Bucket: 'bucket', Key: 'key', Body: stream};\n * var upload = new AWS.S3.ManagedUpload({params: params});\n * upload.send(function(err, data) {\n * console.log(err, data);\n * });\n */\n send: function(callback) {\n var self = this;\n self.failed = false;\n self.callback = callback || function(err) { if (err) throw err; };\n\n var runFill = true;\n if (self.sliceFn) {\n self.fillQueue = self.fillBuffer;\n } else if (AWS.util.isNode()) {\n var Stream = AWS.util.stream.Stream;\n if (self.body instanceof Stream) {\n runFill = false;\n self.fillQueue = self.fillStream;\n self.partBuffers = [];\n self.body.\n on('error', function(err) { self.cleanup(err); }).\n on('readable', function() { self.fillQueue(); }).\n on('end', function() {\n self.isDoneChunking = true;\n self.numParts = self.totalPartNumbers;\n self.fillQueue.call(self);\n\n if (self.isDoneChunking && self.totalPartNumbers >= 1 && self.doneParts === self.numParts) {\n self.finishMultiPart();\n }\n });\n }\n }\n\n if (runFill) self.fillQueue.call(self);\n },\n\n /**\n * @!method promise()\n * Returns a 'thenable' promise.\n *\n * Two callbacks can be provided to the `then` method on the returned promise.\n * The first callback will be called if the promise is fulfilled, and the second\n * callback will be called if the promise is rejected.\n * @callback fulfilledCallback function(data)\n * Called if the promise is fulfilled.\n * @param data [map] The response data from the successful upload:\n * `Location` (String) the URL of the uploaded object\n * `ETag` (String) the ETag of the uploaded object\n * `Bucket` (String) the bucket to which the object was uploaded\n * `Key` (String) the key to which the object was uploaded\n * @callback rejectedCallback function(err)\n * Called if the promise is rejected.\n * @param err [Error] an error or null if no error occurred.\n * @return [Promise] A promise that represents the state of the upload request.\n * @example Sending an upload request using promises.\n * var upload = s3.upload({Bucket: 'bucket', Key: 'key', Body: stream});\n * var promise = upload.promise();\n * promise.then(function(data) { ... }, function(err) { ... });\n */\n\n /**\n * Aborts a managed upload, including all concurrent upload requests.\n * @note By default, calling this function will cleanup a multipart upload\n * if one was created. To leave the multipart upload around after aborting\n * a request, configure `leavePartsOnError` to `true` in the {constructor}.\n * @note Calling {abort} in the browser environment will not abort any requests\n * that are already in flight. If a multipart upload was created, any parts\n * not yet uploaded will not be sent, and the multipart upload will be cleaned up.\n * @example Aborting an upload\n * var params = {\n * Bucket: 'bucket', Key: 'key',\n * Body: Buffer.alloc(1024 * 1024 * 25) // 25MB payload\n * };\n * var upload = s3.upload(params);\n * upload.send(function (err, data) {\n * if (err) console.log(\"Error:\", err.code, err.message);\n * else console.log(data);\n * });\n *\n * // abort request in 1 second\n * setTimeout(upload.abort.bind(upload), 1000);\n */\n abort: function() {\n var self = this;\n //abort putObject request\n if (self.isDoneChunking === true && self.totalPartNumbers === 1 && self.singlePart) {\n self.singlePart.abort();\n } else {\n self.cleanup(AWS.util.error(new Error('Request aborted by user'), {\n code: 'RequestAbortedError', retryable: false\n }));\n }\n },\n\n /**\n * @api private\n */\n validateBody: function validateBody() {\n var self = this;\n self.body = self.service.config.params.Body;\n if (typeof self.body === 'string') {\n self.body = AWS.util.buffer.toBuffer(self.body);\n } else if (!self.body) {\n throw new Error('params.Body is required');\n }\n self.sliceFn = AWS.util.arraySliceFn(self.body);\n },\n\n /**\n * @api private\n */\n bindServiceObject: function bindServiceObject(params) {\n params = params || {};\n var self = this;\n // bind parameters to new service object\n if (!self.service) {\n self.service = new AWS.S3({params: params});\n } else {\n // Create a new S3 client from the supplied client's constructor.\n var service = self.service;\n var config = AWS.util.copy(service.config);\n config.signatureVersion = service.getSignatureVersion();\n self.service = new service.constructor.__super__(config);\n self.service.config.params =\n AWS.util.merge(self.service.config.params || {}, params);\n Object.defineProperty(self.service, '_originalConfig', {\n get: function() { return service._originalConfig; },\n enumerable: false,\n configurable: true\n });\n }\n },\n\n /**\n * @api private\n */\n adjustTotalBytes: function adjustTotalBytes() {\n var self = this;\n try { // try to get totalBytes\n self.totalBytes = byteLength(self.body);\n } catch (e) { }\n\n // try to adjust partSize if we know payload length\n if (self.totalBytes) {\n var newPartSize = Math.ceil(self.totalBytes / self.maxTotalParts);\n if (newPartSize > self.partSize) self.partSize = newPartSize;\n } else {\n self.totalBytes = undefined;\n }\n },\n\n /**\n * @api private\n */\n isDoneChunking: false,\n\n /**\n * @api private\n */\n partPos: 0,\n\n /**\n * @api private\n */\n totalChunkedBytes: 0,\n\n /**\n * @api private\n */\n totalUploadedBytes: 0,\n\n /**\n * @api private\n */\n totalBytes: undefined,\n\n /**\n * @api private\n */\n numParts: 0,\n\n /**\n * @api private\n */\n totalPartNumbers: 0,\n\n /**\n * @api private\n */\n activeParts: 0,\n\n /**\n * @api private\n */\n doneParts: 0,\n\n /**\n * @api private\n */\n parts: null,\n\n /**\n * @api private\n */\n completeInfo: null,\n\n /**\n * @api private\n */\n failed: false,\n\n /**\n * @api private\n */\n multipartReq: null,\n\n /**\n * @api private\n */\n partBuffers: null,\n\n /**\n * @api private\n */\n partBufferLength: 0,\n\n /**\n * @api private\n */\n fillBuffer: function fillBuffer() {\n var self = this;\n var bodyLen = byteLength(self.body);\n\n if (bodyLen === 0) {\n self.isDoneChunking = true;\n self.numParts = 1;\n self.nextChunk(self.body);\n return;\n }\n\n while (self.activeParts < self.queueSize && self.partPos < bodyLen) {\n var endPos = Math.min(self.partPos + self.partSize, bodyLen);\n var buf = self.sliceFn.call(self.body, self.partPos, endPos);\n self.partPos += self.partSize;\n\n if (byteLength(buf) < self.partSize || self.partPos === bodyLen) {\n self.isDoneChunking = true;\n self.numParts = self.totalPartNumbers + 1;\n }\n self.nextChunk(buf);\n }\n },\n\n /**\n * @api private\n */\n fillStream: function fillStream() {\n var self = this;\n if (self.activeParts >= self.queueSize) return;\n\n var buf = self.body.read(self.partSize - self.partBufferLength) ||\n self.body.read();\n if (buf) {\n self.partBuffers.push(buf);\n self.partBufferLength += buf.length;\n self.totalChunkedBytes += buf.length;\n }\n\n if (self.partBufferLength >= self.partSize) {\n // if we have single buffer we avoid copyfull concat\n var pbuf = self.partBuffers.length === 1 ?\n self.partBuffers[0] : Buffer.concat(self.partBuffers);\n self.partBuffers = [];\n self.partBufferLength = 0;\n\n // if we have more than partSize, push the rest back on the queue\n if (pbuf.length > self.partSize) {\n var rest = pbuf.slice(self.partSize);\n self.partBuffers.push(rest);\n self.partBufferLength += rest.length;\n pbuf = pbuf.slice(0, self.partSize);\n }\n\n self.nextChunk(pbuf);\n }\n\n if (self.isDoneChunking && !self.isDoneSending) {\n // if we have single buffer we avoid copyfull concat\n pbuf = self.partBuffers.length === 1 ?\n self.partBuffers[0] : Buffer.concat(self.partBuffers);\n self.partBuffers = [];\n self.partBufferLength = 0;\n self.totalBytes = self.totalChunkedBytes;\n self.isDoneSending = true;\n\n if (self.numParts === 0 || pbuf.length > 0) {\n self.numParts++;\n self.nextChunk(pbuf);\n }\n }\n\n self.body.read(0);\n },\n\n /**\n * @api private\n */\n nextChunk: function nextChunk(chunk) {\n var self = this;\n if (self.failed) return null;\n\n var partNumber = ++self.totalPartNumbers;\n if (self.isDoneChunking && partNumber === 1) {\n var params = {Body: chunk};\n if (this.tags) {\n params.Tagging = this.getTaggingHeader();\n }\n var req = self.service.putObject(params);\n req._managedUpload = self;\n req.on('httpUploadProgress', self.progress).send(self.finishSinglePart);\n self.singlePart = req; //save the single part request\n return null;\n } else if (self.service.config.params.ContentMD5) {\n var err = AWS.util.error(new Error('The Content-MD5 you specified is invalid for multi-part uploads.'), {\n code: 'InvalidDigest', retryable: false\n });\n\n self.cleanup(err);\n return null;\n }\n\n if (self.completeInfo[partNumber] && self.completeInfo[partNumber].ETag !== null) {\n return null; // Already uploaded this part.\n }\n\n self.activeParts++;\n if (!self.service.config.params.UploadId) {\n\n if (!self.multipartReq) { // create multipart\n self.multipartReq = self.service.createMultipartUpload();\n self.multipartReq.on('success', function(resp) {\n self.service.config.params.UploadId = resp.data.UploadId;\n self.multipartReq = null;\n });\n self.queueChunks(chunk, partNumber);\n self.multipartReq.on('error', function(err) {\n self.cleanup(err);\n });\n self.multipartReq.send();\n } else {\n self.queueChunks(chunk, partNumber);\n }\n } else { // multipart is created, just send\n self.uploadPart(chunk, partNumber);\n }\n },\n\n /**\n * @api private\n */\n getTaggingHeader: function getTaggingHeader() {\n var kvPairStrings = [];\n for (var i = 0; i < this.tags.length; i++) {\n kvPairStrings.push(AWS.util.uriEscape(this.tags[i].Key) + '=' +\n AWS.util.uriEscape(this.tags[i].Value));\n }\n\n return kvPairStrings.join('&');\n },\n\n /**\n * @api private\n */\n uploadPart: function uploadPart(chunk, partNumber) {\n var self = this;\n\n var partParams = {\n Body: chunk,\n ContentLength: AWS.util.string.byteLength(chunk),\n PartNumber: partNumber\n };\n\n var partInfo = {ETag: null, PartNumber: partNumber};\n self.completeInfo[partNumber] = partInfo;\n\n var req = self.service.uploadPart(partParams);\n self.parts[partNumber] = req;\n req._lastUploadedBytes = 0;\n req._managedUpload = self;\n req.on('httpUploadProgress', self.progress);\n req.send(function(err, data) {\n delete self.parts[partParams.PartNumber];\n self.activeParts--;\n\n if (!err && (!data || !data.ETag)) {\n var message = 'No access to ETag property on response.';\n if (AWS.util.isBrowser()) {\n message += ' Check CORS configuration to expose ETag header.';\n }\n\n err = AWS.util.error(new Error(message), {\n code: 'ETagMissing', retryable: false\n });\n }\n if (err) return self.cleanup(err);\n //prevent sending part being returned twice (https://github.com/aws/aws-sdk-js/issues/2304)\n if (self.completeInfo[partNumber] && self.completeInfo[partNumber].ETag !== null) return null;\n partInfo.ETag = data.ETag;\n self.doneParts++;\n if (self.isDoneChunking && self.doneParts === self.numParts) {\n self.finishMultiPart();\n } else {\n self.fillQueue.call(self);\n }\n });\n },\n\n /**\n * @api private\n */\n queueChunks: function queueChunks(chunk, partNumber) {\n var self = this;\n self.multipartReq.on('success', function() {\n self.uploadPart(chunk, partNumber);\n });\n },\n\n /**\n * @api private\n */\n cleanup: function cleanup(err) {\n var self = this;\n if (self.failed) return;\n\n // clean up stream\n if (typeof self.body.removeAllListeners === 'function' &&\n typeof self.body.resume === 'function') {\n self.body.removeAllListeners('readable');\n self.body.removeAllListeners('end');\n self.body.resume();\n }\n\n // cleanup multipartReq listeners\n if (self.multipartReq) {\n self.multipartReq.removeAllListeners('success');\n self.multipartReq.removeAllListeners('error');\n self.multipartReq.removeAllListeners('complete');\n delete self.multipartReq;\n }\n\n if (self.service.config.params.UploadId && !self.leavePartsOnError) {\n self.service.abortMultipartUpload().send();\n } else if (self.leavePartsOnError) {\n self.isDoneChunking = false;\n }\n\n AWS.util.each(self.parts, function(partNumber, part) {\n part.removeAllListeners('complete');\n part.abort();\n });\n\n self.activeParts = 0;\n self.partPos = 0;\n self.numParts = 0;\n self.totalPartNumbers = 0;\n self.parts = {};\n self.failed = true;\n self.callback(err);\n },\n\n /**\n * @api private\n */\n finishMultiPart: function finishMultiPart() {\n var self = this;\n var completeParams = { MultipartUpload: { Parts: self.completeInfo.slice(1) } };\n self.service.completeMultipartUpload(completeParams, function(err, data) {\n if (err) {\n return self.cleanup(err);\n }\n\n if (data && typeof data.Location === 'string') {\n data.Location = data.Location.replace(/%2F/g, '/');\n }\n\n if (Array.isArray(self.tags)) {\n for (var i = 0; i < self.tags.length; i++) {\n self.tags[i].Value = String(self.tags[i].Value);\n }\n self.service.putObjectTagging(\n {Tagging: {TagSet: self.tags}},\n function(e, d) {\n if (e) {\n self.callback(e);\n } else {\n self.callback(e, data);\n }\n }\n );\n } else {\n self.callback(err, data);\n }\n });\n },\n\n /**\n * @api private\n */\n finishSinglePart: function finishSinglePart(err, data) {\n var upload = this.request._managedUpload;\n var httpReq = this.request.httpRequest;\n var endpoint = httpReq.endpoint;\n if (err) return upload.callback(err);\n data.Location =\n [endpoint.protocol, '//', endpoint.host, httpReq.path].join('');\n data.key = this.request.params.Key; // will stay undocumented\n data.Key = this.request.params.Key;\n data.Bucket = this.request.params.Bucket;\n upload.callback(err, data);\n },\n\n /**\n * @api private\n */\n progress: function progress(info) {\n var upload = this._managedUpload;\n if (this.operation === 'putObject') {\n info.part = 1;\n info.key = this.params.Key;\n } else {\n upload.totalUploadedBytes += info.loaded - this._lastUploadedBytes;\n this._lastUploadedBytes = info.loaded;\n info = {\n loaded: upload.totalUploadedBytes,\n total: upload.totalBytes,\n part: this.params.PartNumber,\n key: this.params.Key\n };\n }\n upload.emit('httpUploadProgress', [info]);\n }\n});\n\nAWS.util.mixin(AWS.S3.ManagedUpload, AWS.SequentialExecutor);\n\n/**\n * @api private\n */\nAWS.S3.ManagedUpload.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n this.prototype.promise = AWS.util.promisifyMethod('send', PromiseDependency);\n};\n\n/**\n * @api private\n */\nAWS.S3.ManagedUpload.deletePromisesFromClass = function deletePromisesFromClass() {\n delete this.prototype.promise;\n};\n\nAWS.util.addPromises(AWS.S3.ManagedUpload);\n\n/**\n * @api private\n */\nmodule.exports = AWS.S3.ManagedUpload;\n","var AWS = require('./core');\n\n/**\n * @api private\n * @!method on(eventName, callback)\n * Registers an event listener callback for the event given by `eventName`.\n * Parameters passed to the callback function depend on the individual event\n * being triggered. See the event documentation for those parameters.\n *\n * @param eventName [String] the event name to register the listener for\n * @param callback [Function] the listener callback function\n * @param toHead [Boolean] attach the listener callback to the head of callback array if set to true.\n * Default to be false.\n * @return [AWS.SequentialExecutor] the same object for chaining\n */\nAWS.SequentialExecutor = AWS.util.inherit({\n\n constructor: function SequentialExecutor() {\n this._events = {};\n },\n\n /**\n * @api private\n */\n listeners: function listeners(eventName) {\n return this._events[eventName] ? this._events[eventName].slice(0) : [];\n },\n\n on: function on(eventName, listener, toHead) {\n if (this._events[eventName]) {\n toHead ?\n this._events[eventName].unshift(listener) :\n this._events[eventName].push(listener);\n } else {\n this._events[eventName] = [listener];\n }\n return this;\n },\n\n onAsync: function onAsync(eventName, listener, toHead) {\n listener._isAsync = true;\n return this.on(eventName, listener, toHead);\n },\n\n removeListener: function removeListener(eventName, listener) {\n var listeners = this._events[eventName];\n if (listeners) {\n var length = listeners.length;\n var position = -1;\n for (var i = 0; i < length; ++i) {\n if (listeners[i] === listener) {\n position = i;\n }\n }\n if (position > -1) {\n listeners.splice(position, 1);\n }\n }\n return this;\n },\n\n removeAllListeners: function removeAllListeners(eventName) {\n if (eventName) {\n delete this._events[eventName];\n } else {\n this._events = {};\n }\n return this;\n },\n\n /**\n * @api private\n */\n emit: function emit(eventName, eventArgs, doneCallback) {\n if (!doneCallback) doneCallback = function() { };\n var listeners = this.listeners(eventName);\n var count = listeners.length;\n this.callListeners(listeners, eventArgs, doneCallback);\n return count > 0;\n },\n\n /**\n * @api private\n */\n callListeners: function callListeners(listeners, args, doneCallback, prevError) {\n var self = this;\n var error = prevError || null;\n\n function callNextListener(err) {\n if (err) {\n error = AWS.util.error(error || new Error(), err);\n if (self._haltHandlersOnError) {\n return doneCallback.call(self, error);\n }\n }\n self.callListeners(listeners, args, doneCallback, error);\n }\n\n while (listeners.length > 0) {\n var listener = listeners.shift();\n if (listener._isAsync) { // asynchronous listener\n listener.apply(self, args.concat([callNextListener]));\n return; // stop here, callNextListener will continue\n } else { // synchronous listener\n try {\n listener.apply(self, args);\n } catch (err) {\n error = AWS.util.error(error || new Error(), err);\n }\n if (error && self._haltHandlersOnError) {\n doneCallback.call(self, error);\n return;\n }\n }\n }\n doneCallback.call(self, error);\n },\n\n /**\n * Adds or copies a set of listeners from another list of\n * listeners or SequentialExecutor object.\n *\n * @param listeners [map>, AWS.SequentialExecutor]\n * a list of events and callbacks, or an event emitter object\n * containing listeners to add to this emitter object.\n * @return [AWS.SequentialExecutor] the emitter object, for chaining.\n * @example Adding listeners from a map of listeners\n * emitter.addListeners({\n * event1: [function() { ... }, function() { ... }],\n * event2: [function() { ... }]\n * });\n * emitter.emit('event1'); // emitter has event1\n * emitter.emit('event2'); // emitter has event2\n * @example Adding listeners from another emitter object\n * var emitter1 = new AWS.SequentialExecutor();\n * emitter1.on('event1', function() { ... });\n * emitter1.on('event2', function() { ... });\n * var emitter2 = new AWS.SequentialExecutor();\n * emitter2.addListeners(emitter1);\n * emitter2.emit('event1'); // emitter2 has event1\n * emitter2.emit('event2'); // emitter2 has event2\n */\n addListeners: function addListeners(listeners) {\n var self = this;\n\n // extract listeners if parameter is an SequentialExecutor object\n if (listeners._events) listeners = listeners._events;\n\n AWS.util.each(listeners, function(event, callbacks) {\n if (typeof callbacks === 'function') callbacks = [callbacks];\n AWS.util.arrayEach(callbacks, function(callback) {\n self.on(event, callback);\n });\n });\n\n return self;\n },\n\n /**\n * Registers an event with {on} and saves the callback handle function\n * as a property on the emitter object using a given `name`.\n *\n * @param name [String] the property name to set on this object containing\n * the callback function handle so that the listener can be removed in\n * the future.\n * @param (see on)\n * @return (see on)\n * @example Adding a named listener DATA_CALLBACK\n * var listener = function() { doSomething(); };\n * emitter.addNamedListener('DATA_CALLBACK', 'data', listener);\n *\n * // the following prints: true\n * console.log(emitter.DATA_CALLBACK == listener);\n */\n addNamedListener: function addNamedListener(name, eventName, callback, toHead) {\n this[name] = callback;\n this.addListener(eventName, callback, toHead);\n return this;\n },\n\n /**\n * @api private\n */\n addNamedAsyncListener: function addNamedAsyncListener(name, eventName, callback, toHead) {\n callback._isAsync = true;\n return this.addNamedListener(name, eventName, callback, toHead);\n },\n\n /**\n * Helper method to add a set of named listeners using\n * {addNamedListener}. The callback contains a parameter\n * with a handle to the `addNamedListener` method.\n *\n * @callback callback function(add)\n * The callback function is called immediately in order to provide\n * the `add` function to the block. This simplifies the addition of\n * a large group of named listeners.\n * @param add [Function] the {addNamedListener} function to call\n * when registering listeners.\n * @example Adding a set of named listeners\n * emitter.addNamedListeners(function(add) {\n * add('DATA_CALLBACK', 'data', function() { ... });\n * add('OTHER', 'otherEvent', function() { ... });\n * add('LAST', 'lastEvent', function() { ... });\n * });\n *\n * // these properties are now set:\n * emitter.DATA_CALLBACK;\n * emitter.OTHER;\n * emitter.LAST;\n */\n addNamedListeners: function addNamedListeners(callback) {\n var self = this;\n callback(\n function() {\n self.addNamedListener.apply(self, arguments);\n },\n function() {\n self.addNamedAsyncListener.apply(self, arguments);\n }\n );\n return this;\n }\n});\n\n/**\n * {on} is the prefered method.\n * @api private\n */\nAWS.SequentialExecutor.prototype.addListener = AWS.SequentialExecutor.prototype.on;\n\n/**\n * @api private\n */\nmodule.exports = AWS.SequentialExecutor;\n","var AWS = require('./core');\nvar Api = require('./model/api');\nvar regionConfig = require('./region_config');\n\nvar inherit = AWS.util.inherit;\nvar clientCount = 0;\n\n/**\n * The service class representing an AWS service.\n *\n * @class_abstract This class is an abstract class.\n *\n * @!attribute apiVersions\n * @return [Array] the list of API versions supported by this service.\n * @readonly\n */\nAWS.Service = inherit({\n /**\n * Create a new service object with a configuration object\n *\n * @param config [map] a map of configuration options\n */\n constructor: function Service(config) {\n if (!this.loadServiceClass) {\n throw AWS.util.error(new Error(),\n 'Service must be constructed with `new\\' operator');\n }\n var ServiceClass = this.loadServiceClass(config || {});\n if (ServiceClass) {\n var originalConfig = AWS.util.copy(config);\n var svc = new ServiceClass(config);\n Object.defineProperty(svc, '_originalConfig', {\n get: function() { return originalConfig; },\n enumerable: false,\n configurable: true\n });\n svc._clientId = ++clientCount;\n return svc;\n }\n this.initialize(config);\n },\n\n /**\n * @api private\n */\n initialize: function initialize(config) {\n var svcConfig = AWS.config[this.serviceIdentifier];\n this.config = new AWS.Config(AWS.config);\n if (svcConfig) this.config.update(svcConfig, true);\n if (config) this.config.update(config, true);\n\n this.validateService();\n if (!this.config.endpoint) regionConfig.configureEndpoint(this);\n\n this.config.endpoint = this.endpointFromTemplate(this.config.endpoint);\n this.setEndpoint(this.config.endpoint);\n //enable attaching listeners to service client\n AWS.SequentialExecutor.call(this);\n AWS.Service.addDefaultMonitoringListeners(this);\n if ((this.config.clientSideMonitoring || AWS.Service._clientSideMonitoring) && this.publisher) {\n var publisher = this.publisher;\n this.addNamedListener('PUBLISH_API_CALL', 'apiCall', function PUBLISH_API_CALL(event) {\n process.nextTick(function() {publisher.eventHandler(event);});\n });\n this.addNamedListener('PUBLISH_API_ATTEMPT', 'apiCallAttempt', function PUBLISH_API_ATTEMPT(event) {\n process.nextTick(function() {publisher.eventHandler(event);});\n });\n }\n },\n\n /**\n * @api private\n */\n validateService: function validateService() {\n },\n\n /**\n * @api private\n */\n loadServiceClass: function loadServiceClass(serviceConfig) {\n var config = serviceConfig;\n if (!AWS.util.isEmpty(this.api)) {\n return null;\n } else if (config.apiConfig) {\n return AWS.Service.defineServiceApi(this.constructor, config.apiConfig);\n } else if (!this.constructor.services) {\n return null;\n } else {\n config = new AWS.Config(AWS.config);\n config.update(serviceConfig, true);\n var version = config.apiVersions[this.constructor.serviceIdentifier];\n version = version || config.apiVersion;\n return this.getLatestServiceClass(version);\n }\n },\n\n /**\n * @api private\n */\n getLatestServiceClass: function getLatestServiceClass(version) {\n version = this.getLatestServiceVersion(version);\n if (this.constructor.services[version] === null) {\n AWS.Service.defineServiceApi(this.constructor, version);\n }\n\n return this.constructor.services[version];\n },\n\n /**\n * @api private\n */\n getLatestServiceVersion: function getLatestServiceVersion(version) {\n if (!this.constructor.services || this.constructor.services.length === 0) {\n throw new Error('No services defined on ' +\n this.constructor.serviceIdentifier);\n }\n\n if (!version) {\n version = 'latest';\n } else if (AWS.util.isType(version, Date)) {\n version = AWS.util.date.iso8601(version).split('T')[0];\n }\n\n if (Object.hasOwnProperty(this.constructor.services, version)) {\n return version;\n }\n\n var keys = Object.keys(this.constructor.services).sort();\n var selectedVersion = null;\n for (var i = keys.length - 1; i >= 0; i--) {\n // versions that end in \"*\" are not available on disk and can be\n // skipped, so do not choose these as selectedVersions\n if (keys[i][keys[i].length - 1] !== '*') {\n selectedVersion = keys[i];\n }\n if (keys[i].substr(0, 10) <= version) {\n return selectedVersion;\n }\n }\n\n throw new Error('Could not find ' + this.constructor.serviceIdentifier +\n ' API to satisfy version constraint `' + version + '\\'');\n },\n\n /**\n * @api private\n */\n api: {},\n\n /**\n * @api private\n */\n defaultRetryCount: 3,\n\n /**\n * @api private\n */\n customizeRequests: function customizeRequests(callback) {\n if (!callback) {\n this.customRequestHandler = null;\n } else if (typeof callback === 'function') {\n this.customRequestHandler = callback;\n } else {\n throw new Error('Invalid callback type \\'' + typeof callback + '\\' provided in customizeRequests');\n }\n },\n\n /**\n * Calls an operation on a service with the given input parameters.\n *\n * @param operation [String] the name of the operation to call on the service.\n * @param params [map] a map of input options for the operation\n * @callback callback function(err, data)\n * If a callback is supplied, it is called when a response is returned\n * from the service.\n * @param err [Error] the error object returned from the request.\n * Set to `null` if the request is successful.\n * @param data [Object] the de-serialized data returned from\n * the request. Set to `null` if a request error occurs.\n */\n makeRequest: function makeRequest(operation, params, callback) {\n if (typeof params === 'function') {\n callback = params;\n params = null;\n }\n\n params = params || {};\n if (this.config.params) { // copy only toplevel bound params\n var rules = this.api.operations[operation];\n if (rules) {\n params = AWS.util.copy(params);\n AWS.util.each(this.config.params, function(key, value) {\n if (rules.input.members[key]) {\n if (params[key] === undefined || params[key] === null) {\n params[key] = value;\n }\n }\n });\n }\n }\n\n var request = new AWS.Request(this, operation, params);\n this.addAllRequestListeners(request);\n this.attachMonitoringEmitter(request);\n if (callback) request.send(callback);\n return request;\n },\n\n /**\n * Calls an operation on a service with the given input parameters, without\n * any authentication data. This method is useful for \"public\" API operations.\n *\n * @param operation [String] the name of the operation to call on the service.\n * @param params [map] a map of input options for the operation\n * @callback callback function(err, data)\n * If a callback is supplied, it is called when a response is returned\n * from the service.\n * @param err [Error] the error object returned from the request.\n * Set to `null` if the request is successful.\n * @param data [Object] the de-serialized data returned from\n * the request. Set to `null` if a request error occurs.\n */\n makeUnauthenticatedRequest: function makeUnauthenticatedRequest(operation, params, callback) {\n if (typeof params === 'function') {\n callback = params;\n params = {};\n }\n\n var request = this.makeRequest(operation, params).toUnauthenticated();\n return callback ? request.send(callback) : request;\n },\n\n /**\n * Waits for a given state\n *\n * @param state [String] the state on the service to wait for\n * @param params [map] a map of parameters to pass with each request\n * @option params $waiter [map] a map of configuration options for the waiter\n * @option params $waiter.delay [Number] The number of seconds to wait between\n * requests\n * @option params $waiter.maxAttempts [Number] The maximum number of requests\n * to send while waiting\n * @callback callback function(err, data)\n * If a callback is supplied, it is called when a response is returned\n * from the service.\n * @param err [Error] the error object returned from the request.\n * Set to `null` if the request is successful.\n * @param data [Object] the de-serialized data returned from\n * the request. Set to `null` if a request error occurs.\n */\n waitFor: function waitFor(state, params, callback) {\n var waiter = new AWS.ResourceWaiter(this, state);\n return waiter.wait(params, callback);\n },\n\n /**\n * @api private\n */\n addAllRequestListeners: function addAllRequestListeners(request) {\n var list = [AWS.events, AWS.EventListeners.Core, this.serviceInterface(),\n AWS.EventListeners.CorePost];\n for (var i = 0; i < list.length; i++) {\n if (list[i]) request.addListeners(list[i]);\n }\n\n // disable parameter validation\n if (!this.config.paramValidation) {\n request.removeListener('validate',\n AWS.EventListeners.Core.VALIDATE_PARAMETERS);\n }\n\n if (this.config.logger) { // add logging events\n request.addListeners(AWS.EventListeners.Logger);\n }\n\n this.setupRequestListeners(request);\n // call prototype's customRequestHandler\n if (typeof this.constructor.prototype.customRequestHandler === 'function') {\n this.constructor.prototype.customRequestHandler(request);\n }\n // call instance's customRequestHandler\n if (Object.prototype.hasOwnProperty.call(this, 'customRequestHandler') && typeof this.customRequestHandler === 'function') {\n this.customRequestHandler(request);\n }\n },\n\n /**\n * Event recording metrics for a whole API call.\n * @returns {object} a subset of api call metrics\n * @api private\n */\n apiCallEvent: function apiCallEvent(request) {\n var api = request.service.api.operations[request.operation];\n var monitoringEvent = {\n Type: 'ApiCall',\n Api: api ? api.name : request.operation,\n Version: 1,\n Service: request.service.api.serviceId || request.service.api.endpointPrefix,\n Region: request.httpRequest.region,\n MaxRetriesExceeded: 0,\n UserAgent: request.httpRequest.getUserAgent(),\n };\n var response = request.response;\n if (response.httpResponse.statusCode) {\n monitoringEvent.FinalHttpStatusCode = response.httpResponse.statusCode;\n }\n if (response.error) {\n var error = response.error;\n var statusCode = response.httpResponse.statusCode;\n if (statusCode > 299) {\n if (error.code) monitoringEvent.FinalAwsException = error.code;\n if (error.message) monitoringEvent.FinalAwsExceptionMessage = error.message;\n } else {\n if (error.code || error.name) monitoringEvent.FinalSdkException = error.code || error.name;\n if (error.message) monitoringEvent.FinalSdkExceptionMessage = error.message;\n }\n }\n return monitoringEvent;\n },\n\n /**\n * Event recording metrics for an API call attempt.\n * @returns {object} a subset of api call attempt metrics\n * @api private\n */\n apiAttemptEvent: function apiAttemptEvent(request) {\n var api = request.service.api.operations[request.operation];\n var monitoringEvent = {\n Type: 'ApiCallAttempt',\n Api: api ? api.name : request.operation,\n Version: 1,\n Service: request.service.api.serviceId || request.service.api.endpointPrefix,\n Fqdn: request.httpRequest.endpoint.hostname,\n UserAgent: request.httpRequest.getUserAgent(),\n };\n var response = request.response;\n if (response.httpResponse.statusCode) {\n monitoringEvent.HttpStatusCode = response.httpResponse.statusCode;\n }\n if (\n !request._unAuthenticated &&\n request.service.config.credentials &&\n request.service.config.credentials.accessKeyId\n ) {\n monitoringEvent.AccessKey = request.service.config.credentials.accessKeyId;\n }\n if (!response.httpResponse.headers) return monitoringEvent;\n if (request.httpRequest.headers['x-amz-security-token']) {\n monitoringEvent.SessionToken = request.httpRequest.headers['x-amz-security-token'];\n }\n if (response.httpResponse.headers['x-amzn-requestid']) {\n monitoringEvent.XAmznRequestId = response.httpResponse.headers['x-amzn-requestid'];\n }\n if (response.httpResponse.headers['x-amz-request-id']) {\n monitoringEvent.XAmzRequestId = response.httpResponse.headers['x-amz-request-id'];\n }\n if (response.httpResponse.headers['x-amz-id-2']) {\n monitoringEvent.XAmzId2 = response.httpResponse.headers['x-amz-id-2'];\n }\n return monitoringEvent;\n },\n\n /**\n * Add metrics of failed request.\n * @api private\n */\n attemptFailEvent: function attemptFailEvent(request) {\n var monitoringEvent = this.apiAttemptEvent(request);\n var response = request.response;\n var error = response.error;\n if (response.httpResponse.statusCode > 299 ) {\n if (error.code) monitoringEvent.AwsException = error.code;\n if (error.message) monitoringEvent.AwsExceptionMessage = error.message;\n } else {\n if (error.code || error.name) monitoringEvent.SdkException = error.code || error.name;\n if (error.message) monitoringEvent.SdkExceptionMessage = error.message;\n }\n return monitoringEvent;\n },\n\n /**\n * Attach listeners to request object to fetch metrics of each request\n * and emit data object through \\'ApiCall\\' and \\'ApiCallAttempt\\' events.\n * @api private\n */\n attachMonitoringEmitter: function attachMonitoringEmitter(request) {\n var attemptTimestamp; //timestamp marking the beginning of a request attempt\n var attemptStartRealTime; //Start time of request attempt. Used to calculating attemptLatency\n var attemptLatency; //latency from request sent out to http response reaching SDK\n var callStartRealTime; //Start time of API call. Used to calculating API call latency\n var attemptCount = 0; //request.retryCount is not reliable here\n var region; //region cache region for each attempt since it can be updated in plase (e.g. s3)\n var callTimestamp; //timestamp when the request is created\n var self = this;\n var addToHead = true;\n\n request.on('validate', function () {\n callStartRealTime = AWS.util.realClock.now();\n callTimestamp = Date.now();\n }, addToHead);\n request.on('sign', function () {\n attemptStartRealTime = AWS.util.realClock.now();\n attemptTimestamp = Date.now();\n region = request.httpRequest.region;\n attemptCount++;\n }, addToHead);\n request.on('validateResponse', function() {\n attemptLatency = Math.round(AWS.util.realClock.now() - attemptStartRealTime);\n });\n request.addNamedListener('API_CALL_ATTEMPT', 'success', function API_CALL_ATTEMPT() {\n var apiAttemptEvent = self.apiAttemptEvent(request);\n apiAttemptEvent.Timestamp = attemptTimestamp;\n apiAttemptEvent.AttemptLatency = attemptLatency >= 0 ? attemptLatency : 0;\n apiAttemptEvent.Region = region;\n self.emit('apiCallAttempt', [apiAttemptEvent]);\n });\n request.addNamedListener('API_CALL_ATTEMPT_RETRY', 'retry', function API_CALL_ATTEMPT_RETRY() {\n var apiAttemptEvent = self.attemptFailEvent(request);\n apiAttemptEvent.Timestamp = attemptTimestamp;\n //attemptLatency may not be available if fail before response\n attemptLatency = attemptLatency ||\n Math.round(AWS.util.realClock.now() - attemptStartRealTime);\n apiAttemptEvent.AttemptLatency = attemptLatency >= 0 ? attemptLatency : 0;\n apiAttemptEvent.Region = region;\n self.emit('apiCallAttempt', [apiAttemptEvent]);\n });\n request.addNamedListener('API_CALL', 'complete', function API_CALL() {\n var apiCallEvent = self.apiCallEvent(request);\n apiCallEvent.AttemptCount = attemptCount;\n if (apiCallEvent.AttemptCount <= 0) return;\n apiCallEvent.Timestamp = callTimestamp;\n var latency = Math.round(AWS.util.realClock.now() - callStartRealTime);\n apiCallEvent.Latency = latency >= 0 ? latency : 0;\n var response = request.response;\n if (\n response.error &&\n response.error.retryable &&\n typeof response.retryCount === 'number' &&\n typeof response.maxRetries === 'number' &&\n (response.retryCount >= response.maxRetries)\n ) {\n apiCallEvent.MaxRetriesExceeded = 1;\n }\n self.emit('apiCall', [apiCallEvent]);\n });\n },\n\n /**\n * Override this method to setup any custom request listeners for each\n * new request to the service.\n *\n * @method_abstract This is an abstract method.\n */\n setupRequestListeners: function setupRequestListeners(request) {\n },\n\n /**\n * Gets the signing name for a given request\n * @api private\n */\n getSigningName: function getSigningName() {\n return this.api.signingName || this.api.endpointPrefix;\n },\n\n /**\n * Gets the signer class for a given request\n * @api private\n */\n getSignerClass: function getSignerClass(request) {\n var version;\n // get operation authtype if present\n var operation = null;\n var authtype = '';\n if (request) {\n var operations = request.service.api.operations || {};\n operation = operations[request.operation] || null;\n authtype = operation ? operation.authtype : '';\n }\n if (this.config.signatureVersion) {\n version = this.config.signatureVersion;\n } else if (authtype === 'v4' || authtype === 'v4-unsigned-body') {\n version = 'v4';\n } else {\n version = this.api.signatureVersion;\n }\n return AWS.Signers.RequestSigner.getVersion(version);\n },\n\n /**\n * @api private\n */\n serviceInterface: function serviceInterface() {\n switch (this.api.protocol) {\n case 'ec2': return AWS.EventListeners.Query;\n case 'query': return AWS.EventListeners.Query;\n case 'json': return AWS.EventListeners.Json;\n case 'rest-json': return AWS.EventListeners.RestJson;\n case 'rest-xml': return AWS.EventListeners.RestXml;\n }\n if (this.api.protocol) {\n throw new Error('Invalid service `protocol\\' ' +\n this.api.protocol + ' in API config');\n }\n },\n\n /**\n * @api private\n */\n successfulResponse: function successfulResponse(resp) {\n return resp.httpResponse.statusCode < 300;\n },\n\n /**\n * How many times a failed request should be retried before giving up.\n * the defaultRetryCount can be overriden by service classes.\n *\n * @api private\n */\n numRetries: function numRetries() {\n if (this.config.maxRetries !== undefined) {\n return this.config.maxRetries;\n } else {\n return this.defaultRetryCount;\n }\n },\n\n /**\n * @api private\n */\n retryDelays: function retryDelays(retryCount, err) {\n return AWS.util.calculateRetryDelay(retryCount, this.config.retryDelayOptions, err);\n },\n\n /**\n * @api private\n */\n retryableError: function retryableError(error) {\n if (this.timeoutError(error)) return true;\n if (this.networkingError(error)) return true;\n if (this.expiredCredentialsError(error)) return true;\n if (this.throttledError(error)) return true;\n if (error.statusCode >= 500) return true;\n return false;\n },\n\n /**\n * @api private\n */\n networkingError: function networkingError(error) {\n return error.code === 'NetworkingError';\n },\n\n /**\n * @api private\n */\n timeoutError: function timeoutError(error) {\n return error.code === 'TimeoutError';\n },\n\n /**\n * @api private\n */\n expiredCredentialsError: function expiredCredentialsError(error) {\n // TODO : this only handles *one* of the expired credential codes\n return (error.code === 'ExpiredTokenException');\n },\n\n /**\n * @api private\n */\n clockSkewError: function clockSkewError(error) {\n switch (error.code) {\n case 'RequestTimeTooSkewed':\n case 'RequestExpired':\n case 'InvalidSignatureException':\n case 'SignatureDoesNotMatch':\n case 'AuthFailure':\n case 'RequestInTheFuture':\n return true;\n default: return false;\n }\n },\n\n /**\n * @api private\n */\n getSkewCorrectedDate: function getSkewCorrectedDate() {\n return new Date(Date.now() + this.config.systemClockOffset);\n },\n\n /**\n * @api private\n */\n applyClockOffset: function applyClockOffset(newServerTime) {\n if (newServerTime) {\n this.config.systemClockOffset = newServerTime - Date.now();\n }\n },\n\n /**\n * @api private\n */\n isClockSkewed: function isClockSkewed(newServerTime) {\n if (newServerTime) {\n return Math.abs(this.getSkewCorrectedDate().getTime() - newServerTime) >= 300000;\n }\n },\n\n /**\n * @api private\n */\n throttledError: function throttledError(error) {\n // this logic varies between services\n if (error.statusCode === 429) return true;\n switch (error.code) {\n case 'ProvisionedThroughputExceededException':\n case 'Throttling':\n case 'ThrottlingException':\n case 'RequestLimitExceeded':\n case 'RequestThrottled':\n case 'RequestThrottledException':\n case 'TooManyRequestsException':\n case 'TransactionInProgressException': //dynamodb\n case 'EC2ThrottledException':\n return true;\n default:\n return false;\n }\n },\n\n /**\n * @api private\n */\n endpointFromTemplate: function endpointFromTemplate(endpoint) {\n if (typeof endpoint !== 'string') return endpoint;\n\n var e = endpoint;\n e = e.replace(/\\{service\\}/g, this.api.endpointPrefix);\n e = e.replace(/\\{region\\}/g, this.config.region);\n e = e.replace(/\\{scheme\\}/g, this.config.sslEnabled ? 'https' : 'http');\n return e;\n },\n\n /**\n * @api private\n */\n setEndpoint: function setEndpoint(endpoint) {\n this.endpoint = new AWS.Endpoint(endpoint, this.config);\n },\n\n /**\n * @api private\n */\n paginationConfig: function paginationConfig(operation, throwException) {\n var paginator = this.api.operations[operation].paginator;\n if (!paginator) {\n if (throwException) {\n var e = new Error();\n throw AWS.util.error(e, 'No pagination configuration for ' + operation);\n }\n return null;\n }\n\n return paginator;\n }\n});\n\nAWS.util.update(AWS.Service, {\n\n /**\n * Adds one method for each operation described in the api configuration\n *\n * @api private\n */\n defineMethods: function defineMethods(svc) {\n AWS.util.each(svc.prototype.api.operations, function iterator(method) {\n if (svc.prototype[method]) return;\n var operation = svc.prototype.api.operations[method];\n if (operation.authtype === 'none') {\n svc.prototype[method] = function (params, callback) {\n return this.makeUnauthenticatedRequest(method, params, callback);\n };\n } else {\n svc.prototype[method] = function (params, callback) {\n return this.makeRequest(method, params, callback);\n };\n }\n });\n },\n\n /**\n * Defines a new Service class using a service identifier and list of versions\n * including an optional set of features (functions) to apply to the class\n * prototype.\n *\n * @param serviceIdentifier [String] the identifier for the service\n * @param versions [Array] a list of versions that work with this\n * service\n * @param features [Object] an object to attach to the prototype\n * @return [Class] the service class defined by this function.\n */\n defineService: function defineService(serviceIdentifier, versions, features) {\n AWS.Service._serviceMap[serviceIdentifier] = true;\n if (!Array.isArray(versions)) {\n features = versions;\n versions = [];\n }\n\n var svc = inherit(AWS.Service, features || {});\n\n if (typeof serviceIdentifier === 'string') {\n AWS.Service.addVersions(svc, versions);\n\n var identifier = svc.serviceIdentifier || serviceIdentifier;\n svc.serviceIdentifier = identifier;\n } else { // defineService called with an API\n svc.prototype.api = serviceIdentifier;\n AWS.Service.defineMethods(svc);\n }\n AWS.SequentialExecutor.call(this.prototype);\n //util.clientSideMonitoring is only available in node\n if (!this.prototype.publisher && AWS.util.clientSideMonitoring) {\n var Publisher = AWS.util.clientSideMonitoring.Publisher;\n var configProvider = AWS.util.clientSideMonitoring.configProvider;\n var publisherConfig = configProvider();\n this.prototype.publisher = new Publisher(publisherConfig);\n if (publisherConfig.enabled) {\n //if csm is enabled in environment, SDK should send all metrics\n AWS.Service._clientSideMonitoring = true;\n }\n }\n AWS.SequentialExecutor.call(svc.prototype);\n AWS.Service.addDefaultMonitoringListeners(svc.prototype);\n return svc;\n },\n\n /**\n * @api private\n */\n addVersions: function addVersions(svc, versions) {\n if (!Array.isArray(versions)) versions = [versions];\n\n svc.services = svc.services || {};\n for (var i = 0; i < versions.length; i++) {\n if (svc.services[versions[i]] === undefined) {\n svc.services[versions[i]] = null;\n }\n }\n\n svc.apiVersions = Object.keys(svc.services).sort();\n },\n\n /**\n * @api private\n */\n defineServiceApi: function defineServiceApi(superclass, version, apiConfig) {\n var svc = inherit(superclass, {\n serviceIdentifier: superclass.serviceIdentifier\n });\n\n function setApi(api) {\n if (api.isApi) {\n svc.prototype.api = api;\n } else {\n svc.prototype.api = new Api(api, {\n serviceIdentifier: superclass.serviceIdentifier\n });\n }\n }\n\n if (typeof version === 'string') {\n if (apiConfig) {\n setApi(apiConfig);\n } else {\n try {\n setApi(AWS.apiLoader(superclass.serviceIdentifier, version));\n } catch (err) {\n throw AWS.util.error(err, {\n message: 'Could not find API configuration ' +\n superclass.serviceIdentifier + '-' + version\n });\n }\n }\n if (!Object.prototype.hasOwnProperty.call(superclass.services, version)) {\n superclass.apiVersions = superclass.apiVersions.concat(version).sort();\n }\n superclass.services[version] = svc;\n } else {\n setApi(version);\n }\n\n AWS.Service.defineMethods(svc);\n return svc;\n },\n\n /**\n * @api private\n */\n hasService: function(identifier) {\n return Object.prototype.hasOwnProperty.call(AWS.Service._serviceMap, identifier);\n },\n\n /**\n * @param attachOn attach default monitoring listeners to object\n *\n * Each monitoring event should be emitted from service client to service constructor prototype and then\n * to global service prototype like bubbling up. These default monitoring events listener will transfer\n * the monitoring events to the upper layer.\n * @api private\n */\n addDefaultMonitoringListeners: function addDefaultMonitoringListeners(attachOn) {\n attachOn.addNamedListener('MONITOR_EVENTS_BUBBLE', 'apiCallAttempt', function EVENTS_BUBBLE(event) {\n var baseClass = Object.getPrototypeOf(attachOn);\n if (baseClass._events) baseClass.emit('apiCallAttempt', [event]);\n });\n attachOn.addNamedListener('CALL_EVENTS_BUBBLE', 'apiCall', function CALL_EVENTS_BUBBLE(event) {\n var baseClass = Object.getPrototypeOf(attachOn);\n if (baseClass._events) baseClass.emit('apiCall', [event]);\n });\n },\n\n /**\n * @api private\n */\n _serviceMap: {}\n});\n\nAWS.util.mixin(AWS.Service, AWS.SequentialExecutor);\n\n/**\n * @api private\n */\nmodule.exports = AWS.Service;\n","var AWS = require('../core');\n\nAWS.util.update(AWS.APIGateway.prototype, {\n/**\n * Sets the Accept header to application/json.\n *\n * @api private\n */\n setAcceptHeader: function setAcceptHeader(req) {\n var httpRequest = req.httpRequest;\n if (!httpRequest.headers.Accept) {\n httpRequest.headers['Accept'] = 'application/json';\n }\n },\n\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('build', this.setAcceptHeader);\n if (request.operation === 'getExport') {\n var params = request.params || {};\n if (params.exportType === 'swagger') {\n request.addListener('extractData', AWS.util.convertPayloadToString);\n }\n }\n }\n});\n\n","var AWS = require('../core');\n\n// pull in CloudFront signer\nrequire('../cloudfront/signer');\n\nAWS.util.update(AWS.CloudFront.prototype, {\n\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('extractData', AWS.util.hoistPayloadMember);\n }\n\n});\n","var AWS = require('../core');\n\n/**\n * Constructs a service interface object. Each API operation is exposed as a\n * function on service.\n *\n * ### Sending a Request Using CloudSearchDomain\n *\n * ```javascript\n * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'});\n * csd.search(params, function (err, data) {\n * if (err) console.log(err, err.stack); // an error occurred\n * else console.log(data); // successful response\n * });\n * ```\n *\n * ### Locking the API Version\n *\n * In order to ensure that the CloudSearchDomain object uses this specific API,\n * you can construct the object by passing the `apiVersion` option to the\n * constructor:\n *\n * ```javascript\n * var csd = new AWS.CloudSearchDomain({\n * endpoint: 'my.host.tld',\n * apiVersion: '2013-01-01'\n * });\n * ```\n *\n * You can also set the API version globally in `AWS.config.apiVersions` using\n * the **cloudsearchdomain** service identifier:\n *\n * ```javascript\n * AWS.config.apiVersions = {\n * cloudsearchdomain: '2013-01-01',\n * // other service API versions\n * };\n *\n * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'});\n * ```\n *\n * @note You *must* provide an `endpoint` configuration parameter when\n * constructing this service. See {constructor} for more information.\n *\n * @!method constructor(options = {})\n * Constructs a service object. This object has one method for each\n * API operation.\n *\n * @example Constructing a CloudSearchDomain object\n * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'});\n * @note You *must* provide an `endpoint` when constructing this service.\n * @option (see AWS.Config.constructor)\n *\n * @service cloudsearchdomain\n * @version 2013-01-01\n */\nAWS.util.update(AWS.CloudSearchDomain.prototype, {\n /**\n * @api private\n */\n validateService: function validateService() {\n if (!this.config.endpoint || this.config.endpoint.indexOf('{') >= 0) {\n var msg = 'AWS.CloudSearchDomain requires an explicit ' +\n '`endpoint\\' configuration option.';\n throw AWS.util.error(new Error(),\n {name: 'InvalidEndpoint', message: msg});\n }\n },\n\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.removeListener('validate',\n AWS.EventListeners.Core.VALIDATE_CREDENTIALS\n );\n request.onAsync('validate', this.validateCredentials);\n request.addListener('validate', this.updateRegion);\n if (request.operation === 'search') {\n request.addListener('build', this.convertGetToPost);\n }\n },\n\n /**\n * @api private\n */\n validateCredentials: function(req, done) {\n if (!req.service.api.signatureVersion) return done(); // none\n req.service.config.getCredentials(function(err) {\n if (err) {\n req.removeListener('sign', AWS.EventListeners.Core.SIGN);\n }\n done();\n });\n },\n\n /**\n * @api private\n */\n convertGetToPost: function(request) {\n var httpRequest = request.httpRequest;\n // convert queries to POST to avoid length restrictions\n var path = httpRequest.path.split('?');\n httpRequest.method = 'POST';\n httpRequest.path = path[0];\n httpRequest.body = path[1];\n httpRequest.headers['Content-Length'] = httpRequest.body.length;\n httpRequest.headers['Content-Type'] = 'application/x-www-form-urlencoded';\n },\n\n /**\n * @api private\n */\n updateRegion: function updateRegion(request) {\n var endpoint = request.httpRequest.endpoint.hostname;\n var zones = endpoint.split('.');\n request.httpRequest.region = zones[1] || request.httpRequest.region;\n }\n\n});\n","var AWS = require('../core');\nvar rdsutil = require('./rdsutil');\n\n/**\n* @api private\n*/\nvar crossRegionOperations = ['createDBCluster', 'copyDBClusterSnapshot'];\n\nAWS.util.update(AWS.DocDB.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n if (\n crossRegionOperations.indexOf(request.operation) !== -1 &&\n this.config.params &&\n this.config.params.SourceRegion &&\n request.params &&\n !request.params.SourceRegion\n ) {\n request.params.SourceRegion = this.config.params.SourceRegion;\n }\n rdsutil.setupRequestListeners(this, request, crossRegionOperations);\n },\n});\n","var AWS = require('../core');\nrequire('../dynamodb/document_client');\n\nAWS.util.update(AWS.DynamoDB.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n if (request.service.config.dynamoDbCrc32) {\n request.removeListener('extractData', AWS.EventListeners.Json.EXTRACT_DATA);\n request.addListener('extractData', this.checkCrc32);\n request.addListener('extractData', AWS.EventListeners.Json.EXTRACT_DATA);\n }\n },\n\n /**\n * @api private\n */\n checkCrc32: function checkCrc32(resp) {\n if (!resp.httpResponse.streaming && !resp.request.service.crc32IsValid(resp)) {\n resp.data = null;\n resp.error = AWS.util.error(new Error(), {\n code: 'CRC32CheckFailed',\n message: 'CRC32 integrity check failed',\n retryable: true\n });\n resp.request.haltHandlersOnError();\n throw (resp.error);\n }\n },\n\n /**\n * @api private\n */\n crc32IsValid: function crc32IsValid(resp) {\n var crc = resp.httpResponse.headers['x-amz-crc32'];\n if (!crc) return true; // no (valid) CRC32 header\n return parseInt(crc, 10) === AWS.util.crypto.crc32(resp.httpResponse.body);\n },\n\n /**\n * @api private\n */\n defaultRetryCount: 10,\n\n /**\n * @api private\n */\n retryDelays: function retryDelays(retryCount, err) {\n var retryDelayOptions = AWS.util.copy(this.config.retryDelayOptions);\n\n if (typeof retryDelayOptions.base !== 'number') {\n retryDelayOptions.base = 50; // default for dynamodb\n }\n var delay = AWS.util.calculateRetryDelay(retryCount, retryDelayOptions, err);\n return delay;\n }\n});\n","var AWS = require('../core');\n\nAWS.util.update(AWS.EC2.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.removeListener('extractError', AWS.EventListeners.Query.EXTRACT_ERROR);\n request.addListener('extractError', this.extractError);\n\n if (request.operation === 'copySnapshot') {\n request.onAsync('validate', this.buildCopySnapshotPresignedUrl);\n }\n },\n\n /**\n * @api private\n */\n buildCopySnapshotPresignedUrl: function buildCopySnapshotPresignedUrl(req, done) {\n if (req.params.PresignedUrl || req._subRequest) {\n return done();\n }\n\n req.params = AWS.util.copy(req.params);\n req.params.DestinationRegion = req.service.config.region;\n\n var config = AWS.util.copy(req.service.config);\n delete config.endpoint;\n config.region = req.params.SourceRegion;\n var svc = new req.service.constructor(config);\n var newReq = svc[req.operation](req.params);\n newReq._subRequest = true;\n newReq.presign(function(err, url) {\n if (err) done(err);\n else {\n req.params.PresignedUrl = url;\n done();\n }\n });\n },\n\n /**\n * @api private\n */\n extractError: function extractError(resp) {\n // EC2 nests the error code and message deeper than other AWS Query services.\n var httpResponse = resp.httpResponse;\n var data = new AWS.XML.Parser().parse(httpResponse.body.toString() || '');\n if (data.Errors) {\n resp.error = AWS.util.error(new Error(), {\n code: data.Errors.Error.Code,\n message: data.Errors.Error.Message\n });\n } else {\n resp.error = AWS.util.error(new Error(), {\n code: httpResponse.statusCode,\n message: null\n });\n }\n resp.error.requestId = data.RequestID || null;\n }\n});\n","var AWS = require('../core');\n\nAWS.util.update(AWS.Glacier.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n if (Array.isArray(request._events.validate)) {\n request._events.validate.unshift(this.validateAccountId);\n } else {\n request.on('validate', this.validateAccountId);\n }\n request.removeListener('afterBuild',\n AWS.EventListeners.Core.COMPUTE_SHA256);\n request.on('build', this.addGlacierApiVersion);\n request.on('build', this.addTreeHashHeaders);\n },\n\n /**\n * @api private\n */\n validateAccountId: function validateAccountId(request) {\n if (request.params.accountId !== undefined) return;\n request.params = AWS.util.copy(request.params);\n request.params.accountId = '-';\n },\n\n /**\n * @api private\n */\n addGlacierApiVersion: function addGlacierApiVersion(request) {\n var version = request.service.api.apiVersion;\n request.httpRequest.headers['x-amz-glacier-version'] = version;\n },\n\n /**\n * @api private\n */\n addTreeHashHeaders: function addTreeHashHeaders(request) {\n if (request.params.body === undefined) return;\n\n var hashes = request.service.computeChecksums(request.params.body);\n request.httpRequest.headers['X-Amz-Content-Sha256'] = hashes.linearHash;\n\n if (!request.httpRequest.headers['x-amz-sha256-tree-hash']) {\n request.httpRequest.headers['x-amz-sha256-tree-hash'] = hashes.treeHash;\n }\n },\n\n /**\n * @!group Computing Checksums\n */\n\n /**\n * Computes the SHA-256 linear and tree hash checksums for a given\n * block of Buffer data. Pass the tree hash of the computed checksums\n * as the checksum input to the {completeMultipartUpload} when performing\n * a multi-part upload.\n *\n * @example Calculate checksum of 5.5MB data chunk\n * var glacier = new AWS.Glacier();\n * var data = Buffer.alloc(5.5 * 1024 * 1024);\n * data.fill('0'); // fill with zeros\n * var results = glacier.computeChecksums(data);\n * // Result: { linearHash: '68aff0c5a9...', treeHash: '154e26c78f...' }\n * @param data [Buffer, String] data to calculate the checksum for\n * @return [map] a map containing\n * the linearHash and treeHash properties representing hex based digests\n * of the respective checksums.\n * @see completeMultipartUpload\n */\n computeChecksums: function computeChecksums(data) {\n if (!AWS.util.Buffer.isBuffer(data)) data = AWS.util.buffer.toBuffer(data);\n\n var mb = 1024 * 1024;\n var hashes = [];\n var hash = AWS.util.crypto.createHash('sha256');\n\n // build leaf nodes in 1mb chunks\n for (var i = 0; i < data.length; i += mb) {\n var chunk = data.slice(i, Math.min(i + mb, data.length));\n hash.update(chunk);\n hashes.push(AWS.util.crypto.sha256(chunk));\n }\n\n return {\n linearHash: hash.digest('hex'),\n treeHash: this.buildHashTree(hashes)\n };\n },\n\n /**\n * @api private\n */\n buildHashTree: function buildHashTree(hashes) {\n // merge leaf nodes\n while (hashes.length > 1) {\n var tmpHashes = [];\n for (var i = 0; i < hashes.length; i += 2) {\n if (hashes[i + 1]) {\n var tmpHash = AWS.util.buffer.alloc(64);\n tmpHash.write(hashes[i], 0, 32, 'binary');\n tmpHash.write(hashes[i + 1], 32, 32, 'binary');\n tmpHashes.push(AWS.util.crypto.sha256(tmpHash));\n } else {\n tmpHashes.push(hashes[i]);\n }\n }\n hashes = tmpHashes;\n }\n\n return AWS.util.crypto.toHex(hashes[0]);\n }\n});\n","var AWS = require('../core');\n\n/**\n * @api private\n */\nvar blobPayloadOutputOps = [\n 'deleteThingShadow',\n 'getThingShadow',\n 'updateThingShadow'\n];\n\n/**\n * Constructs a service interface object. Each API operation is exposed as a\n * function on service.\n *\n * ### Sending a Request Using IotData\n *\n * ```javascript\n * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'});\n * iotdata.getThingShadow(params, function (err, data) {\n * if (err) console.log(err, err.stack); // an error occurred\n * else console.log(data); // successful response\n * });\n * ```\n *\n * ### Locking the API Version\n *\n * In order to ensure that the IotData object uses this specific API,\n * you can construct the object by passing the `apiVersion` option to the\n * constructor:\n *\n * ```javascript\n * var iotdata = new AWS.IotData({\n * endpoint: 'my.host.tld',\n * apiVersion: '2015-05-28'\n * });\n * ```\n *\n * You can also set the API version globally in `AWS.config.apiVersions` using\n * the **iotdata** service identifier:\n *\n * ```javascript\n * AWS.config.apiVersions = {\n * iotdata: '2015-05-28',\n * // other service API versions\n * };\n *\n * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'});\n * ```\n *\n * @note You *must* provide an `endpoint` configuration parameter when\n * constructing this service. See {constructor} for more information.\n *\n * @!method constructor(options = {})\n * Constructs a service object. This object has one method for each\n * API operation.\n *\n * @example Constructing a IotData object\n * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'});\n * @note You *must* provide an `endpoint` when constructing this service.\n * @option (see AWS.Config.constructor)\n *\n * @service iotdata\n * @version 2015-05-28\n */\nAWS.util.update(AWS.IotData.prototype, {\n /**\n * @api private\n */\n validateService: function validateService() {\n if (!this.config.endpoint || this.config.endpoint.indexOf('{') >= 0) {\n var msg = 'AWS.IotData requires an explicit ' +\n '`endpoint\\' configuration option.';\n throw AWS.util.error(new Error(),\n {name: 'InvalidEndpoint', message: msg});\n }\n },\n\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('validateResponse', this.validateResponseBody);\n if (blobPayloadOutputOps.indexOf(request.operation) > -1) {\n request.addListener('extractData', AWS.util.convertPayloadToString);\n }\n },\n\n /**\n * @api private\n */\n validateResponseBody: function validateResponseBody(resp) {\n var body = resp.httpResponse.body.toString() || '{}';\n var bodyCheck = body.trim();\n if (!bodyCheck || bodyCheck.charAt(0) !== '{') {\n resp.httpResponse.body = '';\n }\n }\n\n});\n","var AWS = require('../core');\n\nAWS.util.update(AWS.Lambda.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n if (request.operation === 'invoke') {\n request.addListener('extractData', AWS.util.convertPayloadToString);\n }\n }\n});\n\n","var AWS = require('../core');\n\nAWS.util.update(AWS.LexModelsV2.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('build', this.modifyContentType);\n },\n\n /**\n * Normally rest-json services require `Content-Type` header to be 'application/json',\n * However Lex Model V2 services requires the header to be 'application/x-amz-json-1.1'.\n *\n * @api private\n */\n modifyContentType: function modifyContentType(request) {\n if (request.httpRequest.headers['Content-Type'] === 'application/json') {\n request.httpRequest.headers['Content-Type'] = 'application/x-amz-json-1.1';\n }\n }\n});\n\n","var AWS = require('../core');\n\nAWS.util.update(AWS.LookoutMetrics.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('build', this.modifyContentType);\n },\n\n /**\n * Normally rest-json services require `Content-Type` header to be 'application/json',\n * However lookout metrics services requires the header to be 'application/x-amz-json-1.1'.\n *\n * @api private\n */\n modifyContentType: function modifyContentType(request) {\n if (request.httpRequest.headers['Content-Type'] === 'application/json') {\n request.httpRequest.headers['Content-Type'] = 'application/x-amz-json-1.1';\n }\n }\n});\n","var AWS = require('../core');\n\nAWS.util.update(AWS.MachineLearning.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n if (request.operation === 'predict') {\n request.addListener('build', this.buildEndpoint);\n }\n },\n\n /**\n * Updates request endpoint from PredictEndpoint\n * @api private\n */\n buildEndpoint: function buildEndpoint(request) {\n var url = request.params.PredictEndpoint;\n if (url) {\n request.httpRequest.endpoint = new AWS.Endpoint(url);\n }\n }\n\n});\n","var AWS = require('../core');\nvar rdsutil = require('./rdsutil');\n\n/**\n* @api private\n*/\nvar crossRegionOperations = ['createDBCluster', 'copyDBClusterSnapshot'];\n\nAWS.util.update(AWS.Neptune.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n if (\n crossRegionOperations.indexOf(request.operation) !== -1 &&\n this.config.params &&\n this.config.params.SourceRegion &&\n request.params &&\n !request.params.SourceRegion\n ) {\n request.params.SourceRegion = this.config.params.SourceRegion;\n }\n rdsutil.setupRequestListeners(this, request, crossRegionOperations);\n },\n});\n","require('../polly/presigner');\n","var AWS = require('../core');\nvar rdsutil = require('./rdsutil');\nrequire('../rds/signer');\n /**\n * @api private\n */\n var crossRegionOperations = ['copyDBSnapshot', 'createDBInstanceReadReplica', 'createDBCluster', 'copyDBClusterSnapshot', 'startDBInstanceAutomatedBackupsReplication'];\n\n AWS.util.update(AWS.RDS.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n rdsutil.setupRequestListeners(this, request, crossRegionOperations);\n },\n });\n","var AWS = require('../core');\n\nAWS.util.update(AWS.RDSDataService.prototype, {\n /**\n * @return [Boolean] whether the error can be retried\n * @api private\n */\n retryableError: function retryableError(error) {\n if (error.code === 'BadRequestException' &&\n error.message &&\n error.message.match(/^Communications link failure/) &&\n error.statusCode === 400) {\n return true;\n } else {\n var _super = AWS.Service.prototype.retryableError;\n return _super.call(this, error);\n }\n }\n});\n","var AWS = require('../core');\n\nvar rdsutil = {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(service, request, crossRegionOperations) {\n if (crossRegionOperations.indexOf(request.operation) !== -1 &&\n request.params.SourceRegion) {\n request.params = AWS.util.copy(request.params);\n if (request.params.PreSignedUrl ||\n request.params.SourceRegion === service.config.region) {\n delete request.params.SourceRegion;\n } else {\n var doesParamValidation = !!service.config.paramValidation;\n // remove the validate parameters listener so we can re-add it after we build the URL\n if (doesParamValidation) {\n request.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS);\n }\n request.onAsync('validate', rdsutil.buildCrossRegionPresignedUrl);\n if (doesParamValidation) {\n request.addListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS);\n }\n }\n }\n },\n\n /**\n * @api private\n */\n buildCrossRegionPresignedUrl: function buildCrossRegionPresignedUrl(req, done) {\n var config = AWS.util.copy(req.service.config);\n config.region = req.params.SourceRegion;\n delete req.params.SourceRegion;\n delete config.endpoint;\n // relevant params for the operation will already be in req.params\n delete config.params;\n config.signatureVersion = 'v4';\n var destinationRegion = req.service.config.region;\n\n var svc = new req.service.constructor(config);\n var newReq = svc[req.operation](AWS.util.copy(req.params));\n newReq.on('build', function addDestinationRegionParam(request) {\n var httpRequest = request.httpRequest;\n httpRequest.params.DestinationRegion = destinationRegion;\n httpRequest.body = AWS.util.queryParamsToString(httpRequest.params);\n });\n newReq.presign(function(err, url) {\n if (err) done(err);\n else {\n req.params.PreSignedUrl = url;\n done();\n }\n });\n }\n};\n\n/**\n * @api private\n */\nmodule.exports = rdsutil;\n","var AWS = require('../core');\n\nAWS.util.update(AWS.Route53.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.on('build', this.sanitizeUrl);\n },\n\n /**\n * @api private\n */\n sanitizeUrl: function sanitizeUrl(request) {\n var path = request.httpRequest.path;\n request.httpRequest.path = path.replace(/\\/%2F\\w+%2F/, '/');\n },\n\n /**\n * @return [Boolean] whether the error can be retried\n * @api private\n */\n retryableError: function retryableError(error) {\n if (error.code === 'PriorRequestNotComplete' &&\n error.statusCode === 400) {\n return true;\n } else {\n var _super = AWS.Service.prototype.retryableError;\n return _super.call(this, error);\n }\n }\n});\n","var AWS = require('../core');\nvar v4Credentials = require('../signers/v4_credentials');\nvar resolveRegionalEndpointsFlag = require('../config_regional_endpoint');\nvar s3util = require('./s3util');\nvar regionUtil = require('../region_config');\n\n// Pull in managed upload extension\nrequire('../s3/managed_upload');\n\n/**\n * @api private\n */\nvar operationsWith200StatusCodeError = {\n 'completeMultipartUpload': true,\n 'copyObject': true,\n 'uploadPartCopy': true\n};\n\n/**\n * @api private\n */\n var regionRedirectErrorCodes = [\n 'AuthorizationHeaderMalformed', // non-head operations on virtual-hosted global bucket endpoints\n 'BadRequest', // head operations on virtual-hosted global bucket endpoints\n 'PermanentRedirect', // non-head operations on path-style or regional endpoints\n 301 // head operations on path-style or regional endpoints\n ];\n\nvar OBJECT_LAMBDA_SERVICE = 's3-object-lambda';\n\nAWS.util.update(AWS.S3.prototype, {\n /**\n * @api private\n */\n getSignatureVersion: function getSignatureVersion(request) {\n var defaultApiVersion = this.api.signatureVersion;\n var userDefinedVersion = this._originalConfig ? this._originalConfig.signatureVersion : null;\n var regionDefinedVersion = this.config.signatureVersion;\n var isPresigned = request ? request.isPresigned() : false;\n /*\n 1) User defined version specified:\n a) always return user defined version\n 2) No user defined version specified:\n a) If not using presigned urls, default to V4\n b) If using presigned urls, default to lowest version the region supports\n */\n if (userDefinedVersion) {\n userDefinedVersion = userDefinedVersion === 'v2' ? 's3' : userDefinedVersion;\n return userDefinedVersion;\n }\n if (isPresigned !== true) {\n defaultApiVersion = 'v4';\n } else if (regionDefinedVersion) {\n defaultApiVersion = regionDefinedVersion;\n }\n return defaultApiVersion;\n },\n\n /**\n * @api private\n */\n getSigningName: function getSigningName(req) {\n if (req && req.operation === 'writeGetObjectResponse') {\n return OBJECT_LAMBDA_SERVICE;\n }\n\n var _super = AWS.Service.prototype.getSigningName;\n return (req && req._parsedArn && req._parsedArn.service)\n ? req._parsedArn.service\n : _super.call(this);\n },\n\n /**\n * @api private\n */\n getSignerClass: function getSignerClass(request) {\n var signatureVersion = this.getSignatureVersion(request);\n return AWS.Signers.RequestSigner.getVersion(signatureVersion);\n },\n\n /**\n * @api private\n */\n validateService: function validateService() {\n var msg;\n var messages = [];\n\n // default to us-east-1 when no region is provided\n if (!this.config.region) this.config.region = 'us-east-1';\n\n if (!this.config.endpoint && this.config.s3BucketEndpoint) {\n messages.push('An endpoint must be provided when configuring ' +\n '`s3BucketEndpoint` to true.');\n }\n if (messages.length === 1) {\n msg = messages[0];\n } else if (messages.length > 1) {\n msg = 'Multiple configuration errors:\\n' + messages.join('\\n');\n }\n if (msg) {\n throw AWS.util.error(new Error(),\n {name: 'InvalidEndpoint', message: msg});\n }\n },\n\n /**\n * @api private\n */\n shouldDisableBodySigning: function shouldDisableBodySigning(request) {\n var signerClass = this.getSignerClass();\n if (this.config.s3DisableBodySigning === true && signerClass === AWS.Signers.V4\n && request.httpRequest.endpoint.protocol === 'https:') {\n return true;\n }\n return false;\n },\n\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n var prependListener = true;\n request.addListener('validate', this.validateScheme);\n request.addListener('validate', this.validateBucketName, prependListener);\n request.addListener('validate', this.optInUsEast1RegionalEndpoint, prependListener);\n\n request.removeListener('validate',\n AWS.EventListeners.Core.VALIDATE_REGION);\n request.addListener('build', this.addContentType);\n request.addListener('build', this.computeContentMd5);\n request.addListener('build', this.computeSseCustomerKeyMd5);\n request.addListener('build', this.populateURI);\n request.addListener('afterBuild', this.addExpect100Continue);\n request.addListener('extractError', this.extractError);\n request.addListener('extractData', AWS.util.hoistPayloadMember);\n request.addListener('extractData', this.extractData);\n request.addListener('extractData', this.extractErrorFrom200Response);\n request.addListener('beforePresign', this.prepareSignedUrl);\n if (this.shouldDisableBodySigning(request)) {\n request.removeListener('afterBuild', AWS.EventListeners.Core.COMPUTE_SHA256);\n request.addListener('afterBuild', this.disableBodySigning);\n }\n //deal with ARNs supplied to Bucket\n if (request.operation !== 'createBucket' && s3util.isArnInParam(request, 'Bucket')) {\n // avoid duplicate parsing in the future\n request._parsedArn = AWS.util.ARN.parse(request.params.Bucket);\n\n request.removeListener('validate', this.validateBucketName);\n request.removeListener('build', this.populateURI);\n if (request._parsedArn.service === 's3') {\n request.addListener('validate', s3util.validateS3AccessPointArn);\n request.addListener('validate', this.validateArnResourceType);\n } else if (request._parsedArn.service === 's3-outposts') {\n request.addListener('validate', s3util.validateOutpostsAccessPointArn);\n request.addListener('validate', s3util.validateOutpostsArn);\n }\n request.addListener('validate', s3util.validateArnRegion);\n request.addListener('validate', s3util.validateArnAccount);\n request.addListener('validate', s3util.validateArnService);\n request.addListener('build', this.populateUriFromAccessPointArn);\n request.addListener('build', s3util.validatePopulateUriFromArn);\n return;\n }\n //listeners regarding region inference\n request.addListener('validate', this.validateBucketEndpoint);\n request.addListener('validate', this.correctBucketRegionFromCache);\n request.onAsync('extractError', this.requestBucketRegion);\n if (AWS.util.isBrowser()) {\n request.onAsync('retry', this.reqRegionForNetworkingError);\n }\n },\n\n /**\n * @api private\n */\n validateScheme: function(req) {\n var params = req.params,\n scheme = req.httpRequest.endpoint.protocol,\n sensitive = params.SSECustomerKey || params.CopySourceSSECustomerKey;\n if (sensitive && scheme !== 'https:') {\n var msg = 'Cannot send SSE keys over HTTP. Set \\'sslEnabled\\'' +\n 'to \\'true\\' in your configuration';\n throw AWS.util.error(new Error(),\n { code: 'ConfigError', message: msg });\n }\n },\n\n /**\n * @api private\n */\n validateBucketEndpoint: function(req) {\n if (!req.params.Bucket && req.service.config.s3BucketEndpoint) {\n var msg = 'Cannot send requests to root API with `s3BucketEndpoint` set.';\n throw AWS.util.error(new Error(),\n { code: 'ConfigError', message: msg });\n }\n },\n\n /**\n * Validate resource-type supplied in S3 ARN\n */\n validateArnResourceType: function validateArnResourceType(req) {\n var resource = req._parsedArn.resource;\n\n if (\n resource.indexOf('accesspoint:') !== 0 &&\n resource.indexOf('accesspoint/') !== 0\n ) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'ARN resource should begin with \\'accesspoint/\\''\n });\n }\n },\n\n /**\n * @api private\n */\n validateBucketName: function validateBucketName(req) {\n var service = req.service;\n var signatureVersion = service.getSignatureVersion(req);\n var bucket = req.params && req.params.Bucket;\n var key = req.params && req.params.Key;\n var slashIndex = bucket && bucket.indexOf('/');\n if (bucket && slashIndex >= 0) {\n if (typeof key === 'string' && slashIndex > 0) {\n req.params = AWS.util.copy(req.params);\n // Need to include trailing slash to match sigv2 behavior\n var prefix = bucket.substr(slashIndex + 1) || '';\n req.params.Key = prefix + '/' + key;\n req.params.Bucket = bucket.substr(0, slashIndex);\n } else if (signatureVersion === 'v4') {\n var msg = 'Bucket names cannot contain forward slashes. Bucket: ' + bucket;\n throw AWS.util.error(new Error(),\n { code: 'InvalidBucket', message: msg });\n }\n }\n },\n\n /**\n * @api private\n */\n isValidAccelerateOperation: function isValidAccelerateOperation(operation) {\n var invalidOperations = [\n 'createBucket',\n 'deleteBucket',\n 'listBuckets'\n ];\n return invalidOperations.indexOf(operation) === -1;\n },\n\n /**\n * When us-east-1 region endpoint configuration is set, in stead of sending request to\n * global endpoint(e.g. 's3.amazonaws.com'), we will send request to\n * 's3.us-east-1.amazonaws.com'.\n * @api private\n */\n optInUsEast1RegionalEndpoint: function optInUsEast1RegionalEndpoint(req) {\n var service = req.service;\n var config = service.config;\n config.s3UsEast1RegionalEndpoint = resolveRegionalEndpointsFlag(service._originalConfig, {\n env: 'AWS_S3_US_EAST_1_REGIONAL_ENDPOINT',\n sharedConfig: 's3_us_east_1_regional_endpoint',\n clientConfig: 's3UsEast1RegionalEndpoint'\n });\n if (\n !(service._originalConfig || {}).endpoint &&\n req.httpRequest.region === 'us-east-1' &&\n config.s3UsEast1RegionalEndpoint === 'regional' &&\n req.httpRequest.endpoint.hostname.indexOf('s3.amazonaws.com') >= 0\n ) {\n var insertPoint = config.endpoint.indexOf('.amazonaws.com');\n regionalEndpoint = config.endpoint.substring(0, insertPoint) +\n '.us-east-1' + config.endpoint.substring(insertPoint);\n req.httpRequest.updateEndpoint(regionalEndpoint);\n }\n },\n\n /**\n * S3 prefers dns-compatible bucket names to be moved from the uri path\n * to the hostname as a sub-domain. This is not possible, even for dns-compat\n * buckets when using SSL and the bucket name contains a dot ('.'). The\n * ssl wildcard certificate is only 1-level deep.\n *\n * @api private\n */\n populateURI: function populateURI(req) {\n var httpRequest = req.httpRequest;\n var b = req.params.Bucket;\n var service = req.service;\n var endpoint = httpRequest.endpoint;\n if (b) {\n if (!service.pathStyleBucketName(b)) {\n if (service.config.useAccelerateEndpoint && service.isValidAccelerateOperation(req.operation)) {\n if (service.config.useDualstack) {\n endpoint.hostname = b + '.s3-accelerate.dualstack.amazonaws.com';\n } else {\n endpoint.hostname = b + '.s3-accelerate.amazonaws.com';\n }\n } else if (!service.config.s3BucketEndpoint) {\n endpoint.hostname =\n b + '.' + endpoint.hostname;\n }\n\n var port = endpoint.port;\n if (port !== 80 && port !== 443) {\n endpoint.host = endpoint.hostname + ':' +\n endpoint.port;\n } else {\n endpoint.host = endpoint.hostname;\n }\n\n httpRequest.virtualHostedBucket = b; // needed for signing the request\n service.removeVirtualHostedBucketFromPath(req);\n }\n }\n },\n\n /**\n * Takes the bucket name out of the path if bucket is virtual-hosted\n *\n * @api private\n */\n removeVirtualHostedBucketFromPath: function removeVirtualHostedBucketFromPath(req) {\n var httpRequest = req.httpRequest;\n var bucket = httpRequest.virtualHostedBucket;\n if (bucket && httpRequest.path) {\n if (req.params && req.params.Key) {\n var encodedS3Key = '/' + AWS.util.uriEscapePath(req.params.Key);\n if (httpRequest.path.indexOf(encodedS3Key) === 0 && (httpRequest.path.length === encodedS3Key.length || httpRequest.path[encodedS3Key.length] === '?')) {\n //path only contains key or path contains only key and querystring\n return;\n }\n }\n httpRequest.path = httpRequest.path.replace(new RegExp('/' + bucket), '');\n if (httpRequest.path[0] !== '/') {\n httpRequest.path = '/' + httpRequest.path;\n }\n }\n },\n\n /**\n * When user supply an access point ARN in the Bucket parameter, we need to\n * populate the URI according to the ARN.\n */\n populateUriFromAccessPointArn: function populateUriFromAccessPointArn(req) {\n var accessPointArn = req._parsedArn;\n\n var isOutpostArn = accessPointArn.service === 's3-outposts';\n var isObjectLambdaArn = accessPointArn.service === 's3-object-lambda';\n\n var outpostsSuffix = isOutpostArn ? '.' + accessPointArn.outpostId: '';\n var serviceName = isOutpostArn ? 's3-outposts': 's3-accesspoint';\n var dualStackSuffix = !isOutpostArn && req.service.config.useDualstack ? '.dualstack' : '';\n\n var endpoint = req.httpRequest.endpoint;\n var dnsSuffix = regionUtil.getEndpointSuffix(accessPointArn.region);\n var useArnRegion = req.service.config.s3UseArnRegion;\n\n endpoint.hostname = [\n accessPointArn.accessPoint + '-' + accessPointArn.accountId + outpostsSuffix,\n serviceName + dualStackSuffix,\n useArnRegion ? accessPointArn.region : req.service.config.region,\n dnsSuffix\n ].join('.');\n\n if (isObjectLambdaArn) {\n // should be in the format: \"accesspoint/${accesspointName}\"\n var serviceName = 's3-object-lambda';\n var accesspointName = accessPointArn.resource.split('/')[1];\n endpoint.hostname = [\n accesspointName + '-' + accessPointArn.accountId,\n serviceName,\n useArnRegion ? accessPointArn.region : req.service.config.region,\n dnsSuffix\n ].join('.');\n }\n endpoint.host = endpoint.hostname;\n var encodedArn = AWS.util.uriEscape(req.params.Bucket);\n var path = req.httpRequest.path;\n //remove the Bucket value from path\n req.httpRequest.path = path.replace(new RegExp('/' + encodedArn), '');\n if (req.httpRequest.path[0] !== '/') {\n req.httpRequest.path = '/' + req.httpRequest.path;\n }\n req.httpRequest.region = accessPointArn.region; //region used to sign\n },\n\n /**\n * Adds Expect: 100-continue header if payload is greater-or-equal 1MB\n * @api private\n */\n addExpect100Continue: function addExpect100Continue(req) {\n var len = req.httpRequest.headers['Content-Length'];\n if (AWS.util.isNode() && (len >= 1024 * 1024 || req.params.Body instanceof AWS.util.stream.Stream)) {\n req.httpRequest.headers['Expect'] = '100-continue';\n }\n },\n\n /**\n * Adds a default content type if none is supplied.\n *\n * @api private\n */\n addContentType: function addContentType(req) {\n var httpRequest = req.httpRequest;\n if (httpRequest.method === 'GET' || httpRequest.method === 'HEAD') {\n // Content-Type is not set in GET/HEAD requests\n delete httpRequest.headers['Content-Type'];\n return;\n }\n\n if (!httpRequest.headers['Content-Type']) { // always have a Content-Type\n httpRequest.headers['Content-Type'] = 'application/octet-stream';\n }\n\n var contentType = httpRequest.headers['Content-Type'];\n if (AWS.util.isBrowser()) {\n if (typeof httpRequest.body === 'string' && !contentType.match(/;\\s*charset=/)) {\n var charset = '; charset=UTF-8';\n httpRequest.headers['Content-Type'] += charset;\n } else {\n var replaceFn = function(_, prefix, charsetName) {\n return prefix + charsetName.toUpperCase();\n };\n\n httpRequest.headers['Content-Type'] =\n contentType.replace(/(;\\s*charset=)(.+)$/, replaceFn);\n }\n }\n },\n\n /**\n * @api private\n */\n computableChecksumOperations: {\n putBucketCors: true,\n putBucketLifecycle: true,\n putBucketLifecycleConfiguration: true,\n putBucketTagging: true,\n deleteObjects: true,\n putBucketReplication: true,\n putObjectLegalHold: true,\n putObjectRetention: true,\n putObjectLockConfiguration: true\n },\n\n /**\n * Checks whether checksums should be computed for the request.\n * If the request requires checksums to be computed, this will always\n * return true, otherwise it depends on whether {AWS.Config.computeChecksums}\n * is set.\n *\n * @param req [AWS.Request] the request to check against\n * @return [Boolean] whether to compute checksums for a request.\n * @api private\n */\n willComputeChecksums: function willComputeChecksums(req) {\n if (this.computableChecksumOperations[req.operation]) return true;\n if (!this.config.computeChecksums) return false;\n\n // TODO: compute checksums for Stream objects\n if (!AWS.util.Buffer.isBuffer(req.httpRequest.body) &&\n typeof req.httpRequest.body !== 'string') {\n return false;\n }\n\n var rules = req.service.api.operations[req.operation].input.members;\n\n // Sha256 signing disabled, and not a presigned url\n if (req.service.shouldDisableBodySigning(req) && !Object.prototype.hasOwnProperty.call(req.httpRequest.headers, 'presigned-expires')) {\n if (rules.ContentMD5 && !req.params.ContentMD5) {\n return true;\n }\n }\n\n // V4 signer uses SHA256 signatures so only compute MD5 if it is required\n if (req.service.getSignerClass(req) === AWS.Signers.V4) {\n if (rules.ContentMD5 && !rules.ContentMD5.required) return false;\n }\n\n if (rules.ContentMD5 && !req.params.ContentMD5) return true;\n },\n\n /**\n * A listener that computes the Content-MD5 and sets it in the header.\n * @see AWS.S3.willComputeChecksums\n * @api private\n */\n computeContentMd5: function computeContentMd5(req) {\n if (req.service.willComputeChecksums(req)) {\n var md5 = AWS.util.crypto.md5(req.httpRequest.body, 'base64');\n req.httpRequest.headers['Content-MD5'] = md5;\n }\n },\n\n /**\n * @api private\n */\n computeSseCustomerKeyMd5: function computeSseCustomerKeyMd5(req) {\n var keys = {\n SSECustomerKey: 'x-amz-server-side-encryption-customer-key-MD5',\n CopySourceSSECustomerKey: 'x-amz-copy-source-server-side-encryption-customer-key-MD5'\n };\n AWS.util.each(keys, function(key, header) {\n if (req.params[key]) {\n var value = AWS.util.crypto.md5(req.params[key], 'base64');\n req.httpRequest.headers[header] = value;\n }\n });\n },\n\n /**\n * Returns true if the bucket name should be left in the URI path for\n * a request to S3. This function takes into account the current\n * endpoint protocol (e.g. http or https).\n *\n * @api private\n */\n pathStyleBucketName: function pathStyleBucketName(bucketName) {\n // user can force path style requests via the configuration\n if (this.config.s3ForcePathStyle) return true;\n if (this.config.s3BucketEndpoint) return false;\n\n if (s3util.dnsCompatibleBucketName(bucketName)) {\n return (this.config.sslEnabled && bucketName.match(/\\./)) ? true : false;\n } else {\n return true; // not dns compatible names must always use path style\n }\n },\n\n /**\n * For COPY operations, some can be error even with status code 200.\n * SDK treats the response as exception when response body indicates\n * an exception or body is empty.\n *\n * @api private\n */\n extractErrorFrom200Response: function extractErrorFrom200Response(resp) {\n if (!operationsWith200StatusCodeError[resp.request.operation]) return;\n var httpResponse = resp.httpResponse;\n if (httpResponse.body && httpResponse.body.toString().match('')) {\n // Response body with '...' indicates an exception.\n // Get S3 client object. In ManagedUpload, this.service refers to\n // S3 client object.\n resp.data = null;\n var service = this.service ? this.service : this;\n service.extractError(resp);\n throw resp.error;\n } else if (!httpResponse.body || !httpResponse.body.toString().match(/<[\\w_]/)) {\n // When body is empty or incomplete, S3 might stop the request on detecting client\n // side aborting the request.\n resp.data = null;\n throw AWS.util.error(new Error(), {\n code: 'InternalError',\n message: 'S3 aborted request'\n });\n }\n },\n\n /**\n * @return [Boolean] whether the error can be retried\n * @api private\n */\n retryableError: function retryableError(error, request) {\n if (operationsWith200StatusCodeError[request.operation] &&\n error.statusCode === 200) {\n return true;\n } else if (request._requestRegionForBucket &&\n request.service.bucketRegionCache[request._requestRegionForBucket]) {\n return false;\n } else if (error && error.code === 'RequestTimeout') {\n return true;\n } else if (error &&\n regionRedirectErrorCodes.indexOf(error.code) != -1 &&\n error.region && error.region != request.httpRequest.region) {\n request.httpRequest.region = error.region;\n if (error.statusCode === 301) {\n request.service.updateReqBucketRegion(request);\n }\n return true;\n } else {\n var _super = AWS.Service.prototype.retryableError;\n return _super.call(this, error, request);\n }\n },\n\n /**\n * Updates httpRequest with region. If region is not provided, then\n * the httpRequest will be updated based on httpRequest.region\n *\n * @api private\n */\n updateReqBucketRegion: function updateReqBucketRegion(request, region) {\n var httpRequest = request.httpRequest;\n if (typeof region === 'string' && region.length) {\n httpRequest.region = region;\n }\n if (!httpRequest.endpoint.host.match(/s3(?!-accelerate).*\\.amazonaws\\.com$/)) {\n return;\n }\n var service = request.service;\n var s3Config = service.config;\n var s3BucketEndpoint = s3Config.s3BucketEndpoint;\n if (s3BucketEndpoint) {\n delete s3Config.s3BucketEndpoint;\n }\n var newConfig = AWS.util.copy(s3Config);\n delete newConfig.endpoint;\n newConfig.region = httpRequest.region;\n\n httpRequest.endpoint = (new AWS.S3(newConfig)).endpoint;\n service.populateURI(request);\n s3Config.s3BucketEndpoint = s3BucketEndpoint;\n httpRequest.headers.Host = httpRequest.endpoint.host;\n\n if (request._asm.currentState === 'validate') {\n request.removeListener('build', service.populateURI);\n request.addListener('build', service.removeVirtualHostedBucketFromPath);\n }\n },\n\n /**\n * Provides a specialized parser for getBucketLocation -- all other\n * operations are parsed by the super class.\n *\n * @api private\n */\n extractData: function extractData(resp) {\n var req = resp.request;\n if (req.operation === 'getBucketLocation') {\n var match = resp.httpResponse.body.toString().match(/>(.+)<\\/Location/);\n delete resp.data['_'];\n if (match) {\n resp.data.LocationConstraint = match[1];\n } else {\n resp.data.LocationConstraint = '';\n }\n }\n var bucket = req.params.Bucket || null;\n if (req.operation === 'deleteBucket' && typeof bucket === 'string' && !resp.error) {\n req.service.clearBucketRegionCache(bucket);\n } else {\n var headers = resp.httpResponse.headers || {};\n var region = headers['x-amz-bucket-region'] || null;\n if (!region && req.operation === 'createBucket' && !resp.error) {\n var createBucketConfiguration = req.params.CreateBucketConfiguration;\n if (!createBucketConfiguration) {\n region = 'us-east-1';\n } else if (createBucketConfiguration.LocationConstraint === 'EU') {\n region = 'eu-west-1';\n } else {\n region = createBucketConfiguration.LocationConstraint;\n }\n }\n if (region) {\n if (bucket && region !== req.service.bucketRegionCache[bucket]) {\n req.service.bucketRegionCache[bucket] = region;\n }\n }\n }\n req.service.extractRequestIds(resp);\n },\n\n /**\n * Extracts an error object from the http response.\n *\n * @api private\n */\n extractError: function extractError(resp) {\n var codes = {\n 304: 'NotModified',\n 403: 'Forbidden',\n 400: 'BadRequest',\n 404: 'NotFound'\n };\n\n var req = resp.request;\n var code = resp.httpResponse.statusCode;\n var body = resp.httpResponse.body || '';\n\n var headers = resp.httpResponse.headers || {};\n var region = headers['x-amz-bucket-region'] || null;\n var bucket = req.params.Bucket || null;\n var bucketRegionCache = req.service.bucketRegionCache;\n if (region && bucket && region !== bucketRegionCache[bucket]) {\n bucketRegionCache[bucket] = region;\n }\n\n var cachedRegion;\n if (codes[code] && body.length === 0) {\n if (bucket && !region) {\n cachedRegion = bucketRegionCache[bucket] || null;\n if (cachedRegion !== req.httpRequest.region) {\n region = cachedRegion;\n }\n }\n resp.error = AWS.util.error(new Error(), {\n code: codes[code],\n message: null,\n region: region\n });\n } else {\n var data = new AWS.XML.Parser().parse(body.toString());\n\n if (data.Region && !region) {\n region = data.Region;\n if (bucket && region !== bucketRegionCache[bucket]) {\n bucketRegionCache[bucket] = region;\n }\n } else if (bucket && !region && !data.Region) {\n cachedRegion = bucketRegionCache[bucket] || null;\n if (cachedRegion !== req.httpRequest.region) {\n region = cachedRegion;\n }\n }\n\n resp.error = AWS.util.error(new Error(), {\n code: data.Code || code,\n message: data.Message || null,\n region: region\n });\n }\n req.service.extractRequestIds(resp);\n },\n\n /**\n * If region was not obtained synchronously, then send async request\n * to get bucket region for errors resulting from wrong region.\n *\n * @api private\n */\n requestBucketRegion: function requestBucketRegion(resp, done) {\n var error = resp.error;\n var req = resp.request;\n var bucket = req.params.Bucket || null;\n\n if (!error || !bucket || error.region || req.operation === 'listObjects' ||\n (AWS.util.isNode() && req.operation === 'headBucket') ||\n (error.statusCode === 400 && req.operation !== 'headObject') ||\n regionRedirectErrorCodes.indexOf(error.code) === -1) {\n return done();\n }\n var reqOperation = AWS.util.isNode() ? 'headBucket' : 'listObjects';\n var reqParams = {Bucket: bucket};\n if (reqOperation === 'listObjects') reqParams.MaxKeys = 0;\n var regionReq = req.service[reqOperation](reqParams);\n regionReq._requestRegionForBucket = bucket;\n regionReq.send(function() {\n var region = req.service.bucketRegionCache[bucket] || null;\n error.region = region;\n done();\n });\n },\n\n /**\n * For browser only. If NetworkingError received, will attempt to obtain\n * the bucket region.\n *\n * @api private\n */\n reqRegionForNetworkingError: function reqRegionForNetworkingError(resp, done) {\n if (!AWS.util.isBrowser()) {\n return done();\n }\n var error = resp.error;\n var request = resp.request;\n var bucket = request.params.Bucket;\n if (!error || error.code !== 'NetworkingError' || !bucket ||\n request.httpRequest.region === 'us-east-1') {\n return done();\n }\n var service = request.service;\n var bucketRegionCache = service.bucketRegionCache;\n var cachedRegion = bucketRegionCache[bucket] || null;\n\n if (cachedRegion && cachedRegion !== request.httpRequest.region) {\n service.updateReqBucketRegion(request, cachedRegion);\n done();\n } else if (!s3util.dnsCompatibleBucketName(bucket)) {\n service.updateReqBucketRegion(request, 'us-east-1');\n if (bucketRegionCache[bucket] !== 'us-east-1') {\n bucketRegionCache[bucket] = 'us-east-1';\n }\n done();\n } else if (request.httpRequest.virtualHostedBucket) {\n var getRegionReq = service.listObjects({Bucket: bucket, MaxKeys: 0});\n service.updateReqBucketRegion(getRegionReq, 'us-east-1');\n getRegionReq._requestRegionForBucket = bucket;\n\n getRegionReq.send(function() {\n var region = service.bucketRegionCache[bucket] || null;\n if (region && region !== request.httpRequest.region) {\n service.updateReqBucketRegion(request, region);\n }\n done();\n });\n } else {\n // DNS-compatible path-style\n // (s3ForcePathStyle or bucket name with dot over https)\n // Cannot obtain region information for this case\n done();\n }\n },\n\n /**\n * Cache for bucket region.\n *\n * @api private\n */\n bucketRegionCache: {},\n\n /**\n * Clears bucket region cache.\n *\n * @api private\n */\n clearBucketRegionCache: function(buckets) {\n var bucketRegionCache = this.bucketRegionCache;\n if (!buckets) {\n buckets = Object.keys(bucketRegionCache);\n } else if (typeof buckets === 'string') {\n buckets = [buckets];\n }\n for (var i = 0; i < buckets.length; i++) {\n delete bucketRegionCache[buckets[i]];\n }\n return bucketRegionCache;\n },\n\n /**\n * Corrects request region if bucket's cached region is different\n *\n * @api private\n */\n correctBucketRegionFromCache: function correctBucketRegionFromCache(req) {\n var bucket = req.params.Bucket || null;\n if (bucket) {\n var service = req.service;\n var requestRegion = req.httpRequest.region;\n var cachedRegion = service.bucketRegionCache[bucket];\n if (cachedRegion && cachedRegion !== requestRegion) {\n service.updateReqBucketRegion(req, cachedRegion);\n }\n }\n },\n\n /**\n * Extracts S3 specific request ids from the http response.\n *\n * @api private\n */\n extractRequestIds: function extractRequestIds(resp) {\n var extendedRequestId = resp.httpResponse.headers ? resp.httpResponse.headers['x-amz-id-2'] : null;\n var cfId = resp.httpResponse.headers ? resp.httpResponse.headers['x-amz-cf-id'] : null;\n resp.extendedRequestId = extendedRequestId;\n resp.cfId = cfId;\n\n if (resp.error) {\n resp.error.requestId = resp.requestId || null;\n resp.error.extendedRequestId = extendedRequestId;\n resp.error.cfId = cfId;\n }\n },\n\n /**\n * Get a pre-signed URL for a given operation name.\n *\n * @note You must ensure that you have static or previously resolved\n * credentials if you call this method synchronously (with no callback),\n * otherwise it may not properly sign the request. If you cannot guarantee\n * this (you are using an asynchronous credential provider, i.e., EC2\n * IAM roles), you should always call this method with an asynchronous\n * callback.\n * @note Not all operation parameters are supported when using pre-signed\n * URLs. Certain parameters, such as `SSECustomerKey`, `ACL`, `Expires`,\n * `ContentLength`, or `Tagging` must be provided as headers when sending a\n * request. If you are using pre-signed URLs to upload from a browser and\n * need to use these fields, see {createPresignedPost}.\n * @note The default signer allows altering the request by adding corresponding\n * headers to set some parameters (e.g. Range) and these added parameters\n * won't be signed. You must use signatureVersion v4 to to include these\n * parameters in the signed portion of the URL and enforce exact matching\n * between headers and signed params in the URL.\n * @note This operation cannot be used with a promise. See note above regarding\n * asynchronous credentials and use with a callback.\n * @param operation [String] the name of the operation to call\n * @param params [map] parameters to pass to the operation. See the given\n * operation for the expected operation parameters. In addition, you can\n * also pass the \"Expires\" parameter to inform S3 how long the URL should\n * work for.\n * @option params Expires [Integer] (900) the number of seconds to expire\n * the pre-signed URL operation in. Defaults to 15 minutes.\n * @param callback [Function] if a callback is provided, this function will\n * pass the URL as the second parameter (after the error parameter) to\n * the callback function.\n * @return [String] if called synchronously (with no callback), returns the\n * signed URL.\n * @return [null] nothing is returned if a callback is provided.\n * @example Pre-signing a getObject operation (synchronously)\n * var params = {Bucket: 'bucket', Key: 'key'};\n * var url = s3.getSignedUrl('getObject', params);\n * console.log('The URL is', url);\n * @example Pre-signing a putObject (asynchronously)\n * var params = {Bucket: 'bucket', Key: 'key'};\n * s3.getSignedUrl('putObject', params, function (err, url) {\n * console.log('The URL is', url);\n * });\n * @example Pre-signing a putObject operation with a specific payload\n * var params = {Bucket: 'bucket', Key: 'key', Body: 'body'};\n * var url = s3.getSignedUrl('putObject', params);\n * console.log('The URL is', url);\n * @example Passing in a 1-minute expiry time for a pre-signed URL\n * var params = {Bucket: 'bucket', Key: 'key', Expires: 60};\n * var url = s3.getSignedUrl('getObject', params);\n * console.log('The URL is', url); // expires in 60 seconds\n */\n getSignedUrl: function getSignedUrl(operation, params, callback) {\n params = AWS.util.copy(params || {});\n var expires = params.Expires || 900;\n\n if (typeof expires !== 'number') {\n throw AWS.util.error(new Error(),\n { code: 'InvalidParameterException', message: 'The expiration must be a number, received ' + typeof expires });\n }\n\n delete params.Expires; // we can't validate this\n var request = this.makeRequest(operation, params);\n\n if (callback) {\n AWS.util.defer(function() {\n request.presign(expires, callback);\n });\n } else {\n return request.presign(expires, callback);\n }\n },\n\n /**\n * @!method getSignedUrlPromise()\n * Returns a 'thenable' promise that will be resolved with a pre-signed URL\n * for a given operation name.\n *\n * Two callbacks can be provided to the `then` method on the returned promise.\n * The first callback will be called if the promise is fulfilled, and the second\n * callback will be called if the promise is rejected.\n * @note Not all operation parameters are supported when using pre-signed\n * URLs. Certain parameters, such as `SSECustomerKey`, `ACL`, `Expires`,\n * `ContentLength`, or `Tagging` must be provided as headers when sending a\n * request. If you are using pre-signed URLs to upload from a browser and\n * need to use these fields, see {createPresignedPost}.\n * @param operation [String] the name of the operation to call\n * @param params [map] parameters to pass to the operation. See the given\n * operation for the expected operation parameters. In addition, you can\n * also pass the \"Expires\" parameter to inform S3 how long the URL should\n * work for.\n * @option params Expires [Integer] (900) the number of seconds to expire\n * the pre-signed URL operation in. Defaults to 15 minutes.\n * @callback fulfilledCallback function(url)\n * Called if the promise is fulfilled.\n * @param url [String] the signed url\n * @callback rejectedCallback function(err)\n * Called if the promise is rejected.\n * @param err [Error] if an error occurred, this value will be filled\n * @return [Promise] A promise that represents the state of the `refresh` call.\n * @example Pre-signing a getObject operation\n * var params = {Bucket: 'bucket', Key: 'key'};\n * var promise = s3.getSignedUrlPromise('getObject', params);\n * promise.then(function(url) {\n * console.log('The URL is', url);\n * }, function(err) { ... });\n * @example Pre-signing a putObject operation with a specific payload\n * var params = {Bucket: 'bucket', Key: 'key', Body: 'body'};\n * var promise = s3.getSignedUrlPromise('putObject', params);\n * promise.then(function(url) {\n * console.log('The URL is', url);\n * }, function(err) { ... });\n * @example Passing in a 1-minute expiry time for a pre-signed URL\n * var params = {Bucket: 'bucket', Key: 'key', Expires: 60};\n * var promise = s3.getSignedUrlPromise('getObject', params);\n * promise.then(function(url) {\n * console.log('The URL is', url);\n * }, function(err) { ... });\n */\n\n /**\n * Get a pre-signed POST policy to support uploading to S3 directly from an\n * HTML form.\n *\n * @param params [map]\n * @option params Bucket [String] The bucket to which the post should be\n * uploaded\n * @option params Expires [Integer] (3600) The number of seconds for which\n * the presigned policy should be valid.\n * @option params Conditions [Array] An array of conditions that must be met\n * for the presigned policy to allow the\n * upload. This can include required tags,\n * the accepted range for content lengths,\n * etc.\n * @see http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html\n * @option params Fields [map] Fields to include in the form. All\n * values passed in as fields will be\n * signed as exact match conditions.\n * @param callback [Function]\n *\n * @note All fields passed in when creating presigned post data will be signed\n * as exact match conditions. Any fields that will be interpolated by S3\n * must be added to the fields hash after signing, and an appropriate\n * condition for such fields must be explicitly added to the Conditions\n * array passed to this function before signing.\n *\n * @example Presiging post data with a known key\n * var params = {\n * Bucket: 'bucket',\n * Fields: {\n * key: 'key'\n * }\n * };\n * s3.createPresignedPost(params, function(err, data) {\n * if (err) {\n * console.error('Presigning post data encountered an error', err);\n * } else {\n * console.log('The post data is', data);\n * }\n * });\n *\n * @example Presigning post data with an interpolated key\n * var params = {\n * Bucket: 'bucket',\n * Conditions: [\n * ['starts-with', '$key', 'path/to/uploads/']\n * ]\n * };\n * s3.createPresignedPost(params, function(err, data) {\n * if (err) {\n * console.error('Presigning post data encountered an error', err);\n * } else {\n * data.Fields.key = 'path/to/uploads/${filename}';\n * console.log('The post data is', data);\n * }\n * });\n *\n * @note You must ensure that you have static or previously resolved\n * credentials if you call this method synchronously (with no callback),\n * otherwise it may not properly sign the request. If you cannot guarantee\n * this (you are using an asynchronous credential provider, i.e., EC2\n * IAM roles), you should always call this method with an asynchronous\n * callback.\n *\n * @return [map] If called synchronously (with no callback), returns a hash\n * with the url to set as the form action and a hash of fields\n * to include in the form.\n * @return [null] Nothing is returned if a callback is provided.\n *\n * @callback callback function (err, data)\n * @param err [Error] the error object returned from the policy signer\n * @param data [map] The data necessary to construct an HTML form\n * @param data.url [String] The URL to use as the action of the form\n * @param data.fields [map] A hash of fields that must be included in the\n * form for the upload to succeed. This hash will\n * include the signed POST policy, your access key\n * ID and security token (if present), etc. These\n * may be safely included as input elements of type\n * 'hidden.'\n */\n createPresignedPost: function createPresignedPost(params, callback) {\n if (typeof params === 'function' && callback === undefined) {\n callback = params;\n params = null;\n }\n\n params = AWS.util.copy(params || {});\n var boundParams = this.config.params || {};\n var bucket = params.Bucket || boundParams.Bucket,\n self = this,\n config = this.config,\n endpoint = AWS.util.copy(this.endpoint);\n if (!config.s3BucketEndpoint) {\n endpoint.pathname = '/' + bucket;\n }\n\n function finalizePost() {\n return {\n url: AWS.util.urlFormat(endpoint),\n fields: self.preparePostFields(\n config.credentials,\n config.region,\n bucket,\n params.Fields,\n params.Conditions,\n params.Expires\n )\n };\n }\n\n if (callback) {\n config.getCredentials(function (err) {\n if (err) {\n callback(err);\n } else {\n try {\n callback(null, finalizePost());\n } catch (err) {\n callback(err);\n }\n }\n });\n } else {\n return finalizePost();\n }\n },\n\n /**\n * @api private\n */\n preparePostFields: function preparePostFields(\n credentials,\n region,\n bucket,\n fields,\n conditions,\n expiresInSeconds\n ) {\n var now = this.getSkewCorrectedDate();\n if (!credentials || !region || !bucket) {\n throw new Error('Unable to create a POST object policy without a bucket,'\n + ' region, and credentials');\n }\n fields = AWS.util.copy(fields || {});\n conditions = (conditions || []).slice(0);\n expiresInSeconds = expiresInSeconds || 3600;\n\n var signingDate = AWS.util.date.iso8601(now).replace(/[:\\-]|\\.\\d{3}/g, '');\n var shortDate = signingDate.substr(0, 8);\n var scope = v4Credentials.createScope(shortDate, region, 's3');\n var credential = credentials.accessKeyId + '/' + scope;\n\n fields['bucket'] = bucket;\n fields['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256';\n fields['X-Amz-Credential'] = credential;\n fields['X-Amz-Date'] = signingDate;\n if (credentials.sessionToken) {\n fields['X-Amz-Security-Token'] = credentials.sessionToken;\n }\n for (var field in fields) {\n if (fields.hasOwnProperty(field)) {\n var condition = {};\n condition[field] = fields[field];\n conditions.push(condition);\n }\n }\n\n fields.Policy = this.preparePostPolicy(\n new Date(now.valueOf() + expiresInSeconds * 1000),\n conditions\n );\n fields['X-Amz-Signature'] = AWS.util.crypto.hmac(\n v4Credentials.getSigningKey(credentials, shortDate, region, 's3', true),\n fields.Policy,\n 'hex'\n );\n\n return fields;\n },\n\n /**\n * @api private\n */\n preparePostPolicy: function preparePostPolicy(expiration, conditions) {\n return AWS.util.base64.encode(JSON.stringify({\n expiration: AWS.util.date.iso8601(expiration),\n conditions: conditions\n }));\n },\n\n /**\n * @api private\n */\n prepareSignedUrl: function prepareSignedUrl(request) {\n request.addListener('validate', request.service.noPresignedContentLength);\n request.removeListener('build', request.service.addContentType);\n if (!request.params.Body) {\n // no Content-MD5/SHA-256 if body is not provided\n request.removeListener('build', request.service.computeContentMd5);\n } else {\n request.addListener('afterBuild', AWS.EventListeners.Core.COMPUTE_SHA256);\n }\n },\n\n /**\n * @api private\n * @param request\n */\n disableBodySigning: function disableBodySigning(request) {\n var headers = request.httpRequest.headers;\n // Add the header to anything that isn't a presigned url, unless that presigned url had a body defined\n if (!Object.prototype.hasOwnProperty.call(headers, 'presigned-expires')) {\n headers['X-Amz-Content-Sha256'] = 'UNSIGNED-PAYLOAD';\n }\n },\n\n /**\n * @api private\n */\n noPresignedContentLength: function noPresignedContentLength(request) {\n if (request.params.ContentLength !== undefined) {\n throw AWS.util.error(new Error(), {code: 'UnexpectedParameter',\n message: 'ContentLength is not supported in pre-signed URLs.'});\n }\n },\n\n createBucket: function createBucket(params, callback) {\n // When creating a bucket *outside* the classic region, the location\n // constraint must be set for the bucket and it must match the endpoint.\n // This chunk of code will set the location constraint param based\n // on the region (when possible), but it will not override a passed-in\n // location constraint.\n if (typeof params === 'function' || !params) {\n callback = callback || params;\n params = {};\n }\n var hostname = this.endpoint.hostname;\n // copy params so that appending keys does not unintentioinallly\n // mutate params object argument passed in by user\n var copiedParams = AWS.util.copy(params);\n\n if (hostname !== this.api.globalEndpoint && !params.CreateBucketConfiguration) {\n copiedParams.CreateBucketConfiguration = { LocationConstraint: this.config.region };\n }\n return this.makeRequest('createBucket', copiedParams, callback);\n },\n\n writeGetObjectResponse: function writeGetObjectResponse(params, callback) {\n\n var request = this.makeRequest('writeGetObjectResponse', AWS.util.copy(params), callback);\n var hostname = this.endpoint.hostname;\n if (hostname.indexOf(this.config.region) !== -1) {\n // hostname specifies a region already\n hostname = hostname.replace('s3.', OBJECT_LAMBDA_SERVICE + '.');\n } else {\n // Hostname doesn't have a region.\n // Object Lambda requires an explicit region.\n hostname = hostname.replace('s3.', OBJECT_LAMBDA_SERVICE + '.' + this.config.region + '.');\n }\n\n request.httpRequest.endpoint = new AWS.Endpoint(hostname, this.config);\n return request;\n },\n\n /**\n * @see AWS.S3.ManagedUpload\n * @overload upload(params = {}, [options], [callback])\n * Uploads an arbitrarily sized buffer, blob, or stream, using intelligent\n * concurrent handling of parts if the payload is large enough. You can\n * configure the concurrent queue size by setting `options`. Note that this\n * is the only operation for which the SDK can retry requests with stream\n * bodies.\n *\n * @param (see AWS.S3.putObject)\n * @option (see AWS.S3.ManagedUpload.constructor)\n * @return [AWS.S3.ManagedUpload] the managed upload object that can call\n * `send()` or track progress.\n * @example Uploading a stream object\n * var params = {Bucket: 'bucket', Key: 'key', Body: stream};\n * s3.upload(params, function(err, data) {\n * console.log(err, data);\n * });\n * @example Uploading a stream with concurrency of 1 and partSize of 10mb\n * var params = {Bucket: 'bucket', Key: 'key', Body: stream};\n * var options = {partSize: 10 * 1024 * 1024, queueSize: 1};\n * s3.upload(params, options, function(err, data) {\n * console.log(err, data);\n * });\n * @callback callback function(err, data)\n * @param err [Error] an error or null if no error occurred.\n * @param data [map] The response data from the successful upload:\n * @param data.Location [String] the URL of the uploaded object\n * @param data.ETag [String] the ETag of the uploaded object\n * @param data.Bucket [String] the bucket to which the object was uploaded\n * @param data.Key [String] the key to which the object was uploaded\n */\n upload: function upload(params, options, callback) {\n if (typeof options === 'function' && callback === undefined) {\n callback = options;\n options = null;\n }\n\n options = options || {};\n options = AWS.util.merge(options || {}, {service: this, params: params});\n\n var uploader = new AWS.S3.ManagedUpload(options);\n if (typeof callback === 'function') uploader.send(callback);\n return uploader;\n }\n});\n\n/**\n * @api private\n */\nAWS.S3.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n this.prototype.getSignedUrlPromise = AWS.util.promisifyMethod('getSignedUrl', PromiseDependency);\n};\n\n/**\n * @api private\n */\nAWS.S3.deletePromisesFromClass = function deletePromisesFromClass() {\n delete this.prototype.getSignedUrlPromise;\n};\n\nAWS.util.addPromises(AWS.S3);\n","var AWS = require('../core');\nvar s3util = require('./s3util');\nvar regionUtil = require('../region_config');\n\nAWS.util.update(AWS.S3Control.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('extractError', this.extractHostId);\n request.addListener('extractData', this.extractHostId);\n request.addListener('validate', this.validateAccountId);\n\n var isArnInBucket = s3util.isArnInParam(request, 'Bucket');\n var isArnInName = s3util.isArnInParam(request, 'Name');\n\n if (isArnInBucket) {\n request._parsedArn = AWS.util.ARN.parse(request.params['Bucket']);\n request.addListener('validate', this.validateOutpostsBucketArn);\n request.addListener('validate', s3util.validateOutpostsArn);\n request.addListener('afterBuild', this.addOutpostIdHeader);\n } else if (isArnInName) {\n request._parsedArn = AWS.util.ARN.parse(request.params['Name']);\n request.addListener('validate', s3util.validateOutpostsAccessPointArn);\n request.addListener('validate', s3util.validateOutpostsArn);\n request.addListener('afterBuild', this.addOutpostIdHeader);\n }\n\n if (isArnInBucket || isArnInName) {\n request.addListener('validate', s3util.validateArnRegion);\n request.addListener('validate', this.validateArnAccountWithParams, true);\n request.addListener('validate', s3util.validateArnAccount);\n request.addListener('validate', s3util.validateArnService);\n request.addListener('build', this.populateParamFromArn, true);\n request.addListener('build', this.populateUriFromArn);\n request.addListener('build', s3util.validatePopulateUriFromArn);\n }\n\n if (request.params.OutpostId &&\n (request.operation === 'createBucket' ||\n request.operation === 'listRegionalBuckets')) {\n request.addListener('build', this.populateEndpointForOutpostId);\n }\n },\n\n /**\n * Adds outpostId header\n */\n addOutpostIdHeader: function addOutpostIdHeader(req) {\n req.httpRequest.headers['x-amz-outpost-id'] = req._parsedArn.outpostId;\n },\n\n /**\n * Validate Outposts ARN supplied in Bucket parameter is a valid bucket name\n */\n validateOutpostsBucketArn: function validateOutpostsBucketArn(req) {\n var parsedArn = req._parsedArn;\n\n //can be ':' or '/'\n var delimiter = parsedArn.resource['outpost'.length];\n\n if (parsedArn.resource.split(delimiter).length !== 4) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Bucket ARN should have two resources outpost/{outpostId}/bucket/{accesspointName}'\n });\n }\n\n var bucket = parsedArn.resource.split(delimiter)[3];\n if (!s3util.dnsCompatibleBucketName(bucket) || bucket.match(/\\./)) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Bucket ARN is not DNS compatible. Got ' + bucket\n });\n }\n\n //set parsed valid bucket\n req._parsedArn.bucket = bucket;\n },\n\n /**\n * @api private\n */\n populateParamFromArn: function populateParamFromArn(req) {\n var parsedArn = req._parsedArn;\n if (s3util.isArnInParam(req, 'Bucket')) {\n req.params.Bucket = parsedArn.bucket;\n } else if (s3util.isArnInParam(req, 'Name')) {\n req.params.Name = parsedArn.accessPoint;\n }\n },\n\n /**\n * Populate URI according to the ARN\n */\n populateUriFromArn: function populateUriFromArn(req) {\n var parsedArn = req._parsedArn;\n\n var endpoint = req.httpRequest.endpoint;\n var useArnRegion = req.service.config.s3UseArnRegion;\n\n endpoint.hostname = [\n 's3-outposts',\n useArnRegion ? parsedArn.region : req.service.config.region,\n 'amazonaws.com'\n ].join('.');\n endpoint.host = endpoint.hostname;\n },\n\n /**\n * @api private\n */\n populateEndpointForOutpostId: function populateEndpointForOutpostId(req) {\n var endpoint = req.httpRequest.endpoint;\n endpoint.hostname = [\n 's3-outposts',\n req.service.config.region,\n 'amazonaws.com'\n ].join('.');\n endpoint.host = endpoint.hostname;\n },\n\n /**\n * @api private\n */\n extractHostId: function(response) {\n var hostId = response.httpResponse.headers ? response.httpResponse.headers['x-amz-id-2'] : null;\n response.extendedRequestId = hostId;\n if (response.error) {\n response.error.extendedRequestId = hostId;\n }\n },\n\n /**\n * @api private\n */\n validateArnAccountWithParams: function validateArnAccountWithParams(req) {\n var params = req.params;\n var inputModel = req.service.api.operations[req.operation].input;\n if (inputModel.members.AccountId) {\n var parsedArn = req._parsedArn;\n if (parsedArn.accountId) {\n if (params.AccountId) {\n if (params.AccountId !== parsedArn.accountId) {\n throw AWS.util.error(\n new Error(),\n {code: 'ValidationError', message: 'AccountId in ARN and request params should be same.'}\n );\n }\n } else {\n // Store accountId from ARN in params\n params.AccountId = parsedArn.accountId;\n }\n }\n }\n },\n\n /**\n * @api private\n */\n validateAccountId: function(request) {\n var params = request.params;\n if (!Object.prototype.hasOwnProperty.call(params, 'AccountId')) return;\n var accountId = params.AccountId;\n //validate type\n if (typeof accountId !== 'string') {\n throw AWS.util.error(\n new Error(),\n {code: 'ValidationError', message: 'AccountId must be a string.'}\n );\n }\n //validate length\n if (accountId.length < 1 || accountId.length > 63) {\n throw AWS.util.error(\n new Error(),\n {code: 'ValidationError', message: 'AccountId length should be between 1 to 63 characters, inclusive.'}\n );\n }\n //validate pattern\n var hostPattern = /^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9]$/;\n if (!hostPattern.test(accountId)) {\n throw AWS.util.error(new Error(),\n {code: 'ValidationError', message: 'AccountId should be hostname compatible. AccountId: ' + accountId});\n }\n },\n\n /**\n * @api private\n */\n getSigningName: function getSigningName(req) {\n var _super = AWS.Service.prototype.getSigningName;\n if (req && req._parsedArn && req._parsedArn.service) {\n return req._parsedArn.service;\n } else if (req.params.OutpostId &&\n (req.operation === 'createBucket' ||\n req.operation === 'listRegionalBuckets')) {\n return 's3-outposts';\n } else {\n return _super.call(this, req);\n }\n },\n});\n","var AWS = require('../core');\nvar regionUtil = require('../region_config');\n\nvar s3util = {\n /**\n * @api private\n */\n isArnInParam: function isArnInParam(req, paramName) {\n var inputShape = (req.service.api.operations[req.operation] || {}).input || {};\n var inputMembers = inputShape.members || {};\n if (!req.params[paramName] || !inputMembers[paramName]) return false;\n return AWS.util.ARN.validate(req.params[paramName]);\n },\n\n /**\n * Validate service component from ARN supplied in Bucket parameter\n */\n validateArnService: function validateArnService(req) {\n var parsedArn = req._parsedArn;\n\n if (parsedArn.service !== 's3'\n && parsedArn.service !== 's3-outposts'\n && parsedArn.service !== 's3-object-lambda') {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'expect \\'s3\\' or \\'s3-outposts\\' or \\'s3-object-lambda\\' in ARN service component'\n });\n }\n },\n\n /**\n * Validate account ID from ARN supplied in Bucket parameter is a valid account\n */\n validateArnAccount: function validateArnAccount(req) {\n var parsedArn = req._parsedArn;\n\n if (!/[0-9]{12}/.exec(parsedArn.accountId)) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'ARN accountID does not match regex \"[0-9]{12}\"'\n });\n }\n },\n\n /**\n * Validate ARN supplied in Bucket parameter is a valid access point ARN\n */\n validateS3AccessPointArn: function validateS3AccessPointArn(req) {\n var parsedArn = req._parsedArn;\n\n //can be ':' or '/'\n var delimiter = parsedArn.resource['accesspoint'.length];\n\n if (parsedArn.resource.split(delimiter).length !== 2) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Access Point ARN should have one resource accesspoint/{accesspointName}'\n });\n }\n\n var accessPoint = parsedArn.resource.split(delimiter)[1];\n var accessPointPrefix = accessPoint + '-' + parsedArn.accountId;\n if (!s3util.dnsCompatibleBucketName(accessPointPrefix) || accessPointPrefix.match(/\\./)) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Access point resource in ARN is not DNS compatible. Got ' + accessPoint\n });\n }\n\n //set parsed valid access point\n req._parsedArn.accessPoint = accessPoint;\n },\n\n /**\n * Validate Outposts ARN supplied in Bucket parameter is a valid outposts ARN\n */\n validateOutpostsArn: function validateOutpostsArn(req) {\n var parsedArn = req._parsedArn;\n\n if (\n parsedArn.resource.indexOf('outpost:') !== 0 &&\n parsedArn.resource.indexOf('outpost/') !== 0\n ) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'ARN resource should begin with \\'outpost/\\''\n });\n }\n\n //can be ':' or '/'\n var delimiter = parsedArn.resource['outpost'.length];\n var outpostId = parsedArn.resource.split(delimiter)[1];\n var dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);\n if (!dnsHostRegex.test(outpostId)) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Outpost resource in ARN is not DNS compatible. Got ' + outpostId\n });\n }\n req._parsedArn.outpostId = outpostId;\n },\n\n /**\n * Validate Outposts ARN supplied in Bucket parameter is a valid outposts ARN\n */\n validateOutpostsAccessPointArn: function validateOutpostsAccessPointArn(req) {\n var parsedArn = req._parsedArn;\n\n //can be ':' or '/'\n var delimiter = parsedArn.resource['outpost'.length];\n\n if (parsedArn.resource.split(delimiter).length !== 4) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Outposts ARN should have two resources outpost/{outpostId}/accesspoint/{accesspointName}'\n });\n }\n\n var accessPoint = parsedArn.resource.split(delimiter)[3];\n var accessPointPrefix = accessPoint + '-' + parsedArn.accountId;\n if (!s3util.dnsCompatibleBucketName(accessPointPrefix) || accessPointPrefix.match(/\\./)) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Access point resource in ARN is not DNS compatible. Got ' + accessPoint\n });\n }\n\n //set parsed valid access point\n req._parsedArn.accessPoint = accessPoint;\n },\n\n /**\n * Validate region field in ARN supplied in Bucket parameter is a valid region\n */\n validateArnRegion: function validateArnRegion(req) {\n var useArnRegion = s3util.loadUseArnRegionConfig(req);\n var regionFromArn = req._parsedArn.region;\n var clientRegion = req.service.config.region;\n\n if (!regionFromArn) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'ARN region is empty'\n });\n }\n\n if (\n clientRegion.indexOf('fips') >= 0 ||\n regionFromArn.indexOf('fips') >= 0\n ) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'ARN endpoint is not compatible with FIPS region'\n });\n }\n\n if (!useArnRegion && regionFromArn !== clientRegion) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'Configured region conflicts with access point region'\n });\n } else if (\n useArnRegion &&\n regionUtil.getEndpointSuffix(regionFromArn) !== regionUtil.getEndpointSuffix(clientRegion)\n ) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'Configured region and access point region not in same partition'\n });\n }\n\n if (req.service.config.useAccelerateEndpoint) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'useAccelerateEndpoint config is not supported with access point ARN'\n });\n }\n\n if (req._parsedArn.service === 's3-outposts' && req.service.config.useDualstack) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'useDualstack config is not supported with outposts access point ARN'\n });\n }\n },\n\n loadUseArnRegionConfig: function loadUseArnRegionConfig(req) {\n var envName = 'AWS_S3_USE_ARN_REGION';\n var configName = 's3_use_arn_region';\n var useArnRegion = true;\n var originalConfig = req.service._originalConfig || {};\n if (req.service.config.s3UseArnRegion !== undefined) {\n return req.service.config.s3UseArnRegion;\n } else if (originalConfig.s3UseArnRegion !== undefined) {\n useArnRegion = originalConfig.s3UseArnRegion === true;\n } else if (AWS.util.isNode()) {\n //load from environmental variable AWS_USE_ARN_REGION\n if (process.env[envName]) {\n var value = process.env[envName].trim().toLowerCase();\n if (['false', 'true'].indexOf(value) < 0) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: envName + ' only accepts true or false. Got ' + process.env[envName],\n retryable: false\n });\n }\n useArnRegion = value === 'true';\n } else { //load from shared config property use_arn_region\n var profiles = {};\n var profile = {};\n try {\n profiles = AWS.util.getProfilesFromSharedConfig(AWS.util.iniLoader);\n profile = profiles[process.env.AWS_PROFILE || AWS.util.defaultProfile];\n } catch (e) {}\n if (profile[configName]) {\n if (['false', 'true'].indexOf(profile[configName].trim().toLowerCase()) < 0) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: configName + ' only accepts true or false. Got ' + profile[configName],\n retryable: false\n });\n }\n useArnRegion = profile[configName].trim().toLowerCase() === 'true';\n }\n }\n }\n req.service.config.s3UseArnRegion = useArnRegion;\n return useArnRegion;\n },\n\n /**\n * Validations before URI can be populated\n */\n validatePopulateUriFromArn: function validatePopulateUriFromArn(req) {\n if (req.service._originalConfig && req.service._originalConfig.endpoint) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'Custom endpoint is not compatible with access point ARN'\n });\n }\n\n if (req.service.config.s3ForcePathStyle) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'Cannot construct path-style endpoint with access point'\n });\n }\n },\n\n /**\n * Returns true if the bucket name is DNS compatible. Buckets created\n * outside of the classic region MUST be DNS compatible.\n *\n * @api private\n */\n dnsCompatibleBucketName: function dnsCompatibleBucketName(bucketName) {\n var b = bucketName;\n var domain = new RegExp(/^[a-z0-9][a-z0-9\\.\\-]{1,61}[a-z0-9]$/);\n var ipAddress = new RegExp(/(\\d+\\.){3}\\d+/);\n var dots = new RegExp(/\\.\\./);\n return (b.match(domain) && !b.match(ipAddress) && !b.match(dots)) ? true : false;\n },\n};\n\n/**\n * @api private\n */\nmodule.exports = s3util;\n","var AWS = require('../core');\n\nAWS.util.update(AWS.SQS.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('build', this.buildEndpoint);\n\n if (request.service.config.computeChecksums) {\n if (request.operation === 'sendMessage') {\n request.addListener('extractData', this.verifySendMessageChecksum);\n } else if (request.operation === 'sendMessageBatch') {\n request.addListener('extractData', this.verifySendMessageBatchChecksum);\n } else if (request.operation === 'receiveMessage') {\n request.addListener('extractData', this.verifyReceiveMessageChecksum);\n }\n }\n },\n\n /**\n * @api private\n */\n verifySendMessageChecksum: function verifySendMessageChecksum(response) {\n if (!response.data) return;\n\n var md5 = response.data.MD5OfMessageBody;\n var body = this.params.MessageBody;\n var calculatedMd5 = this.service.calculateChecksum(body);\n if (calculatedMd5 !== md5) {\n var msg = 'Got \"' + response.data.MD5OfMessageBody +\n '\", expecting \"' + calculatedMd5 + '\".';\n this.service.throwInvalidChecksumError(response,\n [response.data.MessageId], msg);\n }\n },\n\n /**\n * @api private\n */\n verifySendMessageBatchChecksum: function verifySendMessageBatchChecksum(response) {\n if (!response.data) return;\n\n var service = this.service;\n var entries = {};\n var errors = [];\n var messageIds = [];\n AWS.util.arrayEach(response.data.Successful, function (entry) {\n entries[entry.Id] = entry;\n });\n AWS.util.arrayEach(this.params.Entries, function (entry) {\n if (entries[entry.Id]) {\n var md5 = entries[entry.Id].MD5OfMessageBody;\n var body = entry.MessageBody;\n if (!service.isChecksumValid(md5, body)) {\n errors.push(entry.Id);\n messageIds.push(entries[entry.Id].MessageId);\n }\n }\n });\n\n if (errors.length > 0) {\n service.throwInvalidChecksumError(response, messageIds,\n 'Invalid messages: ' + errors.join(', '));\n }\n },\n\n /**\n * @api private\n */\n verifyReceiveMessageChecksum: function verifyReceiveMessageChecksum(response) {\n if (!response.data) return;\n\n var service = this.service;\n var messageIds = [];\n AWS.util.arrayEach(response.data.Messages, function(message) {\n var md5 = message.MD5OfBody;\n var body = message.Body;\n if (!service.isChecksumValid(md5, body)) {\n messageIds.push(message.MessageId);\n }\n });\n\n if (messageIds.length > 0) {\n service.throwInvalidChecksumError(response, messageIds,\n 'Invalid messages: ' + messageIds.join(', '));\n }\n },\n\n /**\n * @api private\n */\n throwInvalidChecksumError: function throwInvalidChecksumError(response, ids, message) {\n response.error = AWS.util.error(new Error(), {\n retryable: true,\n code: 'InvalidChecksum',\n messageIds: ids,\n message: response.request.operation +\n ' returned an invalid MD5 response. ' + message\n });\n },\n\n /**\n * @api private\n */\n isChecksumValid: function isChecksumValid(checksum, data) {\n return this.calculateChecksum(data) === checksum;\n },\n\n /**\n * @api private\n */\n calculateChecksum: function calculateChecksum(data) {\n return AWS.util.crypto.md5(data, 'hex');\n },\n\n /**\n * @api private\n */\n buildEndpoint: function buildEndpoint(request) {\n var url = request.httpRequest.params.QueueUrl;\n if (url) {\n request.httpRequest.endpoint = new AWS.Endpoint(url);\n\n // signature version 4 requires the region name to be set,\n // sqs queue urls contain the region name\n var matches = request.httpRequest.endpoint.host.match(/^sqs\\.(.+?)\\./);\n if (matches) request.httpRequest.region = matches[1];\n }\n }\n});\n","var AWS = require('../core');\nvar resolveRegionalEndpointsFlag = require('../config_regional_endpoint');\nvar ENV_REGIONAL_ENDPOINT_ENABLED = 'AWS_STS_REGIONAL_ENDPOINTS';\nvar CONFIG_REGIONAL_ENDPOINT_ENABLED = 'sts_regional_endpoints';\n\nAWS.util.update(AWS.STS.prototype, {\n /**\n * @overload credentialsFrom(data, credentials = null)\n * Creates a credentials object from STS response data containing\n * credentials information. Useful for quickly setting AWS credentials.\n *\n * @note This is a low-level utility function. If you want to load temporary\n * credentials into your process for subsequent requests to AWS resources,\n * you should use {AWS.TemporaryCredentials} instead.\n * @param data [map] data retrieved from a call to {getFederatedToken},\n * {getSessionToken}, {assumeRole}, or {assumeRoleWithWebIdentity}.\n * @param credentials [AWS.Credentials] an optional credentials object to\n * fill instead of creating a new object. Useful when modifying an\n * existing credentials object from a refresh call.\n * @return [AWS.TemporaryCredentials] the set of temporary credentials\n * loaded from a raw STS operation response.\n * @example Using credentialsFrom to load global AWS credentials\n * var sts = new AWS.STS();\n * sts.getSessionToken(function (err, data) {\n * if (err) console.log(\"Error getting credentials\");\n * else {\n * AWS.config.credentials = sts.credentialsFrom(data);\n * }\n * });\n * @see AWS.TemporaryCredentials\n */\n credentialsFrom: function credentialsFrom(data, credentials) {\n if (!data) return null;\n if (!credentials) credentials = new AWS.TemporaryCredentials();\n credentials.expired = false;\n credentials.accessKeyId = data.Credentials.AccessKeyId;\n credentials.secretAccessKey = data.Credentials.SecretAccessKey;\n credentials.sessionToken = data.Credentials.SessionToken;\n credentials.expireTime = data.Credentials.Expiration;\n return credentials;\n },\n\n assumeRoleWithWebIdentity: function assumeRoleWithWebIdentity(params, callback) {\n return this.makeUnauthenticatedRequest('assumeRoleWithWebIdentity', params, callback);\n },\n\n assumeRoleWithSAML: function assumeRoleWithSAML(params, callback) {\n return this.makeUnauthenticatedRequest('assumeRoleWithSAML', params, callback);\n },\n\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('validate', this.optInRegionalEndpoint, true);\n },\n\n /**\n * @api private\n */\n optInRegionalEndpoint: function optInRegionalEndpoint(req) {\n var service = req.service;\n var config = service.config;\n config.stsRegionalEndpoints = resolveRegionalEndpointsFlag(service._originalConfig, {\n env: ENV_REGIONAL_ENDPOINT_ENABLED,\n sharedConfig: CONFIG_REGIONAL_ENDPOINT_ENABLED,\n clientConfig: 'stsRegionalEndpoints'\n });\n if (\n config.stsRegionalEndpoints === 'regional' &&\n service.isGlobalEndpoint\n ) {\n //client will throw if region is not supplied; request will be signed with specified region\n if (!config.region) {\n throw AWS.util.error(new Error(),\n {code: 'ConfigError', message: 'Missing region in config'});\n }\n var insertPoint = config.endpoint.indexOf('.amazonaws.com');\n var regionalEndpoint = config.endpoint.substring(0, insertPoint) +\n '.' + config.region + config.endpoint.substring(insertPoint);\n req.httpRequest.updateEndpoint(regionalEndpoint);\n req.httpRequest.region = config.region;\n }\n }\n\n});\n","var AWS = require('../core');\n\nAWS.util.hideProperties(AWS, ['SimpleWorkflow']);\n\n/**\n * @constant\n * @readonly\n * Backwards compatibility for access to the {AWS.SWF} service class.\n */\nAWS.SimpleWorkflow = AWS.SWF;\n","var IniLoader = require('./ini-loader').IniLoader;\n/**\n * Singleton object to load specified config/credentials files.\n * It will cache all the files ever loaded;\n */\nmodule.exports.iniLoader = new IniLoader();\n","var AWS = require('../core');\nvar os = require('os');\nvar path = require('path');\n\nfunction parseFile(filename, isConfig) {\n var content = AWS.util.ini.parse(AWS.util.readFileSync(filename));\n var tmpContent = {};\n Object.keys(content).forEach(function(profileName) {\n var profileContent = content[profileName];\n profileName = isConfig ? profileName.replace(/^profile\\s/, '') : profileName;\n Object.defineProperty(tmpContent, profileName, {\n value: profileContent,\n enumerable: true\n });\n });\n return tmpContent;\n}\n\n/**\n * Ini file loader class the same as that used in the SDK. It loads and\n * parses config and credentials files in .ini format and cache the content\n * to assure files are only read once.\n * Note that calling operations on the instance instantiated from this class\n * won't affect the behavior of SDK since SDK uses an internal singleton of\n * this class.\n * @!macro nobrowser\n */\nAWS.IniLoader = AWS.util.inherit({\n constructor: function IniLoader() {\n this.resolvedProfiles = {};\n },\n\n /** Remove all cached files. Used after config files are updated. */\n clearCachedFiles: function clearCachedFiles() {\n this.resolvedProfiles = {};\n },\n\n/**\n * Load configurations from config/credentials files and cache them\n * for later use. If no file is specified it will try to load default\n * files.\n * @param options [map] information describing the file\n * @option options filename [String] ('~/.aws/credentials' or defined by\n * AWS_SHARED_CREDENTIALS_FILE process env var or '~/.aws/config' if\n * isConfig is set to true)\n * path to the file to be read.\n * @option options isConfig [Boolean] (false) True to read config file.\n * @return [map] object containing contents from file in key-value\n * pairs.\n */\n loadFrom: function loadFrom(options) {\n options = options || {};\n var isConfig = options.isConfig === true;\n var filename = options.filename || this.getDefaultFilePath(isConfig);\n if (!this.resolvedProfiles[filename]) {\n var fileContent = this.parseFile(filename, isConfig);\n Object.defineProperty(this.resolvedProfiles, filename, { value: fileContent });\n }\n return this.resolvedProfiles[filename];\n },\n\n /**\n * @api private\n */\n parseFile: parseFile,\n\n /**\n * @api private\n */\n getDefaultFilePath: function getDefaultFilePath(isConfig) {\n return path.join(\n this.getHomeDir(),\n '.aws',\n isConfig ? 'config' : 'credentials'\n );\n },\n\n /**\n * @api private\n */\n getHomeDir: function getHomeDir() {\n var env = process.env;\n var home = env.HOME ||\n env.USERPROFILE ||\n (env.HOMEPATH ? ((env.HOMEDRIVE || 'C:/') + env.HOMEPATH) : null);\n\n if (home) {\n return home;\n }\n\n if (typeof os.homedir === 'function') {\n return os.homedir();\n }\n\n throw AWS.util.error(\n new Error('Cannot load credentials, HOME path not set')\n );\n }\n});\n\nvar IniLoader = AWS.IniLoader;\n\nmodule.exports = {\n IniLoader: IniLoader,\n parseFile: parseFile,\n};\n","var AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\n/**\n * @api private\n */\nvar expiresHeader = 'presigned-expires';\n\n/**\n * @api private\n */\nfunction signedUrlBuilder(request) {\n var expires = request.httpRequest.headers[expiresHeader];\n var signerClass = request.service.getSignerClass(request);\n\n delete request.httpRequest.headers['User-Agent'];\n delete request.httpRequest.headers['X-Amz-User-Agent'];\n\n if (signerClass === AWS.Signers.V4) {\n if (expires > 604800) { // one week expiry is invalid\n var message = 'Presigning does not support expiry time greater ' +\n 'than a week with SigV4 signing.';\n throw AWS.util.error(new Error(), {\n code: 'InvalidExpiryTime', message: message, retryable: false\n });\n }\n request.httpRequest.headers[expiresHeader] = expires;\n } else if (signerClass === AWS.Signers.S3) {\n var now = request.service ? request.service.getSkewCorrectedDate() : AWS.util.date.getDate();\n request.httpRequest.headers[expiresHeader] = parseInt(\n AWS.util.date.unixTimestamp(now) + expires, 10).toString();\n } else {\n throw AWS.util.error(new Error(), {\n message: 'Presigning only supports S3 or SigV4 signing.',\n code: 'UnsupportedSigner', retryable: false\n });\n }\n}\n\n/**\n * @api private\n */\nfunction signedUrlSigner(request) {\n var endpoint = request.httpRequest.endpoint;\n var parsedUrl = AWS.util.urlParse(request.httpRequest.path);\n var queryParams = {};\n\n if (parsedUrl.search) {\n queryParams = AWS.util.queryStringParse(parsedUrl.search.substr(1));\n }\n\n var auth = request.httpRequest.headers['Authorization'].split(' ');\n if (auth[0] === 'AWS') {\n auth = auth[1].split(':');\n queryParams['Signature'] = auth.pop();\n queryParams['AWSAccessKeyId'] = auth.join(':');\n\n AWS.util.each(request.httpRequest.headers, function (key, value) {\n if (key === expiresHeader) key = 'Expires';\n if (key.indexOf('x-amz-meta-') === 0) {\n // Delete existing, potentially not normalized key\n delete queryParams[key];\n key = key.toLowerCase();\n }\n queryParams[key] = value;\n });\n delete request.httpRequest.headers[expiresHeader];\n delete queryParams['Authorization'];\n delete queryParams['Host'];\n } else if (auth[0] === 'AWS4-HMAC-SHA256') { // SigV4 signing\n auth.shift();\n var rest = auth.join(' ');\n var signature = rest.match(/Signature=(.*?)(?:,|\\s|\\r?\\n|$)/)[1];\n queryParams['X-Amz-Signature'] = signature;\n delete queryParams['Expires'];\n }\n\n // build URL\n endpoint.pathname = parsedUrl.pathname;\n endpoint.search = AWS.util.queryParamsToString(queryParams);\n}\n\n/**\n * @api private\n */\nAWS.Signers.Presign = inherit({\n /**\n * @api private\n */\n sign: function sign(request, expireTime, callback) {\n request.httpRequest.headers[expiresHeader] = expireTime || 3600;\n request.on('build', signedUrlBuilder);\n request.on('sign', signedUrlSigner);\n request.removeListener('afterBuild',\n AWS.EventListeners.Core.SET_CONTENT_LENGTH);\n request.removeListener('afterBuild',\n AWS.EventListeners.Core.COMPUTE_SHA256);\n\n request.emit('beforePresign', [request]);\n\n if (callback) {\n request.build(function() {\n if (this.response.error) callback(this.response.error);\n else {\n callback(null, AWS.util.urlFormat(request.httpRequest.endpoint));\n }\n });\n } else {\n request.build();\n if (request.response.error) throw request.response.error;\n return AWS.util.urlFormat(request.httpRequest.endpoint);\n }\n }\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.Signers.Presign;\n","var AWS = require('../core');\n\nvar inherit = AWS.util.inherit;\n\n/**\n * @api private\n */\nAWS.Signers.RequestSigner = inherit({\n constructor: function RequestSigner(request) {\n this.request = request;\n },\n\n setServiceClientId: function setServiceClientId(id) {\n this.serviceClientId = id;\n },\n\n getServiceClientId: function getServiceClientId() {\n return this.serviceClientId;\n }\n});\n\nAWS.Signers.RequestSigner.getVersion = function getVersion(version) {\n switch (version) {\n case 'v2': return AWS.Signers.V2;\n case 'v3': return AWS.Signers.V3;\n case 's3v4': return AWS.Signers.V4;\n case 'v4': return AWS.Signers.V4;\n case 's3': return AWS.Signers.S3;\n case 'v3https': return AWS.Signers.V3Https;\n }\n throw new Error('Unknown signing version ' + version);\n};\n\nrequire('./v2');\nrequire('./v3');\nrequire('./v3https');\nrequire('./v4');\nrequire('./s3');\nrequire('./presign');\n","var AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\n/**\n * @api private\n */\nAWS.Signers.S3 = inherit(AWS.Signers.RequestSigner, {\n /**\n * When building the stringToSign, these sub resource params should be\n * part of the canonical resource string with their NON-decoded values\n */\n subResources: {\n 'acl': 1,\n 'accelerate': 1,\n 'analytics': 1,\n 'cors': 1,\n 'lifecycle': 1,\n 'delete': 1,\n 'inventory': 1,\n 'location': 1,\n 'logging': 1,\n 'metrics': 1,\n 'notification': 1,\n 'partNumber': 1,\n 'policy': 1,\n 'requestPayment': 1,\n 'replication': 1,\n 'restore': 1,\n 'tagging': 1,\n 'torrent': 1,\n 'uploadId': 1,\n 'uploads': 1,\n 'versionId': 1,\n 'versioning': 1,\n 'versions': 1,\n 'website': 1\n },\n\n // when building the stringToSign, these querystring params should be\n // part of the canonical resource string with their NON-encoded values\n responseHeaders: {\n 'response-content-type': 1,\n 'response-content-language': 1,\n 'response-expires': 1,\n 'response-cache-control': 1,\n 'response-content-disposition': 1,\n 'response-content-encoding': 1\n },\n\n addAuthorization: function addAuthorization(credentials, date) {\n if (!this.request.headers['presigned-expires']) {\n this.request.headers['X-Amz-Date'] = AWS.util.date.rfc822(date);\n }\n\n if (credentials.sessionToken) {\n // presigned URLs require this header to be lowercased\n this.request.headers['x-amz-security-token'] = credentials.sessionToken;\n }\n\n var signature = this.sign(credentials.secretAccessKey, this.stringToSign());\n var auth = 'AWS ' + credentials.accessKeyId + ':' + signature;\n\n this.request.headers['Authorization'] = auth;\n },\n\n stringToSign: function stringToSign() {\n var r = this.request;\n\n var parts = [];\n parts.push(r.method);\n parts.push(r.headers['Content-MD5'] || '');\n parts.push(r.headers['Content-Type'] || '');\n\n // This is the \"Date\" header, but we use X-Amz-Date.\n // The S3 signing mechanism requires us to pass an empty\n // string for this Date header regardless.\n parts.push(r.headers['presigned-expires'] || '');\n\n var headers = this.canonicalizedAmzHeaders();\n if (headers) parts.push(headers);\n parts.push(this.canonicalizedResource());\n\n return parts.join('\\n');\n\n },\n\n canonicalizedAmzHeaders: function canonicalizedAmzHeaders() {\n\n var amzHeaders = [];\n\n AWS.util.each(this.request.headers, function (name) {\n if (name.match(/^x-amz-/i))\n amzHeaders.push(name);\n });\n\n amzHeaders.sort(function (a, b) {\n return a.toLowerCase() < b.toLowerCase() ? -1 : 1;\n });\n\n var parts = [];\n AWS.util.arrayEach.call(this, amzHeaders, function (name) {\n parts.push(name.toLowerCase() + ':' + String(this.request.headers[name]));\n });\n\n return parts.join('\\n');\n\n },\n\n canonicalizedResource: function canonicalizedResource() {\n\n var r = this.request;\n\n var parts = r.path.split('?');\n var path = parts[0];\n var querystring = parts[1];\n\n var resource = '';\n\n if (r.virtualHostedBucket)\n resource += '/' + r.virtualHostedBucket;\n\n resource += path;\n\n if (querystring) {\n\n // collect a list of sub resources and query params that need to be signed\n var resources = [];\n\n AWS.util.arrayEach.call(this, querystring.split('&'), function (param) {\n var name = param.split('=')[0];\n var value = param.split('=')[1];\n if (this.subResources[name] || this.responseHeaders[name]) {\n var subresource = { name: name };\n if (value !== undefined) {\n if (this.subResources[name]) {\n subresource.value = value;\n } else {\n subresource.value = decodeURIComponent(value);\n }\n }\n resources.push(subresource);\n }\n });\n\n resources.sort(function (a, b) { return a.name < b.name ? -1 : 1; });\n\n if (resources.length) {\n\n querystring = [];\n AWS.util.arrayEach(resources, function (res) {\n if (res.value === undefined) {\n querystring.push(res.name);\n } else {\n querystring.push(res.name + '=' + res.value);\n }\n });\n\n resource += '?' + querystring.join('&');\n }\n\n }\n\n return resource;\n\n },\n\n sign: function sign(secret, string) {\n return AWS.util.crypto.hmac(secret, string, 'base64', 'sha1');\n }\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.Signers.S3;\n","var AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\n/**\n * @api private\n */\nAWS.Signers.V2 = inherit(AWS.Signers.RequestSigner, {\n addAuthorization: function addAuthorization(credentials, date) {\n\n if (!date) date = AWS.util.date.getDate();\n\n var r = this.request;\n\n r.params.Timestamp = AWS.util.date.iso8601(date);\n r.params.SignatureVersion = '2';\n r.params.SignatureMethod = 'HmacSHA256';\n r.params.AWSAccessKeyId = credentials.accessKeyId;\n\n if (credentials.sessionToken) {\n r.params.SecurityToken = credentials.sessionToken;\n }\n\n delete r.params.Signature; // delete old Signature for re-signing\n r.params.Signature = this.signature(credentials);\n\n r.body = AWS.util.queryParamsToString(r.params);\n r.headers['Content-Length'] = r.body.length;\n },\n\n signature: function signature(credentials) {\n return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64');\n },\n\n stringToSign: function stringToSign() {\n var parts = [];\n parts.push(this.request.method);\n parts.push(this.request.endpoint.host.toLowerCase());\n parts.push(this.request.pathname());\n parts.push(AWS.util.queryParamsToString(this.request.params));\n return parts.join('\\n');\n }\n\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.Signers.V2;\n","var AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\n/**\n * @api private\n */\nAWS.Signers.V3 = inherit(AWS.Signers.RequestSigner, {\n addAuthorization: function addAuthorization(credentials, date) {\n\n var datetime = AWS.util.date.rfc822(date);\n\n this.request.headers['X-Amz-Date'] = datetime;\n\n if (credentials.sessionToken) {\n this.request.headers['x-amz-security-token'] = credentials.sessionToken;\n }\n\n this.request.headers['X-Amzn-Authorization'] =\n this.authorization(credentials, datetime);\n\n },\n\n authorization: function authorization(credentials) {\n return 'AWS3 ' +\n 'AWSAccessKeyId=' + credentials.accessKeyId + ',' +\n 'Algorithm=HmacSHA256,' +\n 'SignedHeaders=' + this.signedHeaders() + ',' +\n 'Signature=' + this.signature(credentials);\n },\n\n signedHeaders: function signedHeaders() {\n var headers = [];\n AWS.util.arrayEach(this.headersToSign(), function iterator(h) {\n headers.push(h.toLowerCase());\n });\n return headers.sort().join(';');\n },\n\n canonicalHeaders: function canonicalHeaders() {\n var headers = this.request.headers;\n var parts = [];\n AWS.util.arrayEach(this.headersToSign(), function iterator(h) {\n parts.push(h.toLowerCase().trim() + ':' + String(headers[h]).trim());\n });\n return parts.sort().join('\\n') + '\\n';\n },\n\n headersToSign: function headersToSign() {\n var headers = [];\n AWS.util.each(this.request.headers, function iterator(k) {\n if (k === 'Host' || k === 'Content-Encoding' || k.match(/^X-Amz/i)) {\n headers.push(k);\n }\n });\n return headers;\n },\n\n signature: function signature(credentials) {\n return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64');\n },\n\n stringToSign: function stringToSign() {\n var parts = [];\n parts.push(this.request.method);\n parts.push('/');\n parts.push('');\n parts.push(this.canonicalHeaders());\n parts.push(this.request.body);\n return AWS.util.crypto.sha256(parts.join('\\n'));\n }\n\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.Signers.V3;\n","var AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\nrequire('./v3');\n\n/**\n * @api private\n */\nAWS.Signers.V3Https = inherit(AWS.Signers.V3, {\n authorization: function authorization(credentials) {\n return 'AWS3-HTTPS ' +\n 'AWSAccessKeyId=' + credentials.accessKeyId + ',' +\n 'Algorithm=HmacSHA256,' +\n 'Signature=' + this.signature(credentials);\n },\n\n stringToSign: function stringToSign() {\n return this.request.headers['X-Amz-Date'];\n }\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.Signers.V3Https;\n","var AWS = require('../core');\nvar v4Credentials = require('./v4_credentials');\nvar inherit = AWS.util.inherit;\n\n/**\n * @api private\n */\nvar expiresHeader = 'presigned-expires';\n\n/**\n * @api private\n */\nAWS.Signers.V4 = inherit(AWS.Signers.RequestSigner, {\n constructor: function V4(request, serviceName, options) {\n AWS.Signers.RequestSigner.call(this, request);\n this.serviceName = serviceName;\n options = options || {};\n this.signatureCache = typeof options.signatureCache === 'boolean' ? options.signatureCache : true;\n this.operation = options.operation;\n this.signatureVersion = options.signatureVersion;\n },\n\n algorithm: 'AWS4-HMAC-SHA256',\n\n addAuthorization: function addAuthorization(credentials, date) {\n var datetime = AWS.util.date.iso8601(date).replace(/[:\\-]|\\.\\d{3}/g, '');\n\n if (this.isPresigned()) {\n this.updateForPresigned(credentials, datetime);\n } else {\n this.addHeaders(credentials, datetime);\n }\n\n this.request.headers['Authorization'] =\n this.authorization(credentials, datetime);\n },\n\n addHeaders: function addHeaders(credentials, datetime) {\n this.request.headers['X-Amz-Date'] = datetime;\n if (credentials.sessionToken) {\n this.request.headers['x-amz-security-token'] = credentials.sessionToken;\n }\n },\n\n updateForPresigned: function updateForPresigned(credentials, datetime) {\n var credString = this.credentialString(datetime);\n var qs = {\n 'X-Amz-Date': datetime,\n 'X-Amz-Algorithm': this.algorithm,\n 'X-Amz-Credential': credentials.accessKeyId + '/' + credString,\n 'X-Amz-Expires': this.request.headers[expiresHeader],\n 'X-Amz-SignedHeaders': this.signedHeaders()\n };\n\n if (credentials.sessionToken) {\n qs['X-Amz-Security-Token'] = credentials.sessionToken;\n }\n\n if (this.request.headers['Content-Type']) {\n qs['Content-Type'] = this.request.headers['Content-Type'];\n }\n if (this.request.headers['Content-MD5']) {\n qs['Content-MD5'] = this.request.headers['Content-MD5'];\n }\n if (this.request.headers['Cache-Control']) {\n qs['Cache-Control'] = this.request.headers['Cache-Control'];\n }\n\n // need to pull in any other X-Amz-* headers\n AWS.util.each.call(this, this.request.headers, function(key, value) {\n if (key === expiresHeader) return;\n if (this.isSignableHeader(key)) {\n var lowerKey = key.toLowerCase();\n // Metadata should be normalized\n if (lowerKey.indexOf('x-amz-meta-') === 0) {\n qs[lowerKey] = value;\n } else if (lowerKey.indexOf('x-amz-') === 0) {\n qs[key] = value;\n }\n }\n });\n\n var sep = this.request.path.indexOf('?') >= 0 ? '&' : '?';\n this.request.path += sep + AWS.util.queryParamsToString(qs);\n },\n\n authorization: function authorization(credentials, datetime) {\n var parts = [];\n var credString = this.credentialString(datetime);\n parts.push(this.algorithm + ' Credential=' +\n credentials.accessKeyId + '/' + credString);\n parts.push('SignedHeaders=' + this.signedHeaders());\n parts.push('Signature=' + this.signature(credentials, datetime));\n return parts.join(', ');\n },\n\n signature: function signature(credentials, datetime) {\n var signingKey = v4Credentials.getSigningKey(\n credentials,\n datetime.substr(0, 8),\n this.request.region,\n this.serviceName,\n this.signatureCache\n );\n return AWS.util.crypto.hmac(signingKey, this.stringToSign(datetime), 'hex');\n },\n\n stringToSign: function stringToSign(datetime) {\n var parts = [];\n parts.push('AWS4-HMAC-SHA256');\n parts.push(datetime);\n parts.push(this.credentialString(datetime));\n parts.push(this.hexEncodedHash(this.canonicalString()));\n return parts.join('\\n');\n },\n\n canonicalString: function canonicalString() {\n var parts = [], pathname = this.request.pathname();\n if (this.serviceName !== 's3' && this.signatureVersion !== 's3v4') pathname = AWS.util.uriEscapePath(pathname);\n\n parts.push(this.request.method);\n parts.push(pathname);\n parts.push(this.request.search());\n parts.push(this.canonicalHeaders() + '\\n');\n parts.push(this.signedHeaders());\n parts.push(this.hexEncodedBodyHash());\n return parts.join('\\n');\n },\n\n canonicalHeaders: function canonicalHeaders() {\n var headers = [];\n AWS.util.each.call(this, this.request.headers, function (key, item) {\n headers.push([key, item]);\n });\n headers.sort(function (a, b) {\n return a[0].toLowerCase() < b[0].toLowerCase() ? -1 : 1;\n });\n var parts = [];\n AWS.util.arrayEach.call(this, headers, function (item) {\n var key = item[0].toLowerCase();\n if (this.isSignableHeader(key)) {\n var value = item[1];\n if (typeof value === 'undefined' || value === null || typeof value.toString !== 'function') {\n throw AWS.util.error(new Error('Header ' + key + ' contains invalid value'), {\n code: 'InvalidHeader'\n });\n }\n parts.push(key + ':' +\n this.canonicalHeaderValues(value.toString()));\n }\n });\n return parts.join('\\n');\n },\n\n canonicalHeaderValues: function canonicalHeaderValues(values) {\n return values.replace(/\\s+/g, ' ').replace(/^\\s+|\\s+$/g, '');\n },\n\n signedHeaders: function signedHeaders() {\n var keys = [];\n AWS.util.each.call(this, this.request.headers, function (key) {\n key = key.toLowerCase();\n if (this.isSignableHeader(key)) keys.push(key);\n });\n return keys.sort().join(';');\n },\n\n credentialString: function credentialString(datetime) {\n return v4Credentials.createScope(\n datetime.substr(0, 8),\n this.request.region,\n this.serviceName\n );\n },\n\n hexEncodedHash: function hash(string) {\n return AWS.util.crypto.sha256(string, 'hex');\n },\n\n hexEncodedBodyHash: function hexEncodedBodyHash() {\n var request = this.request;\n if (this.isPresigned() && this.serviceName === 's3' && !request.body) {\n return 'UNSIGNED-PAYLOAD';\n } else if (request.headers['X-Amz-Content-Sha256']) {\n return request.headers['X-Amz-Content-Sha256'];\n } else {\n return this.hexEncodedHash(this.request.body || '');\n }\n },\n\n unsignableHeaders: [\n 'authorization',\n 'content-type',\n 'content-length',\n 'user-agent',\n expiresHeader,\n 'expect',\n 'x-amzn-trace-id'\n ],\n\n isSignableHeader: function isSignableHeader(key) {\n if (key.toLowerCase().indexOf('x-amz-') === 0) return true;\n return this.unsignableHeaders.indexOf(key) < 0;\n },\n\n isPresigned: function isPresigned() {\n return this.request.headers[expiresHeader] ? true : false;\n }\n\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.Signers.V4;\n","var AWS = require('../core');\n\n/**\n * @api private\n */\nvar cachedSecret = {};\n\n/**\n * @api private\n */\nvar cacheQueue = [];\n\n/**\n * @api private\n */\nvar maxCacheEntries = 50;\n\n/**\n * @api private\n */\nvar v4Identifier = 'aws4_request';\n\n/**\n * @api private\n */\nmodule.exports = {\n /**\n * @api private\n *\n * @param date [String]\n * @param region [String]\n * @param serviceName [String]\n * @return [String]\n */\n createScope: function createScope(date, region, serviceName) {\n return [\n date.substr(0, 8),\n region,\n serviceName,\n v4Identifier\n ].join('/');\n },\n\n /**\n * @api private\n *\n * @param credentials [Credentials]\n * @param date [String]\n * @param region [String]\n * @param service [String]\n * @param shouldCache [Boolean]\n * @return [String]\n */\n getSigningKey: function getSigningKey(\n credentials,\n date,\n region,\n service,\n shouldCache\n ) {\n var credsIdentifier = AWS.util.crypto\n .hmac(credentials.secretAccessKey, credentials.accessKeyId, 'base64');\n var cacheKey = [credsIdentifier, date, region, service].join('_');\n shouldCache = shouldCache !== false;\n if (shouldCache && (cacheKey in cachedSecret)) {\n return cachedSecret[cacheKey];\n }\n\n var kDate = AWS.util.crypto.hmac(\n 'AWS4' + credentials.secretAccessKey,\n date,\n 'buffer'\n );\n var kRegion = AWS.util.crypto.hmac(kDate, region, 'buffer');\n var kService = AWS.util.crypto.hmac(kRegion, service, 'buffer');\n\n var signingKey = AWS.util.crypto.hmac(kService, v4Identifier, 'buffer');\n if (shouldCache) {\n cachedSecret[cacheKey] = signingKey;\n cacheQueue.push(cacheKey);\n if (cacheQueue.length > maxCacheEntries) {\n // remove the oldest entry (not the least recently used)\n delete cachedSecret[cacheQueue.shift()];\n }\n }\n\n return signingKey;\n },\n\n /**\n * @api private\n *\n * Empties the derived signing key cache. Made available for testing purposes\n * only.\n */\n emptyCache: function emptyCache() {\n cachedSecret = {};\n cacheQueue = [];\n }\n};\n","function AcceptorStateMachine(states, state) {\n this.currentState = state || null;\n this.states = states || {};\n}\n\nAcceptorStateMachine.prototype.runTo = function runTo(finalState, done, bindObject, inputError) {\n if (typeof finalState === 'function') {\n inputError = bindObject; bindObject = done;\n done = finalState; finalState = null;\n }\n\n var self = this;\n var state = self.states[self.currentState];\n state.fn.call(bindObject || self, inputError, function(err) {\n if (err) {\n if (state.fail) self.currentState = state.fail;\n else return done ? done.call(bindObject, err) : null;\n } else {\n if (state.accept) self.currentState = state.accept;\n else return done ? done.call(bindObject) : null;\n }\n if (self.currentState === finalState) {\n return done ? done.call(bindObject, err) : null;\n }\n\n self.runTo(finalState, done, bindObject, err);\n });\n};\n\nAcceptorStateMachine.prototype.addState = function addState(name, acceptState, failState, fn) {\n if (typeof acceptState === 'function') {\n fn = acceptState; acceptState = null; failState = null;\n } else if (typeof failState === 'function') {\n fn = failState; failState = null;\n }\n\n if (!this.currentState) this.currentState = name;\n this.states[name] = { accept: acceptState, fail: failState, fn: fn };\n return this;\n};\n\n/**\n * @api private\n */\nmodule.exports = AcceptorStateMachine;\n","/* eslint guard-for-in:0 */\nvar AWS;\n\n/**\n * A set of utility methods for use with the AWS SDK.\n *\n * @!attribute abort\n * Return this value from an iterator function {each} or {arrayEach}\n * to break out of the iteration.\n * @example Breaking out of an iterator function\n * AWS.util.each({a: 1, b: 2, c: 3}, function(key, value) {\n * if (key == 'b') return AWS.util.abort;\n * });\n * @see each\n * @see arrayEach\n * @api private\n */\nvar util = {\n environment: 'nodejs',\n engine: function engine() {\n if (util.isBrowser() && typeof navigator !== 'undefined') {\n return navigator.userAgent;\n } else {\n var engine = process.platform + '/' + process.version;\n if (process.env.AWS_EXECUTION_ENV) {\n engine += ' exec-env/' + process.env.AWS_EXECUTION_ENV;\n }\n return engine;\n }\n },\n\n userAgent: function userAgent() {\n var name = util.environment;\n var agent = 'aws-sdk-' + name + '/' + require('./core').VERSION;\n if (name === 'nodejs') agent += ' ' + util.engine();\n return agent;\n },\n\n uriEscape: function uriEscape(string) {\n var output = encodeURIComponent(string);\n output = output.replace(/[^A-Za-z0-9_.~\\-%]+/g, escape);\n\n // AWS percent-encodes some extra non-standard characters in a URI\n output = output.replace(/[*]/g, function(ch) {\n return '%' + ch.charCodeAt(0).toString(16).toUpperCase();\n });\n\n return output;\n },\n\n uriEscapePath: function uriEscapePath(string) {\n var parts = [];\n util.arrayEach(string.split('/'), function (part) {\n parts.push(util.uriEscape(part));\n });\n return parts.join('/');\n },\n\n urlParse: function urlParse(url) {\n return util.url.parse(url);\n },\n\n urlFormat: function urlFormat(url) {\n return util.url.format(url);\n },\n\n queryStringParse: function queryStringParse(qs) {\n return util.querystring.parse(qs);\n },\n\n queryParamsToString: function queryParamsToString(params) {\n var items = [];\n var escape = util.uriEscape;\n var sortedKeys = Object.keys(params).sort();\n\n util.arrayEach(sortedKeys, function(name) {\n var value = params[name];\n var ename = escape(name);\n var result = ename + '=';\n if (Array.isArray(value)) {\n var vals = [];\n util.arrayEach(value, function(item) { vals.push(escape(item)); });\n result = ename + '=' + vals.sort().join('&' + ename + '=');\n } else if (value !== undefined && value !== null) {\n result = ename + '=' + escape(value);\n }\n items.push(result);\n });\n\n return items.join('&');\n },\n\n readFileSync: function readFileSync(path) {\n if (util.isBrowser()) return null;\n return require('fs').readFileSync(path, 'utf-8');\n },\n\n base64: {\n encode: function encode64(string) {\n if (typeof string === 'number') {\n throw util.error(new Error('Cannot base64 encode number ' + string));\n }\n if (string === null || typeof string === 'undefined') {\n return string;\n }\n var buf = util.buffer.toBuffer(string);\n return buf.toString('base64');\n },\n\n decode: function decode64(string) {\n if (typeof string === 'number') {\n throw util.error(new Error('Cannot base64 decode number ' + string));\n }\n if (string === null || typeof string === 'undefined') {\n return string;\n }\n return util.buffer.toBuffer(string, 'base64');\n }\n\n },\n\n buffer: {\n /**\n * Buffer constructor for Node buffer and buffer pollyfill\n */\n toBuffer: function(data, encoding) {\n return (typeof util.Buffer.from === 'function' && util.Buffer.from !== Uint8Array.from) ?\n util.Buffer.from(data, encoding) : new util.Buffer(data, encoding);\n },\n\n alloc: function(size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new Error('size passed to alloc must be a number.');\n }\n if (typeof util.Buffer.alloc === 'function') {\n return util.Buffer.alloc(size, fill, encoding);\n } else {\n var buf = new util.Buffer(size);\n if (fill !== undefined && typeof buf.fill === 'function') {\n buf.fill(fill, undefined, undefined, encoding);\n }\n return buf;\n }\n },\n\n toStream: function toStream(buffer) {\n if (!util.Buffer.isBuffer(buffer)) buffer = util.buffer.toBuffer(buffer);\n\n var readable = new (util.stream.Readable)();\n var pos = 0;\n readable._read = function(size) {\n if (pos >= buffer.length) return readable.push(null);\n\n var end = pos + size;\n if (end > buffer.length) end = buffer.length;\n readable.push(buffer.slice(pos, end));\n pos = end;\n };\n\n return readable;\n },\n\n /**\n * Concatenates a list of Buffer objects.\n */\n concat: function(buffers) {\n var length = 0,\n offset = 0,\n buffer = null, i;\n\n for (i = 0; i < buffers.length; i++) {\n length += buffers[i].length;\n }\n\n buffer = util.buffer.alloc(length);\n\n for (i = 0; i < buffers.length; i++) {\n buffers[i].copy(buffer, offset);\n offset += buffers[i].length;\n }\n\n return buffer;\n }\n },\n\n string: {\n byteLength: function byteLength(string) {\n if (string === null || string === undefined) return 0;\n if (typeof string === 'string') string = util.buffer.toBuffer(string);\n\n if (typeof string.byteLength === 'number') {\n return string.byteLength;\n } else if (typeof string.length === 'number') {\n return string.length;\n } else if (typeof string.size === 'number') {\n return string.size;\n } else if (typeof string.path === 'string') {\n return require('fs').lstatSync(string.path).size;\n } else {\n throw util.error(new Error('Cannot determine length of ' + string),\n { object: string });\n }\n },\n\n upperFirst: function upperFirst(string) {\n return string[0].toUpperCase() + string.substr(1);\n },\n\n lowerFirst: function lowerFirst(string) {\n return string[0].toLowerCase() + string.substr(1);\n }\n },\n\n ini: {\n parse: function string(ini) {\n var currentSection, map = {};\n util.arrayEach(ini.split(/\\r?\\n/), function(line) {\n line = line.split(/(^|\\s)[;#]/)[0]; // remove comments\n var section = line.match(/^\\s*\\[([^\\[\\]]+)\\]\\s*$/);\n if (section) {\n currentSection = section[1];\n if (currentSection === '__proto__' || currentSection.split(/\\s/)[1] === '__proto__') {\n throw util.error(\n new Error('Cannot load profile name \\'' + currentSection + '\\' from shared ini file.')\n );\n }\n } else if (currentSection) {\n var item = line.match(/^\\s*(.+?)\\s*=\\s*(.+?)\\s*$/);\n if (item) {\n map[currentSection] = map[currentSection] || {};\n map[currentSection][item[1]] = item[2];\n }\n }\n });\n\n return map;\n }\n },\n\n fn: {\n noop: function() {},\n callback: function (err) { if (err) throw err; },\n\n /**\n * Turn a synchronous function into as \"async\" function by making it call\n * a callback. The underlying function is called with all but the last argument,\n * which is treated as the callback. The callback is passed passed a first argument\n * of null on success to mimick standard node callbacks.\n */\n makeAsync: function makeAsync(fn, expectedArgs) {\n if (expectedArgs && expectedArgs <= fn.length) {\n return fn;\n }\n\n return function() {\n var args = Array.prototype.slice.call(arguments, 0);\n var callback = args.pop();\n var result = fn.apply(null, args);\n callback(result);\n };\n }\n },\n\n /**\n * Date and time utility functions.\n */\n date: {\n\n /**\n * @return [Date] the current JavaScript date object. Since all\n * AWS services rely on this date object, you can override\n * this function to provide a special time value to AWS service\n * requests.\n */\n getDate: function getDate() {\n if (!AWS) AWS = require('./core');\n if (AWS.config.systemClockOffset) { // use offset when non-zero\n return new Date(new Date().getTime() + AWS.config.systemClockOffset);\n } else {\n return new Date();\n }\n },\n\n /**\n * @return [String] the date in ISO-8601 format\n */\n iso8601: function iso8601(date) {\n if (date === undefined) { date = util.date.getDate(); }\n return date.toISOString().replace(/\\.\\d{3}Z$/, 'Z');\n },\n\n /**\n * @return [String] the date in RFC 822 format\n */\n rfc822: function rfc822(date) {\n if (date === undefined) { date = util.date.getDate(); }\n return date.toUTCString();\n },\n\n /**\n * @return [Integer] the UNIX timestamp value for the current time\n */\n unixTimestamp: function unixTimestamp(date) {\n if (date === undefined) { date = util.date.getDate(); }\n return date.getTime() / 1000;\n },\n\n /**\n * @param [String,number,Date] date\n * @return [Date]\n */\n from: function format(date) {\n if (typeof date === 'number') {\n return new Date(date * 1000); // unix timestamp\n } else {\n return new Date(date);\n }\n },\n\n /**\n * Given a Date or date-like value, this function formats the\n * date into a string of the requested value.\n * @param [String,number,Date] date\n * @param [String] formatter Valid formats are:\n # * 'iso8601'\n # * 'rfc822'\n # * 'unixTimestamp'\n * @return [String]\n */\n format: function format(date, formatter) {\n if (!formatter) formatter = 'iso8601';\n return util.date[formatter](util.date.from(date));\n },\n\n parseTimestamp: function parseTimestamp(value) {\n if (typeof value === 'number') { // unix timestamp (number)\n return new Date(value * 1000);\n } else if (value.match(/^\\d+$/)) { // unix timestamp\n return new Date(value * 1000);\n } else if (value.match(/^\\d{4}/)) { // iso8601\n return new Date(value);\n } else if (value.match(/^\\w{3},/)) { // rfc822\n return new Date(value);\n } else {\n throw util.error(\n new Error('unhandled timestamp format: ' + value),\n {code: 'TimestampParserError'});\n }\n }\n\n },\n\n crypto: {\n crc32Table: [\n 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419,\n 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4,\n 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07,\n 0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,\n 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856,\n 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9,\n 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4,\n 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,\n 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3,\n 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A,\n 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599,\n 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,\n 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190,\n 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F,\n 0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E,\n 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,\n 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED,\n 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950,\n 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3,\n 0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,\n 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A,\n 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5,\n 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010,\n 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,\n 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17,\n 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6,\n 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615,\n 0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,\n 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344,\n 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB,\n 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A,\n 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,\n 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1,\n 0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C,\n 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF,\n 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,\n 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE,\n 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31,\n 0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C,\n 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,\n 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B,\n 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242,\n 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1,\n 0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,\n 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278,\n 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7,\n 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66,\n 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,\n 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605,\n 0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8,\n 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B,\n 0x2D02EF8D],\n\n crc32: function crc32(data) {\n var tbl = util.crypto.crc32Table;\n var crc = 0 ^ -1;\n\n if (typeof data === 'string') {\n data = util.buffer.toBuffer(data);\n }\n\n for (var i = 0; i < data.length; i++) {\n var code = data.readUInt8(i);\n crc = (crc >>> 8) ^ tbl[(crc ^ code) & 0xFF];\n }\n return (crc ^ -1) >>> 0;\n },\n\n hmac: function hmac(key, string, digest, fn) {\n if (!digest) digest = 'binary';\n if (digest === 'buffer') { digest = undefined; }\n if (!fn) fn = 'sha256';\n if (typeof string === 'string') string = util.buffer.toBuffer(string);\n return util.crypto.lib.createHmac(fn, key).update(string).digest(digest);\n },\n\n md5: function md5(data, digest, callback) {\n return util.crypto.hash('md5', data, digest, callback);\n },\n\n sha256: function sha256(data, digest, callback) {\n return util.crypto.hash('sha256', data, digest, callback);\n },\n\n hash: function(algorithm, data, digest, callback) {\n var hash = util.crypto.createHash(algorithm);\n if (!digest) { digest = 'binary'; }\n if (digest === 'buffer') { digest = undefined; }\n if (typeof data === 'string') data = util.buffer.toBuffer(data);\n var sliceFn = util.arraySliceFn(data);\n var isBuffer = util.Buffer.isBuffer(data);\n //Identifying objects with an ArrayBuffer as buffers\n if (util.isBrowser() && typeof ArrayBuffer !== 'undefined' && data && data.buffer instanceof ArrayBuffer) isBuffer = true;\n\n if (callback && typeof data === 'object' &&\n typeof data.on === 'function' && !isBuffer) {\n data.on('data', function(chunk) { hash.update(chunk); });\n data.on('error', function(err) { callback(err); });\n data.on('end', function() { callback(null, hash.digest(digest)); });\n } else if (callback && sliceFn && !isBuffer &&\n typeof FileReader !== 'undefined') {\n // this might be a File/Blob\n var index = 0, size = 1024 * 512;\n var reader = new FileReader();\n reader.onerror = function() {\n callback(new Error('Failed to read data.'));\n };\n reader.onload = function() {\n var buf = new util.Buffer(new Uint8Array(reader.result));\n hash.update(buf);\n index += buf.length;\n reader._continueReading();\n };\n reader._continueReading = function() {\n if (index >= data.size) {\n callback(null, hash.digest(digest));\n return;\n }\n\n var back = index + size;\n if (back > data.size) back = data.size;\n reader.readAsArrayBuffer(sliceFn.call(data, index, back));\n };\n\n reader._continueReading();\n } else {\n if (util.isBrowser() && typeof data === 'object' && !isBuffer) {\n data = new util.Buffer(new Uint8Array(data));\n }\n var out = hash.update(data).digest(digest);\n if (callback) callback(null, out);\n return out;\n }\n },\n\n toHex: function toHex(data) {\n var out = [];\n for (var i = 0; i < data.length; i++) {\n out.push(('0' + data.charCodeAt(i).toString(16)).substr(-2, 2));\n }\n return out.join('');\n },\n\n createHash: function createHash(algorithm) {\n return util.crypto.lib.createHash(algorithm);\n }\n\n },\n\n /** @!ignore */\n\n /* Abort constant */\n abort: {},\n\n each: function each(object, iterFunction) {\n for (var key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n var ret = iterFunction.call(this, key, object[key]);\n if (ret === util.abort) break;\n }\n }\n },\n\n arrayEach: function arrayEach(array, iterFunction) {\n for (var idx in array) {\n if (Object.prototype.hasOwnProperty.call(array, idx)) {\n var ret = iterFunction.call(this, array[idx], parseInt(idx, 10));\n if (ret === util.abort) break;\n }\n }\n },\n\n update: function update(obj1, obj2) {\n util.each(obj2, function iterator(key, item) {\n obj1[key] = item;\n });\n return obj1;\n },\n\n merge: function merge(obj1, obj2) {\n return util.update(util.copy(obj1), obj2);\n },\n\n copy: function copy(object) {\n if (object === null || object === undefined) return object;\n var dupe = {};\n // jshint forin:false\n for (var key in object) {\n dupe[key] = object[key];\n }\n return dupe;\n },\n\n isEmpty: function isEmpty(obj) {\n for (var prop in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n return false;\n }\n }\n return true;\n },\n\n arraySliceFn: function arraySliceFn(obj) {\n var fn = obj.slice || obj.webkitSlice || obj.mozSlice;\n return typeof fn === 'function' ? fn : null;\n },\n\n isType: function isType(obj, type) {\n // handle cross-\"frame\" objects\n if (typeof type === 'function') type = util.typeName(type);\n return Object.prototype.toString.call(obj) === '[object ' + type + ']';\n },\n\n typeName: function typeName(type) {\n if (Object.prototype.hasOwnProperty.call(type, 'name')) return type.name;\n var str = type.toString();\n var match = str.match(/^\\s*function (.+)\\(/);\n return match ? match[1] : str;\n },\n\n error: function error(err, options) {\n var originalError = null;\n if (typeof err.message === 'string' && err.message !== '') {\n if (typeof options === 'string' || (options && options.message)) {\n originalError = util.copy(err);\n originalError.message = err.message;\n }\n }\n err.message = err.message || null;\n\n if (typeof options === 'string') {\n err.message = options;\n } else if (typeof options === 'object' && options !== null) {\n util.update(err, options);\n if (options.message)\n err.message = options.message;\n if (options.code || options.name)\n err.code = options.code || options.name;\n if (options.stack)\n err.stack = options.stack;\n }\n\n if (typeof Object.defineProperty === 'function') {\n Object.defineProperty(err, 'name', {writable: true, enumerable: false});\n Object.defineProperty(err, 'message', {enumerable: true});\n }\n\n err.name = String(options && options.name || err.name || err.code || 'Error');\n err.time = new Date();\n\n if (originalError) err.originalError = originalError;\n\n return err;\n },\n\n /**\n * @api private\n */\n inherit: function inherit(klass, features) {\n var newObject = null;\n if (features === undefined) {\n features = klass;\n klass = Object;\n newObject = {};\n } else {\n var ctor = function ConstructorWrapper() {};\n ctor.prototype = klass.prototype;\n newObject = new ctor();\n }\n\n // constructor not supplied, create pass-through ctor\n if (features.constructor === Object) {\n features.constructor = function() {\n if (klass !== Object) {\n return klass.apply(this, arguments);\n }\n };\n }\n\n features.constructor.prototype = newObject;\n util.update(features.constructor.prototype, features);\n features.constructor.__super__ = klass;\n return features.constructor;\n },\n\n /**\n * @api private\n */\n mixin: function mixin() {\n var klass = arguments[0];\n for (var i = 1; i < arguments.length; i++) {\n // jshint forin:false\n for (var prop in arguments[i].prototype) {\n var fn = arguments[i].prototype[prop];\n if (prop !== 'constructor') {\n klass.prototype[prop] = fn;\n }\n }\n }\n return klass;\n },\n\n /**\n * @api private\n */\n hideProperties: function hideProperties(obj, props) {\n if (typeof Object.defineProperty !== 'function') return;\n\n util.arrayEach(props, function (key) {\n Object.defineProperty(obj, key, {\n enumerable: false, writable: true, configurable: true });\n });\n },\n\n /**\n * @api private\n */\n property: function property(obj, name, value, enumerable, isValue) {\n var opts = {\n configurable: true,\n enumerable: enumerable !== undefined ? enumerable : true\n };\n if (typeof value === 'function' && !isValue) {\n opts.get = value;\n }\n else {\n opts.value = value; opts.writable = true;\n }\n\n Object.defineProperty(obj, name, opts);\n },\n\n /**\n * @api private\n */\n memoizedProperty: function memoizedProperty(obj, name, get, enumerable) {\n var cachedValue = null;\n\n // build enumerable attribute for each value with lazy accessor.\n util.property(obj, name, function() {\n if (cachedValue === null) {\n cachedValue = get();\n }\n return cachedValue;\n }, enumerable);\n },\n\n /**\n * TODO Remove in major version revision\n * This backfill populates response data without the\n * top-level payload name.\n *\n * @api private\n */\n hoistPayloadMember: function hoistPayloadMember(resp) {\n var req = resp.request;\n var operationName = req.operation;\n var operation = req.service.api.operations[operationName];\n var output = operation.output;\n if (output.payload && !operation.hasEventOutput) {\n var payloadMember = output.members[output.payload];\n var responsePayload = resp.data[output.payload];\n if (payloadMember.type === 'structure') {\n util.each(responsePayload, function(key, value) {\n util.property(resp.data, key, value, false);\n });\n }\n }\n },\n\n /**\n * Compute SHA-256 checksums of streams\n *\n * @api private\n */\n computeSha256: function computeSha256(body, done) {\n if (util.isNode()) {\n var Stream = util.stream.Stream;\n var fs = require('fs');\n if (typeof Stream === 'function' && body instanceof Stream) {\n if (typeof body.path === 'string') { // assume file object\n var settings = {};\n if (typeof body.start === 'number') {\n settings.start = body.start;\n }\n if (typeof body.end === 'number') {\n settings.end = body.end;\n }\n body = fs.createReadStream(body.path, settings);\n } else { // TODO support other stream types\n return done(new Error('Non-file stream objects are ' +\n 'not supported with SigV4'));\n }\n }\n }\n\n util.crypto.sha256(body, 'hex', function(err, sha) {\n if (err) done(err);\n else done(null, sha);\n });\n },\n\n /**\n * @api private\n */\n isClockSkewed: function isClockSkewed(serverTime) {\n if (serverTime) {\n util.property(AWS.config, 'isClockSkewed',\n Math.abs(new Date().getTime() - serverTime) >= 300000, false);\n return AWS.config.isClockSkewed;\n }\n },\n\n applyClockOffset: function applyClockOffset(serverTime) {\n if (serverTime)\n AWS.config.systemClockOffset = serverTime - new Date().getTime();\n },\n\n /**\n * @api private\n */\n extractRequestId: function extractRequestId(resp) {\n var requestId = resp.httpResponse.headers['x-amz-request-id'] ||\n resp.httpResponse.headers['x-amzn-requestid'];\n\n if (!requestId && resp.data && resp.data.ResponseMetadata) {\n requestId = resp.data.ResponseMetadata.RequestId;\n }\n\n if (requestId) {\n resp.requestId = requestId;\n }\n\n if (resp.error) {\n resp.error.requestId = requestId;\n }\n },\n\n /**\n * @api private\n */\n addPromises: function addPromises(constructors, PromiseDependency) {\n var deletePromises = false;\n if (PromiseDependency === undefined && AWS && AWS.config) {\n PromiseDependency = AWS.config.getPromisesDependency();\n }\n if (PromiseDependency === undefined && typeof Promise !== 'undefined') {\n PromiseDependency = Promise;\n }\n if (typeof PromiseDependency !== 'function') deletePromises = true;\n if (!Array.isArray(constructors)) constructors = [constructors];\n\n for (var ind = 0; ind < constructors.length; ind++) {\n var constructor = constructors[ind];\n if (deletePromises) {\n if (constructor.deletePromisesFromClass) {\n constructor.deletePromisesFromClass();\n }\n } else if (constructor.addPromisesToClass) {\n constructor.addPromisesToClass(PromiseDependency);\n }\n }\n },\n\n /**\n * @api private\n * Return a function that will return a promise whose fate is decided by the\n * callback behavior of the given method with `methodName`. The method to be\n * promisified should conform to node.js convention of accepting a callback as\n * last argument and calling that callback with error as the first argument\n * and success value on the second argument.\n */\n promisifyMethod: function promisifyMethod(methodName, PromiseDependency) {\n return function promise() {\n var self = this;\n var args = Array.prototype.slice.call(arguments);\n return new PromiseDependency(function(resolve, reject) {\n args.push(function(err, data) {\n if (err) {\n reject(err);\n } else {\n resolve(data);\n }\n });\n self[methodName].apply(self, args);\n });\n };\n },\n\n /**\n * @api private\n */\n isDualstackAvailable: function isDualstackAvailable(service) {\n if (!service) return false;\n var metadata = require('../apis/metadata.json');\n if (typeof service !== 'string') service = service.serviceIdentifier;\n if (typeof service !== 'string' || !metadata.hasOwnProperty(service)) return false;\n return !!metadata[service].dualstackAvailable;\n },\n\n /**\n * @api private\n */\n calculateRetryDelay: function calculateRetryDelay(retryCount, retryDelayOptions, err) {\n if (!retryDelayOptions) retryDelayOptions = {};\n var customBackoff = retryDelayOptions.customBackoff || null;\n if (typeof customBackoff === 'function') {\n return customBackoff(retryCount, err);\n }\n var base = typeof retryDelayOptions.base === 'number' ? retryDelayOptions.base : 100;\n var delay = Math.random() * (Math.pow(2, retryCount) * base);\n return delay;\n },\n\n /**\n * @api private\n */\n handleRequestWithRetries: function handleRequestWithRetries(httpRequest, options, cb) {\n if (!options) options = {};\n var http = AWS.HttpClient.getInstance();\n var httpOptions = options.httpOptions || {};\n var retryCount = 0;\n\n var errCallback = function(err) {\n var maxRetries = options.maxRetries || 0;\n if (err && err.code === 'TimeoutError') err.retryable = true;\n\n // Call `calculateRetryDelay()` only when relevant, see #3401\n if (err && err.retryable && retryCount < maxRetries) {\n var delay = util.calculateRetryDelay(retryCount, options.retryDelayOptions, err);\n if (delay >= 0) {\n retryCount++;\n setTimeout(sendRequest, delay + (err.retryAfter || 0));\n return;\n }\n }\n cb(err);\n };\n\n var sendRequest = function() {\n var data = '';\n http.handleRequest(httpRequest, httpOptions, function(httpResponse) {\n httpResponse.on('data', function(chunk) { data += chunk.toString(); });\n httpResponse.on('end', function() {\n var statusCode = httpResponse.statusCode;\n if (statusCode < 300) {\n cb(null, data);\n } else {\n var retryAfter = parseInt(httpResponse.headers['retry-after'], 10) * 1000 || 0;\n var err = util.error(new Error(),\n {\n statusCode: statusCode,\n retryable: statusCode >= 500 || statusCode === 429\n }\n );\n if (retryAfter && err.retryable) err.retryAfter = retryAfter;\n errCallback(err);\n }\n });\n }, errCallback);\n };\n\n AWS.util.defer(sendRequest);\n },\n\n /**\n * @api private\n */\n uuid: {\n v4: function uuidV4() {\n return require('uuid').v4();\n }\n },\n\n /**\n * @api private\n */\n convertPayloadToString: function convertPayloadToString(resp) {\n var req = resp.request;\n var operation = req.operation;\n var rules = req.service.api.operations[operation].output || {};\n if (rules.payload && resp.data[rules.payload]) {\n resp.data[rules.payload] = resp.data[rules.payload].toString();\n }\n },\n\n /**\n * @api private\n */\n defer: function defer(callback) {\n if (typeof process === 'object' && typeof process.nextTick === 'function') {\n process.nextTick(callback);\n } else if (typeof setImmediate === 'function') {\n setImmediate(callback);\n } else {\n setTimeout(callback, 0);\n }\n },\n\n /**\n * @api private\n */\n getRequestPayloadShape: function getRequestPayloadShape(req) {\n var operations = req.service.api.operations;\n if (!operations) return undefined;\n var operation = (operations || {})[req.operation];\n if (!operation || !operation.input || !operation.input.payload) return undefined;\n return operation.input.members[operation.input.payload];\n },\n\n getProfilesFromSharedConfig: function getProfilesFromSharedConfig(iniLoader, filename) {\n var profiles = {};\n var profilesFromConfig = {};\n if (process.env[util.configOptInEnv]) {\n var profilesFromConfig = iniLoader.loadFrom({\n isConfig: true,\n filename: process.env[util.sharedConfigFileEnv]\n });\n }\n var profilesFromCreds= {};\n try {\n var profilesFromCreds = iniLoader.loadFrom({\n filename: filename ||\n (process.env[util.configOptInEnv] && process.env[util.sharedCredentialsFileEnv])\n });\n } catch (error) {\n // if using config, assume it is fully descriptive without a credentials file:\n if (!process.env[util.configOptInEnv]) throw error;\n }\n for (var i = 0, profileNames = Object.keys(profilesFromConfig); i < profileNames.length; i++) {\n profiles[profileNames[i]] = objectAssign(profiles[profileNames[i]] || {}, profilesFromConfig[profileNames[i]]);\n }\n for (var i = 0, profileNames = Object.keys(profilesFromCreds); i < profileNames.length; i++) {\n profiles[profileNames[i]] = objectAssign(profiles[profileNames[i]] || {}, profilesFromCreds[profileNames[i]]);\n }\n return profiles;\n\n /**\n * Roughly the semantics of `Object.assign(target, source)`\n */\n function objectAssign(target, source) {\n for (var i = 0, keys = Object.keys(source); i < keys.length; i++) {\n target[keys[i]] = source[keys[i]];\n }\n return target;\n }\n },\n\n /**\n * @api private\n */\n ARN: {\n validate: function validateARN(str) {\n return str && str.indexOf('arn:') === 0 && str.split(':').length >= 6;\n },\n parse: function parseARN(arn) {\n var matched = arn.split(':');\n return {\n partition: matched[1],\n service: matched[2],\n region: matched[3],\n accountId: matched[4],\n resource: matched.slice(5).join(':')\n };\n },\n build: function buildARN(arnObject) {\n if (\n arnObject.service === undefined ||\n arnObject.region === undefined ||\n arnObject.accountId === undefined ||\n arnObject.resource === undefined\n ) throw util.error(new Error('Input ARN object is invalid'));\n return 'arn:'+ (arnObject.partition || 'aws') + ':' + arnObject.service +\n ':' + arnObject.region + ':' + arnObject.accountId + ':' + arnObject.resource;\n }\n },\n\n /**\n * @api private\n */\n defaultProfile: 'default',\n\n /**\n * @api private\n */\n configOptInEnv: 'AWS_SDK_LOAD_CONFIG',\n\n /**\n * @api private\n */\n sharedCredentialsFileEnv: 'AWS_SHARED_CREDENTIALS_FILE',\n\n /**\n * @api private\n */\n sharedConfigFileEnv: 'AWS_CONFIG_FILE',\n\n /**\n * @api private\n */\n imdsDisabledEnv: 'AWS_EC2_METADATA_DISABLED'\n};\n\n/**\n * @api private\n */\nmodule.exports = util;\n","var util = require('../util');\nvar XmlNode = require('./xml-node').XmlNode;\nvar XmlText = require('./xml-text').XmlText;\n\nfunction XmlBuilder() { }\n\nXmlBuilder.prototype.toXML = function(params, shape, rootElement, noEmpty) {\n var xml = new XmlNode(rootElement);\n applyNamespaces(xml, shape, true);\n serialize(xml, params, shape);\n return xml.children.length > 0 || noEmpty ? xml.toString() : '';\n};\n\nfunction serialize(xml, value, shape) {\n switch (shape.type) {\n case 'structure': return serializeStructure(xml, value, shape);\n case 'map': return serializeMap(xml, value, shape);\n case 'list': return serializeList(xml, value, shape);\n default: return serializeScalar(xml, value, shape);\n }\n}\n\nfunction serializeStructure(xml, params, shape) {\n util.arrayEach(shape.memberNames, function(memberName) {\n var memberShape = shape.members[memberName];\n if (memberShape.location !== 'body') return;\n\n var value = params[memberName];\n var name = memberShape.name;\n if (value !== undefined && value !== null) {\n if (memberShape.isXmlAttribute) {\n xml.addAttribute(name, value);\n } else if (memberShape.flattened) {\n serialize(xml, value, memberShape);\n } else {\n var element = new XmlNode(name);\n xml.addChildNode(element);\n applyNamespaces(element, memberShape);\n serialize(element, value, memberShape);\n }\n }\n });\n}\n\nfunction serializeMap(xml, map, shape) {\n var xmlKey = shape.key.name || 'key';\n var xmlValue = shape.value.name || 'value';\n\n util.each(map, function(key, value) {\n var entry = new XmlNode(shape.flattened ? shape.name : 'entry');\n xml.addChildNode(entry);\n\n var entryKey = new XmlNode(xmlKey);\n var entryValue = new XmlNode(xmlValue);\n entry.addChildNode(entryKey);\n entry.addChildNode(entryValue);\n\n serialize(entryKey, key, shape.key);\n serialize(entryValue, value, shape.value);\n });\n}\n\nfunction serializeList(xml, list, shape) {\n if (shape.flattened) {\n util.arrayEach(list, function(value) {\n var name = shape.member.name || shape.name;\n var element = new XmlNode(name);\n xml.addChildNode(element);\n serialize(element, value, shape.member);\n });\n } else {\n util.arrayEach(list, function(value) {\n var name = shape.member.name || 'member';\n var element = new XmlNode(name);\n xml.addChildNode(element);\n serialize(element, value, shape.member);\n });\n }\n}\n\nfunction serializeScalar(xml, value, shape) {\n xml.addChildNode(\n new XmlText(shape.toWireFormat(value))\n );\n}\n\nfunction applyNamespaces(xml, shape, isRoot) {\n var uri, prefix = 'xmlns';\n if (shape.xmlNamespaceUri) {\n uri = shape.xmlNamespaceUri;\n if (shape.xmlNamespacePrefix) prefix += ':' + shape.xmlNamespacePrefix;\n } else if (isRoot && shape.api.xmlNamespaceUri) {\n uri = shape.api.xmlNamespaceUri;\n }\n\n if (uri) xml.addAttribute(prefix, uri);\n}\n\n/**\n * @api private\n */\nmodule.exports = XmlBuilder;\n","/**\n * Escapes characters that can not be in an XML attribute.\n */\nfunction escapeAttribute(value) {\n return value.replace(/&/g, '&').replace(/'/g, ''').replace(//g, '>').replace(/\"/g, '"');\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n escapeAttribute: escapeAttribute\n};\n","/**\n * Escapes characters that can not be in an XML element.\n */\nfunction escapeElement(value) {\n return value.replace(/&/g, '&').replace(//g, '>');\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n escapeElement: escapeElement\n};\n","var AWS = require('../core');\nvar util = AWS.util;\nvar Shape = AWS.Model.Shape;\n\nvar xml2js = require('xml2js');\n\n/**\n * @api private\n */\nvar options = { // options passed to xml2js parser\n explicitCharkey: false, // undocumented\n trim: false, // trim the leading/trailing whitespace from text nodes\n normalize: false, // trim interior whitespace inside text nodes\n explicitRoot: false, // return the root node in the resulting object?\n emptyTag: null, // the default value for empty nodes\n explicitArray: true, // always put child nodes in an array\n ignoreAttrs: false, // ignore attributes, only create text nodes\n mergeAttrs: false, // merge attributes and child elements\n validator: null // a callable validator\n};\n\nfunction NodeXmlParser() { }\n\nNodeXmlParser.prototype.parse = function(xml, shape) {\n shape = shape || {};\n\n var result = null;\n var error = null;\n\n var parser = new xml2js.Parser(options);\n parser.parseString(xml, function (e, r) {\n error = e;\n result = r;\n });\n\n if (result) {\n var data = parseXml(result, shape);\n if (result.ResponseMetadata) {\n data.ResponseMetadata = parseXml(result.ResponseMetadata[0], {});\n }\n return data;\n } else if (error) {\n throw util.error(error, {code: 'XMLParserError', retryable: true});\n } else { // empty xml document\n return parseXml({}, shape);\n }\n};\n\nfunction parseXml(xml, shape) {\n switch (shape.type) {\n case 'structure': return parseStructure(xml, shape);\n case 'map': return parseMap(xml, shape);\n case 'list': return parseList(xml, shape);\n case undefined: case null: return parseUnknown(xml);\n default: return parseScalar(xml, shape);\n }\n}\n\nfunction parseStructure(xml, shape) {\n var data = {};\n if (xml === null) return data;\n\n util.each(shape.members, function(memberName, memberShape) {\n var xmlName = memberShape.name;\n if (Object.prototype.hasOwnProperty.call(xml, xmlName) && Array.isArray(xml[xmlName])) {\n var xmlChild = xml[xmlName];\n if (!memberShape.flattened) xmlChild = xmlChild[0];\n\n data[memberName] = parseXml(xmlChild, memberShape);\n } else if (memberShape.isXmlAttribute &&\n xml.$ && Object.prototype.hasOwnProperty.call(xml.$, xmlName)) {\n data[memberName] = parseScalar(xml.$[xmlName], memberShape);\n } else if (memberShape.type === 'list' && !shape.api.xmlNoDefaultLists) {\n data[memberName] = memberShape.defaultValue;\n }\n });\n\n return data;\n}\n\nfunction parseMap(xml, shape) {\n var data = {};\n if (xml === null) return data;\n\n var xmlKey = shape.key.name || 'key';\n var xmlValue = shape.value.name || 'value';\n var iterable = shape.flattened ? xml : xml.entry;\n\n if (Array.isArray(iterable)) {\n util.arrayEach(iterable, function(child) {\n data[child[xmlKey][0]] = parseXml(child[xmlValue][0], shape.value);\n });\n }\n\n return data;\n}\n\nfunction parseList(xml, shape) {\n var data = [];\n var name = shape.member.name || 'member';\n if (shape.flattened) {\n util.arrayEach(xml, function(xmlChild) {\n data.push(parseXml(xmlChild, shape.member));\n });\n } else if (xml && Array.isArray(xml[name])) {\n util.arrayEach(xml[name], function(child) {\n data.push(parseXml(child, shape.member));\n });\n }\n\n return data;\n}\n\nfunction parseScalar(text, shape) {\n if (text && text.$ && text.$.encoding === 'base64') {\n shape = new Shape.create({type: text.$.encoding});\n }\n if (text && text._) text = text._;\n\n if (typeof shape.toType === 'function') {\n return shape.toType(text);\n } else {\n return text;\n }\n}\n\nfunction parseUnknown(xml) {\n if (xml === undefined || xml === null) return '';\n if (typeof xml === 'string') return xml;\n\n // parse a list\n if (Array.isArray(xml)) {\n var arr = [];\n for (i = 0; i < xml.length; i++) {\n arr.push(parseXml(xml[i], {}));\n }\n return arr;\n }\n\n // empty object\n var keys = Object.keys(xml), i;\n if (keys.length === 0 || (keys.length === 1 && keys[0] === '$')) {\n return {};\n }\n\n // object, parse as structure\n var data = {};\n for (i = 0; i < keys.length; i++) {\n var key = keys[i], value = xml[key];\n if (key === '$') continue;\n if (value.length > 1) { // this member is a list\n data[key] = parseList(value, {member: {}});\n } else { // this member is a single item\n data[key] = parseXml(value[0], {});\n }\n }\n return data;\n}\n\n/**\n * @api private\n */\nmodule.exports = NodeXmlParser;\n","var escapeAttribute = require('./escape-attribute').escapeAttribute;\n\n/**\n * Represents an XML node.\n * @api private\n */\nfunction XmlNode(name, children) {\n if (children === void 0) { children = []; }\n this.name = name;\n this.children = children;\n this.attributes = {};\n}\nXmlNode.prototype.addAttribute = function (name, value) {\n this.attributes[name] = value;\n return this;\n};\nXmlNode.prototype.addChildNode = function (child) {\n this.children.push(child);\n return this;\n};\nXmlNode.prototype.removeAttribute = function (name) {\n delete this.attributes[name];\n return this;\n};\nXmlNode.prototype.toString = function () {\n var hasChildren = Boolean(this.children.length);\n var xmlText = '<' + this.name;\n // add attributes\n var attributes = this.attributes;\n for (var i = 0, attributeNames = Object.keys(attributes); i < attributeNames.length; i++) {\n var attributeName = attributeNames[i];\n var attribute = attributes[attributeName];\n if (typeof attribute !== 'undefined' && attribute !== null) {\n xmlText += ' ' + attributeName + '=\\\"' + escapeAttribute('' + attribute) + '\\\"';\n }\n }\n return xmlText += !hasChildren ? '/>' : '>' + this.children.map(function (c) { return c.toString(); }).join('') + '';\n};\n\n/**\n * @api private\n */\nmodule.exports = {\n XmlNode: XmlNode\n};\n","var escapeElement = require('./escape-element').escapeElement;\n\n/**\n * Represents an XML text value.\n * @api private\n */\nfunction XmlText(value) {\n this.value = value;\n}\n\nXmlText.prototype.toString = function () {\n return escapeElement('' + this.value);\n};\n\n/**\n * @api private\n */\nmodule.exports = {\n XmlText: XmlText\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar LRU_1 = require(\"./utils/LRU\");\nvar CACHE_SIZE = 1000;\n/**\n * Inspired node-lru-cache[https://github.com/isaacs/node-lru-cache]\n */\nvar EndpointCache = /** @class */ (function () {\n function EndpointCache(maxSize) {\n if (maxSize === void 0) { maxSize = CACHE_SIZE; }\n this.maxSize = maxSize;\n this.cache = new LRU_1.LRUCache(maxSize);\n }\n ;\n Object.defineProperty(EndpointCache.prototype, \"size\", {\n get: function () {\n return this.cache.length;\n },\n enumerable: true,\n configurable: true\n });\n EndpointCache.prototype.put = function (key, value) {\n var keyString = typeof key !== 'string' ? EndpointCache.getKeyString(key) : key;\n var endpointRecord = this.populateValue(value);\n this.cache.put(keyString, endpointRecord);\n };\n EndpointCache.prototype.get = function (key) {\n var keyString = typeof key !== 'string' ? EndpointCache.getKeyString(key) : key;\n var now = Date.now();\n var records = this.cache.get(keyString);\n if (records) {\n for (var i = 0; i < records.length; i++) {\n var record = records[i];\n if (record.Expire < now) {\n this.cache.remove(keyString);\n return undefined;\n }\n }\n }\n return records;\n };\n EndpointCache.getKeyString = function (key) {\n var identifiers = [];\n var identifierNames = Object.keys(key).sort();\n for (var i = 0; i < identifierNames.length; i++) {\n var identifierName = identifierNames[i];\n if (key[identifierName] === undefined)\n continue;\n identifiers.push(key[identifierName]);\n }\n return identifiers.join(' ');\n };\n EndpointCache.prototype.populateValue = function (endpoints) {\n var now = Date.now();\n return endpoints.map(function (endpoint) { return ({\n Address: endpoint.Address || '',\n Expire: now + (endpoint.CachePeriodInMinutes || 1) * 60 * 1000\n }); });\n };\n EndpointCache.prototype.empty = function () {\n this.cache.empty();\n };\n EndpointCache.prototype.remove = function (key) {\n var keyString = typeof key !== 'string' ? EndpointCache.getKeyString(key) : key;\n this.cache.remove(keyString);\n };\n return EndpointCache;\n}());\nexports.EndpointCache = EndpointCache;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar LinkedListNode = /** @class */ (function () {\n function LinkedListNode(key, value) {\n this.key = key;\n this.value = value;\n }\n return LinkedListNode;\n}());\nvar LRUCache = /** @class */ (function () {\n function LRUCache(size) {\n this.nodeMap = {};\n this.size = 0;\n if (typeof size !== 'number' || size < 1) {\n throw new Error('Cache size can only be positive number');\n }\n this.sizeLimit = size;\n }\n Object.defineProperty(LRUCache.prototype, \"length\", {\n get: function () {\n return this.size;\n },\n enumerable: true,\n configurable: true\n });\n LRUCache.prototype.prependToList = function (node) {\n if (!this.headerNode) {\n this.tailNode = node;\n }\n else {\n this.headerNode.prev = node;\n node.next = this.headerNode;\n }\n this.headerNode = node;\n this.size++;\n };\n LRUCache.prototype.removeFromTail = function () {\n if (!this.tailNode) {\n return undefined;\n }\n var node = this.tailNode;\n var prevNode = node.prev;\n if (prevNode) {\n prevNode.next = undefined;\n }\n node.prev = undefined;\n this.tailNode = prevNode;\n this.size--;\n return node;\n };\n LRUCache.prototype.detachFromList = function (node) {\n if (this.headerNode === node) {\n this.headerNode = node.next;\n }\n if (this.tailNode === node) {\n this.tailNode = node.prev;\n }\n if (node.prev) {\n node.prev.next = node.next;\n }\n if (node.next) {\n node.next.prev = node.prev;\n }\n node.next = undefined;\n node.prev = undefined;\n this.size--;\n };\n LRUCache.prototype.get = function (key) {\n if (this.nodeMap[key]) {\n var node = this.nodeMap[key];\n this.detachFromList(node);\n this.prependToList(node);\n return node.value;\n }\n };\n LRUCache.prototype.remove = function (key) {\n if (this.nodeMap[key]) {\n var node = this.nodeMap[key];\n this.detachFromList(node);\n delete this.nodeMap[key];\n }\n };\n LRUCache.prototype.put = function (key, value) {\n if (this.nodeMap[key]) {\n this.remove(key);\n }\n else if (this.size === this.sizeLimit) {\n var tailNode = this.removeFromTail();\n var key_1 = tailNode.key;\n delete this.nodeMap[key_1];\n }\n var newNode = new LinkedListNode(key, value);\n this.nodeMap[key] = newNode;\n this.prependToList(newNode);\n };\n LRUCache.prototype.empty = function () {\n var keys = Object.keys(this.nodeMap);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var node = this.nodeMap[key];\n this.detachFromList(node);\n delete this.nodeMap[key];\n }\n };\n return LRUCache;\n}());\nexports.LRUCache = LRUCache;","\n/*!\n * Copyright 2010 LearnBoost \n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Module dependencies.\n */\n\nvar crypto = require('crypto')\n , parse = require('url').parse\n ;\n\n/**\n * Valid keys.\n */\n\nvar keys = \n [ 'acl'\n , 'location'\n , 'logging'\n , 'notification'\n , 'partNumber'\n , 'policy'\n , 'requestPayment'\n , 'torrent'\n , 'uploadId'\n , 'uploads'\n , 'versionId'\n , 'versioning'\n , 'versions'\n , 'website'\n ]\n\n/**\n * Return an \"Authorization\" header value with the given `options`\n * in the form of \"AWS :\"\n *\n * @param {Object} options\n * @return {String}\n * @api private\n */\n\nfunction authorization (options) {\n return 'AWS ' + options.key + ':' + sign(options)\n}\n\nmodule.exports = authorization\nmodule.exports.authorization = authorization\n\n/**\n * Simple HMAC-SHA1 Wrapper\n *\n * @param {Object} options\n * @return {String}\n * @api private\n */ \n\nfunction hmacSha1 (options) {\n return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64')\n}\n\nmodule.exports.hmacSha1 = hmacSha1\n\n/**\n * Create a base64 sha1 HMAC for `options`. \n * \n * @param {Object} options\n * @return {String}\n * @api private\n */\n\nfunction sign (options) {\n options.message = stringToSign(options)\n return hmacSha1(options)\n}\nmodule.exports.sign = sign\n\n/**\n * Create a base64 sha1 HMAC for `options`. \n *\n * Specifically to be used with S3 presigned URLs\n * \n * @param {Object} options\n * @return {String}\n * @api private\n */\n\nfunction signQuery (options) {\n options.message = queryStringToSign(options)\n return hmacSha1(options)\n}\nmodule.exports.signQuery= signQuery\n\n/**\n * Return a string for sign() with the given `options`.\n *\n * Spec:\n * \n * \\n\n * \\n\n * \\n\n * \\n\n * [headers\\n]\n * \n *\n * @param {Object} options\n * @return {String}\n * @api private\n */\n\nfunction stringToSign (options) {\n var headers = options.amazonHeaders || ''\n if (headers) headers += '\\n'\n var r = \n [ options.verb\n , options.md5\n , options.contentType\n , options.date ? options.date.toUTCString() : ''\n , headers + options.resource\n ]\n return r.join('\\n')\n}\nmodule.exports.stringToSign = stringToSign\n\n/**\n * Return a string for sign() with the given `options`, but is meant exclusively\n * for S3 presigned URLs\n *\n * Spec:\n * \n * \\n\n * \n *\n * @param {Object} options\n * @return {String}\n * @api private\n */\n\nfunction queryStringToSign (options){\n return 'GET\\n\\n\\n' + options.date + '\\n' + options.resource\n}\nmodule.exports.queryStringToSign = queryStringToSign\n\n/**\n * Perform the following:\n *\n * - ignore non-amazon headers\n * - lowercase fields\n * - sort lexicographically\n * - trim whitespace between \":\"\n * - join with newline\n *\n * @param {Object} headers\n * @return {String}\n * @api private\n */\n\nfunction canonicalizeHeaders (headers) {\n var buf = []\n , fields = Object.keys(headers)\n ;\n for (var i = 0, len = fields.length; i < len; ++i) {\n var field = fields[i]\n , val = headers[field]\n , field = field.toLowerCase()\n ;\n if (0 !== field.indexOf('x-amz')) continue\n buf.push(field + ':' + val)\n }\n return buf.sort().join('\\n')\n}\nmodule.exports.canonicalizeHeaders = canonicalizeHeaders\n\n/**\n * Perform the following:\n *\n * - ignore non sub-resources\n * - sort lexicographically\n *\n * @param {String} resource\n * @return {String}\n * @api private\n */\n\nfunction canonicalizeResource (resource) {\n var url = parse(resource, true)\n , path = url.pathname\n , buf = []\n ;\n\n Object.keys(url.query).forEach(function(key){\n if (!~keys.indexOf(key)) return\n var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key])\n buf.push(key + val)\n })\n\n return path + (buf.length ? '?' + buf.sort().join('&') : '')\n}\nmodule.exports.canonicalizeResource = canonicalizeResource\n","var aws4 = exports,\n url = require('url'),\n querystring = require('querystring'),\n crypto = require('crypto'),\n lru = require('./lru'),\n credentialsCache = lru(1000)\n\n// http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html\n\nfunction hmac(key, string, encoding) {\n return crypto.createHmac('sha256', key).update(string, 'utf8').digest(encoding)\n}\n\nfunction hash(string, encoding) {\n return crypto.createHash('sha256').update(string, 'utf8').digest(encoding)\n}\n\n// This function assumes the string has already been percent encoded\nfunction encodeRfc3986(urlEncodedString) {\n return urlEncodedString.replace(/[!'()*]/g, function(c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\nfunction encodeRfc3986Full(str) {\n return encodeRfc3986(encodeURIComponent(str))\n}\n\n// A bit of a combination of:\n// https://github.com/aws/aws-sdk-java-v2/blob/dc695de6ab49ad03934e1b02e7263abbd2354be0/core/auth/src/main/java/software/amazon/awssdk/auth/signer/internal/AbstractAws4Signer.java#L59\n// https://github.com/aws/aws-sdk-js/blob/18cb7e5b463b46239f9fdd4a65e2ff8c81831e8f/lib/signers/v4.js#L191-L199\n// https://github.com/mhart/aws4fetch/blob/b3aed16b6f17384cf36ea33bcba3c1e9f3bdfefd/src/main.js#L25-L34\nvar HEADERS_TO_IGNORE = {\n 'authorization': true,\n 'connection': true,\n 'x-amzn-trace-id': true,\n 'user-agent': true,\n 'expect': true,\n 'presigned-expires': true,\n 'range': true,\n}\n\n// request: { path | body, [host], [method], [headers], [service], [region] }\n// credentials: { accessKeyId, secretAccessKey, [sessionToken] }\nfunction RequestSigner(request, credentials) {\n\n if (typeof request === 'string') request = url.parse(request)\n\n var headers = request.headers = (request.headers || {}),\n hostParts = (!this.service || !this.region) && this.matchHost(request.hostname || request.host || headers.Host || headers.host)\n\n this.request = request\n this.credentials = credentials || this.defaultCredentials()\n\n this.service = request.service || hostParts[0] || ''\n this.region = request.region || hostParts[1] || 'us-east-1'\n\n // SES uses a different domain from the service name\n if (this.service === 'email') this.service = 'ses'\n\n if (!request.method && request.body)\n request.method = 'POST'\n\n if (!headers.Host && !headers.host) {\n headers.Host = request.hostname || request.host || this.createHost()\n\n // If a port is specified explicitly, use it as is\n if (request.port)\n headers.Host += ':' + request.port\n }\n if (!request.hostname && !request.host)\n request.hostname = headers.Host || headers.host\n\n this.isCodeCommitGit = this.service === 'codecommit' && request.method === 'GIT'\n}\n\nRequestSigner.prototype.matchHost = function(host) {\n var match = (host || '').match(/([^\\.]+)\\.(?:([^\\.]*)\\.)?amazonaws\\.com(\\.cn)?$/)\n var hostParts = (match || []).slice(1, 3)\n\n // ES's hostParts are sometimes the other way round, if the value that is expected\n // to be region equals ‘es’ switch them back\n // e.g. search-cluster-name-aaaa00aaaa0aaa0aaaaaaa0aaa.us-east-1.es.amazonaws.com\n if (hostParts[1] === 'es')\n hostParts = hostParts.reverse()\n\n if (hostParts[1] == 's3') {\n hostParts[0] = 's3'\n hostParts[1] = 'us-east-1'\n } else {\n for (var i = 0; i < 2; i++) {\n if (/^s3-/.test(hostParts[i])) {\n hostParts[1] = hostParts[i].slice(3)\n hostParts[0] = 's3'\n break\n }\n }\n }\n\n return hostParts\n}\n\n// http://docs.aws.amazon.com/general/latest/gr/rande.html\nRequestSigner.prototype.isSingleRegion = function() {\n // Special case for S3 and SimpleDB in us-east-1\n if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true\n\n return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts']\n .indexOf(this.service) >= 0\n}\n\nRequestSigner.prototype.createHost = function() {\n var region = this.isSingleRegion() ? '' : '.' + this.region,\n subdomain = this.service === 'ses' ? 'email' : this.service\n return subdomain + region + '.amazonaws.com'\n}\n\nRequestSigner.prototype.prepareRequest = function() {\n this.parsePath()\n\n var request = this.request, headers = request.headers, query\n\n if (request.signQuery) {\n\n this.parsedPath.query = query = this.parsedPath.query || {}\n\n if (this.credentials.sessionToken)\n query['X-Amz-Security-Token'] = this.credentials.sessionToken\n\n if (this.service === 's3' && !query['X-Amz-Expires'])\n query['X-Amz-Expires'] = 86400\n\n if (query['X-Amz-Date'])\n this.datetime = query['X-Amz-Date']\n else\n query['X-Amz-Date'] = this.getDateTime()\n\n query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256'\n query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString()\n query['X-Amz-SignedHeaders'] = this.signedHeaders()\n\n } else {\n\n if (!request.doNotModifyHeaders && !this.isCodeCommitGit) {\n if (request.body && !headers['Content-Type'] && !headers['content-type'])\n headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8'\n\n if (request.body && !headers['Content-Length'] && !headers['content-length'])\n headers['Content-Length'] = Buffer.byteLength(request.body)\n\n if (this.credentials.sessionToken && !headers['X-Amz-Security-Token'] && !headers['x-amz-security-token'])\n headers['X-Amz-Security-Token'] = this.credentials.sessionToken\n\n if (this.service === 's3' && !headers['X-Amz-Content-Sha256'] && !headers['x-amz-content-sha256'])\n headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex')\n\n if (headers['X-Amz-Date'] || headers['x-amz-date'])\n this.datetime = headers['X-Amz-Date'] || headers['x-amz-date']\n else\n headers['X-Amz-Date'] = this.getDateTime()\n }\n\n delete headers.Authorization\n delete headers.authorization\n }\n}\n\nRequestSigner.prototype.sign = function() {\n if (!this.parsedPath) this.prepareRequest()\n\n if (this.request.signQuery) {\n this.parsedPath.query['X-Amz-Signature'] = this.signature()\n } else {\n this.request.headers.Authorization = this.authHeader()\n }\n\n this.request.path = this.formatPath()\n\n return this.request\n}\n\nRequestSigner.prototype.getDateTime = function() {\n if (!this.datetime) {\n var headers = this.request.headers,\n date = new Date(headers.Date || headers.date || new Date)\n\n this.datetime = date.toISOString().replace(/[:\\-]|\\.\\d{3}/g, '')\n\n // Remove the trailing 'Z' on the timestamp string for CodeCommit git access\n if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1)\n }\n return this.datetime\n}\n\nRequestSigner.prototype.getDate = function() {\n return this.getDateTime().substr(0, 8)\n}\n\nRequestSigner.prototype.authHeader = function() {\n return [\n 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(),\n 'SignedHeaders=' + this.signedHeaders(),\n 'Signature=' + this.signature(),\n ].join(', ')\n}\n\nRequestSigner.prototype.signature = function() {\n var date = this.getDate(),\n cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(),\n kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey)\n if (!kCredentials) {\n kDate = hmac('AWS4' + this.credentials.secretAccessKey, date)\n kRegion = hmac(kDate, this.region)\n kService = hmac(kRegion, this.service)\n kCredentials = hmac(kService, 'aws4_request')\n credentialsCache.set(cacheKey, kCredentials)\n }\n return hmac(kCredentials, this.stringToSign(), 'hex')\n}\n\nRequestSigner.prototype.stringToSign = function() {\n return [\n 'AWS4-HMAC-SHA256',\n this.getDateTime(),\n this.credentialString(),\n hash(this.canonicalString(), 'hex'),\n ].join('\\n')\n}\n\nRequestSigner.prototype.canonicalString = function() {\n if (!this.parsedPath) this.prepareRequest()\n\n var pathStr = this.parsedPath.path,\n query = this.parsedPath.query,\n headers = this.request.headers,\n queryStr = '',\n normalizePath = this.service !== 's3',\n decodePath = this.service === 's3' || this.request.doNotEncodePath,\n decodeSlashesInPath = this.service === 's3',\n firstValOnly = this.service === 's3',\n bodyHash\n\n if (this.service === 's3' && this.request.signQuery) {\n bodyHash = 'UNSIGNED-PAYLOAD'\n } else if (this.isCodeCommitGit) {\n bodyHash = ''\n } else {\n bodyHash = headers['X-Amz-Content-Sha256'] || headers['x-amz-content-sha256'] ||\n hash(this.request.body || '', 'hex')\n }\n\n if (query) {\n var reducedQuery = Object.keys(query).reduce(function(obj, key) {\n if (!key) return obj\n obj[encodeRfc3986Full(key)] = !Array.isArray(query[key]) ? query[key] :\n (firstValOnly ? query[key][0] : query[key])\n return obj\n }, {})\n var encodedQueryPieces = []\n Object.keys(reducedQuery).sort().forEach(function(key) {\n if (!Array.isArray(reducedQuery[key])) {\n encodedQueryPieces.push(key + '=' + encodeRfc3986Full(reducedQuery[key]))\n } else {\n reducedQuery[key].map(encodeRfc3986Full).sort()\n .forEach(function(val) { encodedQueryPieces.push(key + '=' + val) })\n }\n })\n queryStr = encodedQueryPieces.join('&')\n }\n if (pathStr !== '/') {\n if (normalizePath) pathStr = pathStr.replace(/\\/{2,}/g, '/')\n pathStr = pathStr.split('/').reduce(function(path, piece) {\n if (normalizePath && piece === '..') {\n path.pop()\n } else if (!normalizePath || piece !== '.') {\n if (decodePath) piece = decodeURIComponent(piece.replace(/\\+/g, ' '))\n path.push(encodeRfc3986Full(piece))\n }\n return path\n }, []).join('/')\n if (pathStr[0] !== '/') pathStr = '/' + pathStr\n if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/')\n }\n\n return [\n this.request.method || 'GET',\n pathStr,\n queryStr,\n this.canonicalHeaders() + '\\n',\n this.signedHeaders(),\n bodyHash,\n ].join('\\n')\n}\n\nRequestSigner.prototype.canonicalHeaders = function() {\n var headers = this.request.headers\n function trimAll(header) {\n return header.toString().trim().replace(/\\s+/g, ' ')\n }\n return Object.keys(headers)\n .filter(function(key) { return HEADERS_TO_IGNORE[key.toLowerCase()] == null })\n .sort(function(a, b) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1 })\n .map(function(key) { return key.toLowerCase() + ':' + trimAll(headers[key]) })\n .join('\\n')\n}\n\nRequestSigner.prototype.signedHeaders = function() {\n return Object.keys(this.request.headers)\n .map(function(key) { return key.toLowerCase() })\n .filter(function(key) { return HEADERS_TO_IGNORE[key] == null })\n .sort()\n .join(';')\n}\n\nRequestSigner.prototype.credentialString = function() {\n return [\n this.getDate(),\n this.region,\n this.service,\n 'aws4_request',\n ].join('/')\n}\n\nRequestSigner.prototype.defaultCredentials = function() {\n var env = process.env\n return {\n accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY,\n secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY,\n sessionToken: env.AWS_SESSION_TOKEN,\n }\n}\n\nRequestSigner.prototype.parsePath = function() {\n var path = this.request.path || '/'\n\n // S3 doesn't always encode characters > 127 correctly and\n // all services don't encode characters > 255 correctly\n // So if there are non-reserved chars (and it's not already all % encoded), just encode them all\n if (/[^0-9A-Za-z;,/?:@&=+$\\-_.!~*'()#%]/.test(path)) {\n path = encodeURI(decodeURI(path))\n }\n\n var queryIx = path.indexOf('?'),\n query = null\n\n if (queryIx >= 0) {\n query = querystring.parse(path.slice(queryIx + 1))\n path = path.slice(0, queryIx)\n }\n\n this.parsedPath = {\n path: path,\n query: query,\n }\n}\n\nRequestSigner.prototype.formatPath = function() {\n var path = this.parsedPath.path,\n query = this.parsedPath.query\n\n if (!query) return path\n\n // Services don't support empty query string keys\n if (query[''] != null) delete query['']\n\n return path + '?' + encodeRfc3986(querystring.stringify(query))\n}\n\naws4.RequestSigner = RequestSigner\n\naws4.sign = function(request, credentials) {\n return new RequestSigner(request, credentials).sign()\n}\n","module.exports = function(size) {\n return new LruCache(size)\n}\n\nfunction LruCache(size) {\n this.capacity = size | 0\n this.map = Object.create(null)\n this.list = new DoublyLinkedList()\n}\n\nLruCache.prototype.get = function(key) {\n var node = this.map[key]\n if (node == null) return undefined\n this.used(node)\n return node.val\n}\n\nLruCache.prototype.set = function(key, val) {\n var node = this.map[key]\n if (node != null) {\n node.val = val\n } else {\n if (!this.capacity) this.prune()\n if (!this.capacity) return false\n node = new DoublyLinkedNode(key, val)\n this.map[key] = node\n this.capacity--\n }\n this.used(node)\n return true\n}\n\nLruCache.prototype.used = function(node) {\n this.list.moveToFront(node)\n}\n\nLruCache.prototype.prune = function() {\n var node = this.list.pop()\n if (node != null) {\n delete this.map[node.key]\n this.capacity++\n }\n}\n\n\nfunction DoublyLinkedList() {\n this.firstNode = null\n this.lastNode = null\n}\n\nDoublyLinkedList.prototype.moveToFront = function(node) {\n if (this.firstNode == node) return\n\n this.remove(node)\n\n if (this.firstNode == null) {\n this.firstNode = node\n this.lastNode = node\n node.prev = null\n node.next = null\n } else {\n node.prev = null\n node.next = this.firstNode\n node.next.prev = node\n this.firstNode = node\n }\n}\n\nDoublyLinkedList.prototype.pop = function() {\n var lastNode = this.lastNode\n if (lastNode != null) {\n this.remove(lastNode)\n }\n return lastNode\n}\n\nDoublyLinkedList.prototype.remove = function(node) {\n if (this.firstNode == node) {\n this.firstNode = node.next\n } else if (node.prev != null) {\n node.prev.next = node.next\n }\n if (this.lastNode == node) {\n this.lastNode = node.prev\n } else if (node.next != null) {\n node.next.prev = node.prev\n }\n}\n\n\nfunction DoublyLinkedNode(key, val) {\n this.key = key\n this.val = val\n this.prev = null\n this.next = null\n}\n","'use strict';\nmodule.exports = balanced;\nfunction balanced(a, b, str) {\n if (a instanceof RegExp) a = maybeMatch(a, str);\n if (b instanceof RegExp) b = maybeMatch(b, str);\n\n var r = range(a, b, str);\n\n return r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + a.length, r[1]),\n post: str.slice(r[1] + b.length)\n };\n}\n\nfunction maybeMatch(reg, str) {\n var m = str.match(reg);\n return m ? m[0] : null;\n}\n\nbalanced.range = range;\nfunction range(a, b, str) {\n var begs, beg, left, right, result;\n var ai = str.indexOf(a);\n var bi = str.indexOf(b, ai + 1);\n var i = ai;\n\n if (ai >= 0 && bi > 0) {\n if(a===b) {\n return [ai, bi];\n }\n begs = [];\n left = str.length;\n\n while (i >= 0 && !result) {\n if (i == ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n } else if (begs.length == 1) {\n result = [ begs.pop(), bi ];\n } else {\n beg = begs.pop();\n if (beg < left) {\n left = beg;\n right = bi;\n }\n\n bi = str.indexOf(b, i + 1);\n }\n\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n\n if (begs.length) {\n result = [ left, right ];\n }\n }\n\n return result;\n}\n","/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */\n;(function(root) {\n\n\t// Detect free variables `exports`.\n\tvar freeExports = typeof exports == 'object' && exports;\n\n\t// Detect free variable `module`.\n\tvar freeModule = typeof module == 'object' && module &&\n\t\tmodule.exports == freeExports && module;\n\n\t// Detect free variable `global`, from Node.js or Browserified code, and use\n\t// it as `root`.\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {\n\t\troot = freeGlobal;\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar InvalidCharacterError = function(message) {\n\t\tthis.message = message;\n\t};\n\tInvalidCharacterError.prototype = new Error;\n\tInvalidCharacterError.prototype.name = 'InvalidCharacterError';\n\n\tvar error = function(message) {\n\t\t// Note: the error messages used throughout this file match those used by\n\t\t// the native `atob`/`btoa` implementation in Chromium.\n\t\tthrow new InvalidCharacterError(message);\n\t};\n\n\tvar TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\t// http://whatwg.org/html/common-microsyntaxes.html#space-character\n\tvar REGEX_SPACE_CHARACTERS = /[\\t\\n\\f\\r ]/g;\n\n\t// `decode` is designed to be fully compatible with `atob` as described in the\n\t// HTML Standard. http://whatwg.org/html/webappapis.html#dom-windowbase64-atob\n\t// The optimized base64-decoding algorithm used is based on @atk’s excellent\n\t// implementation. https://gist.github.com/atk/1020396\n\tvar decode = function(input) {\n\t\tinput = String(input)\n\t\t\t.replace(REGEX_SPACE_CHARACTERS, '');\n\t\tvar length = input.length;\n\t\tif (length % 4 == 0) {\n\t\t\tinput = input.replace(/==?$/, '');\n\t\t\tlength = input.length;\n\t\t}\n\t\tif (\n\t\t\tlength % 4 == 1 ||\n\t\t\t// http://whatwg.org/C#alphanumeric-ascii-characters\n\t\t\t/[^+a-zA-Z0-9/]/.test(input)\n\t\t) {\n\t\t\terror(\n\t\t\t\t'Invalid character: the string to be decoded is not correctly encoded.'\n\t\t\t);\n\t\t}\n\t\tvar bitCounter = 0;\n\t\tvar bitStorage;\n\t\tvar buffer;\n\t\tvar output = '';\n\t\tvar position = -1;\n\t\twhile (++position < length) {\n\t\t\tbuffer = TABLE.indexOf(input.charAt(position));\n\t\t\tbitStorage = bitCounter % 4 ? bitStorage * 64 + buffer : buffer;\n\t\t\t// Unless this is the first of a group of 4 characters…\n\t\t\tif (bitCounter++ % 4) {\n\t\t\t\t// …convert the first 8 bits to a single ASCII character.\n\t\t\t\toutput += String.fromCharCode(\n\t\t\t\t\t0xFF & bitStorage >> (-2 * bitCounter & 6)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t};\n\n\t// `encode` is designed to be fully compatible with `btoa` as described in the\n\t// HTML Standard: http://whatwg.org/html/webappapis.html#dom-windowbase64-btoa\n\tvar encode = function(input) {\n\t\tinput = String(input);\n\t\tif (/[^\\0-\\xFF]/.test(input)) {\n\t\t\t// Note: no need to special-case astral symbols here, as surrogates are\n\t\t\t// matched, and the input is supposed to only contain ASCII anyway.\n\t\t\terror(\n\t\t\t\t'The string to be encoded contains characters outside of the ' +\n\t\t\t\t'Latin1 range.'\n\t\t\t);\n\t\t}\n\t\tvar padding = input.length % 3;\n\t\tvar output = '';\n\t\tvar position = -1;\n\t\tvar a;\n\t\tvar b;\n\t\tvar c;\n\t\tvar buffer;\n\t\t// Make sure any padding is handled outside of the loop.\n\t\tvar length = input.length - padding;\n\n\t\twhile (++position < length) {\n\t\t\t// Read three bytes, i.e. 24 bits.\n\t\t\ta = input.charCodeAt(position) << 16;\n\t\t\tb = input.charCodeAt(++position) << 8;\n\t\t\tc = input.charCodeAt(++position);\n\t\t\tbuffer = a + b + c;\n\t\t\t// Turn the 24 bits into four chunks of 6 bits each, and append the\n\t\t\t// matching character for each of them to the output.\n\t\t\toutput += (\n\t\t\t\tTABLE.charAt(buffer >> 18 & 0x3F) +\n\t\t\t\tTABLE.charAt(buffer >> 12 & 0x3F) +\n\t\t\t\tTABLE.charAt(buffer >> 6 & 0x3F) +\n\t\t\t\tTABLE.charAt(buffer & 0x3F)\n\t\t\t);\n\t\t}\n\n\t\tif (padding == 2) {\n\t\t\ta = input.charCodeAt(position) << 8;\n\t\t\tb = input.charCodeAt(++position);\n\t\t\tbuffer = a + b;\n\t\t\toutput += (\n\t\t\t\tTABLE.charAt(buffer >> 10) +\n\t\t\t\tTABLE.charAt((buffer >> 4) & 0x3F) +\n\t\t\t\tTABLE.charAt((buffer << 2) & 0x3F) +\n\t\t\t\t'='\n\t\t\t);\n\t\t} else if (padding == 1) {\n\t\t\tbuffer = input.charCodeAt(position);\n\t\t\toutput += (\n\t\t\t\tTABLE.charAt(buffer >> 2) +\n\t\t\t\tTABLE.charAt((buffer << 4) & 0x3F) +\n\t\t\t\t'=='\n\t\t\t);\n\t\t}\n\n\t\treturn output;\n\t};\n\n\tvar base64 = {\n\t\t'encode': encode,\n\t\t'decode': decode,\n\t\t'version': '1.0.0'\n\t};\n\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine(function() {\n\t\t\treturn base64;\n\t\t});\n\t}\telse if (freeExports && !freeExports.nodeType) {\n\t\tif (freeModule) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = base64;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (var key in base64) {\n\t\t\t\tbase64.hasOwnProperty(key) && (freeExports[key] = base64[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.base64 = base64;\n\t}\n\n}(this));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar pad_string_1 = require(\"./pad-string\");\nfunction encode(input, encoding) {\n if (encoding === void 0) { encoding = \"utf8\"; }\n if (Buffer.isBuffer(input)) {\n return fromBase64(input.toString(\"base64\"));\n }\n return fromBase64(Buffer.from(input, encoding).toString(\"base64\"));\n}\n;\nfunction decode(base64url, encoding) {\n if (encoding === void 0) { encoding = \"utf8\"; }\n return Buffer.from(toBase64(base64url), \"base64\").toString(encoding);\n}\nfunction toBase64(base64url) {\n base64url = base64url.toString();\n return pad_string_1.default(base64url)\n .replace(/\\-/g, \"+\")\n .replace(/_/g, \"/\");\n}\nfunction fromBase64(base64) {\n return base64\n .replace(/=/g, \"\")\n .replace(/\\+/g, \"-\")\n .replace(/\\//g, \"_\");\n}\nfunction toBuffer(base64url) {\n return Buffer.from(toBase64(base64url), \"base64\");\n}\nvar base64url = encode;\nbase64url.encode = encode;\nbase64url.decode = decode;\nbase64url.toBase64 = toBase64;\nbase64url.fromBase64 = fromBase64;\nbase64url.toBuffer = toBuffer;\nexports.default = base64url;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction padString(input) {\n var segmentLength = 4;\n var stringLength = input.length;\n var diff = stringLength % segmentLength;\n if (!diff) {\n return input;\n }\n var position = stringLength;\n var padLength = segmentLength - diff;\n var paddedStringLength = stringLength + padLength;\n var buffer = Buffer.alloc(paddedStringLength);\n buffer.write(input);\n while (padLength--) {\n buffer.write(\"=\", position++);\n }\n return buffer.toString();\n}\nexports.default = padString;\n","module.exports = require('./dist/base64url').default;\nmodule.exports.default = module.exports;\n","'use strict';\n\nvar crypto_hash_sha512 = require('tweetnacl').lowlevel.crypto_hash;\n\n/*\n * This file is a 1:1 port from the OpenBSD blowfish.c and bcrypt_pbkdf.c. As a\n * result, it retains the original copyright and license. The two files are\n * under slightly different (but compatible) licenses, and are here combined in\n * one file.\n *\n * Credit for the actual porting work goes to:\n * Devi Mandiri \n */\n\n/*\n * The Blowfish portions are under the following license:\n *\n * Blowfish block cipher for OpenBSD\n * Copyright 1997 Niels Provos \n * All rights reserved.\n *\n * Implementation advice by David Mazieres .\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. The name of the author may not be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * The bcrypt_pbkdf portions are under the following license:\n *\n * Copyright (c) 2013 Ted Unangst \n *\n * Permission to use, copy, modify, and distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\n/*\n * Performance improvements (Javascript-specific):\n *\n * Copyright 2016, Joyent Inc\n * Author: Alex Wilson \n *\n * Permission to use, copy, modify, and distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\n// Ported from OpenBSD bcrypt_pbkdf.c v1.9\n\nvar BLF_J = 0;\n\nvar Blowfish = function() {\n this.S = [\n new Uint32Array([\n 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7,\n 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99,\n 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16,\n 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e,\n 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee,\n 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013,\n 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef,\n 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e,\n 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60,\n 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440,\n 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce,\n 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a,\n 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e,\n 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677,\n 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,\n 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032,\n 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88,\n 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,\n 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e,\n 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0,\n 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3,\n 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98,\n 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88,\n 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe,\n 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6,\n 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d,\n 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b,\n 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7,\n 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba,\n 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463,\n 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f,\n 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09,\n 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3,\n 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb,\n 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279,\n 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8,\n 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab,\n 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82,\n 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db,\n 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573,\n 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0,\n 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b,\n 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790,\n 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8,\n 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,\n 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0,\n 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7,\n 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c,\n 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad,\n 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1,\n 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299,\n 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9,\n 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477,\n 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf,\n 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49,\n 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af,\n 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa,\n 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5,\n 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41,\n 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915,\n 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400,\n 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915,\n 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664,\n 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a]),\n new Uint32Array([\n 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623,\n 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266,\n 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1,\n 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e,\n 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6,\n 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1,\n 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e,\n 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1,\n 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737,\n 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8,\n 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff,\n 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd,\n 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701,\n 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7,\n 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41,\n 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331,\n 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf,\n 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af,\n 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e,\n 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87,\n 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c,\n 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2,\n 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16,\n 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd,\n 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b,\n 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509,\n 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e,\n 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3,\n 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f,\n 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a,\n 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4,\n 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960,\n 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66,\n 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28,\n 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802,\n 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84,\n 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510,\n 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf,\n 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14,\n 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e,\n 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50,\n 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7,\n 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8,\n 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281,\n 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99,\n 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696,\n 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128,\n 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73,\n 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0,\n 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0,\n 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105,\n 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250,\n 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3,\n 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285,\n 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00,\n 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061,\n 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb,\n 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e,\n 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735,\n 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc,\n 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9,\n 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340,\n 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20,\n 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7]),\n new Uint32Array([\n 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934,\n 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068,\n 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af,\n 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840,\n 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45,\n 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504,\n 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a,\n 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb,\n 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee,\n 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6,\n 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42,\n 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b,\n 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2,\n 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb,\n 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527,\n 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b,\n 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33,\n 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c,\n 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3,\n 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc,\n 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17,\n 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564,\n 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b,\n 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115,\n 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922,\n 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728,\n 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0,\n 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e,\n 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37,\n 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d,\n 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804,\n 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b,\n 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3,\n 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb,\n 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d,\n 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c,\n 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350,\n 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9,\n 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a,\n 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe,\n 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d,\n 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc,\n 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f,\n 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61,\n 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2,\n 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9,\n 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2,\n 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c,\n 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e,\n 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633,\n 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10,\n 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169,\n 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52,\n 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027,\n 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5,\n 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62,\n 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634,\n 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76,\n 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24,\n 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc,\n 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4,\n 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c,\n 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837,\n 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0]),\n new Uint32Array([\n 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b,\n 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe,\n 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b,\n 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4,\n 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8,\n 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6,\n 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304,\n 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22,\n 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4,\n 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6,\n 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9,\n 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59,\n 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593,\n 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51,\n 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28,\n 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c,\n 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b,\n 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28,\n 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c,\n 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd,\n 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a,\n 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319,\n 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb,\n 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f,\n 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991,\n 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32,\n 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680,\n 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166,\n 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae,\n 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb,\n 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5,\n 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47,\n 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,\n 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d,\n 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84,\n 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048,\n 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8,\n 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd,\n 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9,\n 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7,\n 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38,\n 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f,\n 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c,\n 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525,\n 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1,\n 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442,\n 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964,\n 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e,\n 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8,\n 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d,\n 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f,\n 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299,\n 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02,\n 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc,\n 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614,\n 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a,\n 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6,\n 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b,\n 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0,\n 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060,\n 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e,\n 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9,\n 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,\n 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6])\n ];\n this.P = new Uint32Array([\n 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344,\n 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89,\n 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,\n 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917,\n 0x9216d5d9, 0x8979fb1b]);\n};\n\nfunction F(S, x8, i) {\n return (((S[0][x8[i+3]] +\n S[1][x8[i+2]]) ^\n S[2][x8[i+1]]) +\n S[3][x8[i]]);\n};\n\nBlowfish.prototype.encipher = function(x, x8) {\n if (x8 === undefined) {\n x8 = new Uint8Array(x.buffer);\n if (x.byteOffset !== 0)\n x8 = x8.subarray(x.byteOffset);\n }\n x[0] ^= this.P[0];\n for (var i = 1; i < 16; i += 2) {\n x[1] ^= F(this.S, x8, 0) ^ this.P[i];\n x[0] ^= F(this.S, x8, 4) ^ this.P[i+1];\n }\n var t = x[0];\n x[0] = x[1] ^ this.P[17];\n x[1] = t;\n};\n\nBlowfish.prototype.decipher = function(x) {\n var x8 = new Uint8Array(x.buffer);\n if (x.byteOffset !== 0)\n x8 = x8.subarray(x.byteOffset);\n x[0] ^= this.P[17];\n for (var i = 16; i > 0; i -= 2) {\n x[1] ^= F(this.S, x8, 0) ^ this.P[i];\n x[0] ^= F(this.S, x8, 4) ^ this.P[i-1];\n }\n var t = x[0];\n x[0] = x[1] ^ this.P[0];\n x[1] = t;\n};\n\nfunction stream2word(data, databytes){\n var i, temp = 0;\n for (i = 0; i < 4; i++, BLF_J++) {\n if (BLF_J >= databytes) BLF_J = 0;\n temp = (temp << 8) | data[BLF_J];\n }\n return temp;\n};\n\nBlowfish.prototype.expand0state = function(key, keybytes) {\n var d = new Uint32Array(2), i, k;\n var d8 = new Uint8Array(d.buffer);\n\n for (i = 0, BLF_J = 0; i < 18; i++) {\n this.P[i] ^= stream2word(key, keybytes);\n }\n BLF_J = 0;\n\n for (i = 0; i < 18; i += 2) {\n this.encipher(d, d8);\n this.P[i] = d[0];\n this.P[i+1] = d[1];\n }\n\n for (i = 0; i < 4; i++) {\n for (k = 0; k < 256; k += 2) {\n this.encipher(d, d8);\n this.S[i][k] = d[0];\n this.S[i][k+1] = d[1];\n }\n }\n};\n\nBlowfish.prototype.expandstate = function(data, databytes, key, keybytes) {\n var d = new Uint32Array(2), i, k;\n\n for (i = 0, BLF_J = 0; i < 18; i++) {\n this.P[i] ^= stream2word(key, keybytes);\n }\n\n for (i = 0, BLF_J = 0; i < 18; i += 2) {\n d[0] ^= stream2word(data, databytes);\n d[1] ^= stream2word(data, databytes);\n this.encipher(d);\n this.P[i] = d[0];\n this.P[i+1] = d[1];\n }\n\n for (i = 0; i < 4; i++) {\n for (k = 0; k < 256; k += 2) {\n d[0] ^= stream2word(data, databytes);\n d[1] ^= stream2word(data, databytes);\n this.encipher(d);\n this.S[i][k] = d[0];\n this.S[i][k+1] = d[1];\n }\n }\n BLF_J = 0;\n};\n\nBlowfish.prototype.enc = function(data, blocks) {\n for (var i = 0; i < blocks; i++) {\n this.encipher(data.subarray(i*2));\n }\n};\n\nBlowfish.prototype.dec = function(data, blocks) {\n for (var i = 0; i < blocks; i++) {\n this.decipher(data.subarray(i*2));\n }\n};\n\nvar BCRYPT_BLOCKS = 8,\n BCRYPT_HASHSIZE = 32;\n\nfunction bcrypt_hash(sha2pass, sha2salt, out) {\n var state = new Blowfish(),\n cdata = new Uint32Array(BCRYPT_BLOCKS), i,\n ciphertext = new Uint8Array([79,120,121,99,104,114,111,109,97,116,105,\n 99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109,\n 105,116,101]); //\"OxychromaticBlowfishSwatDynamite\"\n\n state.expandstate(sha2salt, 64, sha2pass, 64);\n for (i = 0; i < 64; i++) {\n state.expand0state(sha2salt, 64);\n state.expand0state(sha2pass, 64);\n }\n\n for (i = 0; i < BCRYPT_BLOCKS; i++)\n cdata[i] = stream2word(ciphertext, ciphertext.byteLength);\n for (i = 0; i < 64; i++)\n state.enc(cdata, cdata.byteLength / 8);\n\n for (i = 0; i < BCRYPT_BLOCKS; i++) {\n out[4*i+3] = cdata[i] >>> 24;\n out[4*i+2] = cdata[i] >>> 16;\n out[4*i+1] = cdata[i] >>> 8;\n out[4*i+0] = cdata[i];\n }\n};\n\nfunction bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) {\n var sha2pass = new Uint8Array(64),\n sha2salt = new Uint8Array(64),\n out = new Uint8Array(BCRYPT_HASHSIZE),\n tmpout = new Uint8Array(BCRYPT_HASHSIZE),\n countsalt = new Uint8Array(saltlen+4),\n i, j, amt, stride, dest, count,\n origkeylen = keylen;\n\n if (rounds < 1)\n return -1;\n if (passlen === 0 || saltlen === 0 || keylen === 0 ||\n keylen > (out.byteLength * out.byteLength) || saltlen > (1<<20))\n return -1;\n\n stride = Math.floor((keylen + out.byteLength - 1) / out.byteLength);\n amt = Math.floor((keylen + stride - 1) / stride);\n\n for (i = 0; i < saltlen; i++)\n countsalt[i] = salt[i];\n\n crypto_hash_sha512(sha2pass, pass, passlen);\n\n for (count = 1; keylen > 0; count++) {\n countsalt[saltlen+0] = count >>> 24;\n countsalt[saltlen+1] = count >>> 16;\n countsalt[saltlen+2] = count >>> 8;\n countsalt[saltlen+3] = count;\n\n crypto_hash_sha512(sha2salt, countsalt, saltlen + 4);\n bcrypt_hash(sha2pass, sha2salt, tmpout);\n for (i = out.byteLength; i--;)\n out[i] = tmpout[i];\n\n for (i = 1; i < rounds; i++) {\n crypto_hash_sha512(sha2salt, tmpout, tmpout.byteLength);\n bcrypt_hash(sha2pass, sha2salt, tmpout);\n for (j = 0; j < out.byteLength; j++)\n out[j] ^= tmpout[j];\n }\n\n amt = Math.min(amt, keylen);\n for (i = 0; i < amt; i++) {\n dest = i * stride + (count - 1);\n if (dest >= origkeylen)\n break;\n key[dest] = out[i];\n }\n keylen -= i;\n }\n\n return 0;\n};\n\nmodule.exports = {\n BLOCKS: BCRYPT_BLOCKS,\n HASHSIZE: BCRYPT_HASHSIZE,\n hash: bcrypt_hash,\n pbkdf: bcrypt_pbkdf\n};\n","var concatMap = require('concat-map');\nvar balanced = require('balanced-match');\n\nmodule.exports = expandTop;\n\nvar escSlash = '\\0SLASH'+Math.random()+'\\0';\nvar escOpen = '\\0OPEN'+Math.random()+'\\0';\nvar escClose = '\\0CLOSE'+Math.random()+'\\0';\nvar escComma = '\\0COMMA'+Math.random()+'\\0';\nvar escPeriod = '\\0PERIOD'+Math.random()+'\\0';\n\nfunction numeric(str) {\n return parseInt(str, 10) == str\n ? parseInt(str, 10)\n : str.charCodeAt(0);\n}\n\nfunction escapeBraces(str) {\n return str.split('\\\\\\\\').join(escSlash)\n .split('\\\\{').join(escOpen)\n .split('\\\\}').join(escClose)\n .split('\\\\,').join(escComma)\n .split('\\\\.').join(escPeriod);\n}\n\nfunction unescapeBraces(str) {\n return str.split(escSlash).join('\\\\')\n .split(escOpen).join('{')\n .split(escClose).join('}')\n .split(escComma).join(',')\n .split(escPeriod).join('.');\n}\n\n\n// Basically just str.split(\",\"), but handling cases\n// where we have nested braced sections, which should be\n// treated as individual members, like {a,{b,c},d}\nfunction parseCommaParts(str) {\n if (!str)\n return [''];\n\n var parts = [];\n var m = balanced('{', '}', str);\n\n if (!m)\n return str.split(',');\n\n var pre = m.pre;\n var body = m.body;\n var post = m.post;\n var p = pre.split(',');\n\n p[p.length-1] += '{' + body + '}';\n var postParts = parseCommaParts(post);\n if (post.length) {\n p[p.length-1] += postParts.shift();\n p.push.apply(p, postParts);\n }\n\n parts.push.apply(parts, p);\n\n return parts;\n}\n\nfunction expandTop(str) {\n if (!str)\n return [];\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.substr(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.substr(2);\n }\n\n return expand(escapeBraces(str), true).map(unescapeBraces);\n}\n\nfunction identity(e) {\n return e;\n}\n\nfunction embrace(str) {\n return '{' + str + '}';\n}\nfunction isPadded(el) {\n return /^-?0\\d/.test(el);\n}\n\nfunction lte(i, y) {\n return i <= y;\n}\nfunction gte(i, y) {\n return i >= y;\n}\n\nfunction expand(str, isTop) {\n var expansions = [];\n\n var m = balanced('{', '}', str);\n if (!m || /\\$$/.test(m.pre)) return [str];\n\n var isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body);\n var isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(m.body);\n var isSequence = isNumericSequence || isAlphaSequence;\n var isOptions = m.body.indexOf(',') >= 0;\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,.*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post;\n return expand(str);\n }\n return [str];\n }\n\n var n;\n if (isSequence) {\n n = m.body.split(/\\.\\./);\n } else {\n n = parseCommaParts(m.body);\n if (n.length === 1) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand(n[0], false).map(embrace);\n if (n.length === 1) {\n var post = m.post.length\n ? expand(m.post, false)\n : [''];\n return post.map(function(p) {\n return m.pre + n[0] + p;\n });\n }\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n var pre = m.pre;\n var post = m.post.length\n ? expand(m.post, false)\n : [''];\n\n var N;\n\n if (isSequence) {\n var x = numeric(n[0]);\n var y = numeric(n[1]);\n var width = Math.max(n[0].length, n[1].length)\n var incr = n.length == 3\n ? Math.abs(numeric(n[2]))\n : 1;\n var test = lte;\n var reverse = y < x;\n if (reverse) {\n incr *= -1;\n test = gte;\n }\n var pad = n.some(isPadded);\n\n N = [];\n\n for (var i = x; test(i, y); i += incr) {\n var c;\n if (isAlphaSequence) {\n c = String.fromCharCode(i);\n if (c === '\\\\')\n c = '';\n } else {\n c = String(i);\n if (pad) {\n var need = width - c.length;\n if (need > 0) {\n var z = new Array(need + 1).join('0');\n if (i < 0)\n c = '-' + z + c.slice(1);\n else\n c = z + c;\n }\n }\n }\n N.push(c);\n }\n } else {\n N = concatMap(n, function(el) { return expand(el, false) });\n }\n\n for (var j = 0; j < N.length; j++) {\n for (var k = 0; k < post.length; k++) {\n var expansion = pre + N[j] + post[k];\n if (!isTop || isSequence || expansion)\n expansions.push(expansion);\n }\n }\n\n return expansions;\n}\n\n","module.exports = process.hrtime || hrtime\n\n// polyfil for window.performance.now\nvar performance = global.performance || {}\nvar performanceNow =\n performance.now ||\n performance.mozNow ||\n performance.msNow ||\n performance.oNow ||\n performance.webkitNow ||\n function(){ return (new Date()).getTime() }\n\n// generate timestamp or delta\n// see http://nodejs.org/api/process.html#process_process_hrtime\nfunction hrtime(previousTimestamp){\n var clocktime = performanceNow.call(performance)*1e-3\n var seconds = Math.floor(clocktime)\n var nanoseconds = Math.floor((clocktime%1)*1e9)\n if (previousTimestamp) {\n seconds = seconds - previousTimestamp[0]\n nanoseconds = nanoseconds - previousTimestamp[1]\n if (nanoseconds<0) {\n seconds--\n nanoseconds += 1e9\n }\n }\n return [seconds,nanoseconds]\n}","'use strict';\nconst {PassThrough: PassThroughStream} = require('stream');\n\nmodule.exports = options => {\n\toptions = {...options};\n\n\tconst {array} = options;\n\tlet {encoding} = options;\n\tconst isBuffer = encoding === 'buffer';\n\tlet objectMode = false;\n\n\tif (array) {\n\t\tobjectMode = !(encoding || isBuffer);\n\t} else {\n\t\tencoding = encoding || 'utf8';\n\t}\n\n\tif (isBuffer) {\n\t\tencoding = null;\n\t}\n\n\tconst stream = new PassThroughStream({objectMode});\n\n\tif (encoding) {\n\t\tstream.setEncoding(encoding);\n\t}\n\n\tlet length = 0;\n\tconst chunks = [];\n\n\tstream.on('data', chunk => {\n\t\tchunks.push(chunk);\n\n\t\tif (objectMode) {\n\t\t\tlength = chunks.length;\n\t\t} else {\n\t\t\tlength += chunk.length;\n\t\t}\n\t});\n\n\tstream.getBufferedValue = () => {\n\t\tif (array) {\n\t\t\treturn chunks;\n\t\t}\n\n\t\treturn isBuffer ? Buffer.concat(chunks, length) : chunks.join('');\n\t};\n\n\tstream.getBufferedLength = () => length;\n\n\treturn stream;\n};\n","'use strict';\nconst {constants: BufferConstants} = require('buffer');\nconst pump = require('pump');\nconst bufferStream = require('./buffer-stream');\n\nclass MaxBufferError extends Error {\n\tconstructor() {\n\t\tsuper('maxBuffer exceeded');\n\t\tthis.name = 'MaxBufferError';\n\t}\n}\n\nasync function getStream(inputStream, options) {\n\tif (!inputStream) {\n\t\treturn Promise.reject(new Error('Expected a stream'));\n\t}\n\n\toptions = {\n\t\tmaxBuffer: Infinity,\n\t\t...options\n\t};\n\n\tconst {maxBuffer} = options;\n\n\tlet stream;\n\tawait new Promise((resolve, reject) => {\n\t\tconst rejectPromise = error => {\n\t\t\t// Don't retrieve an oversized buffer.\n\t\t\tif (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {\n\t\t\t\terror.bufferedData = stream.getBufferedValue();\n\t\t\t}\n\n\t\t\treject(error);\n\t\t};\n\n\t\tstream = pump(inputStream, bufferStream(options), error => {\n\t\t\tif (error) {\n\t\t\t\trejectPromise(error);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresolve();\n\t\t});\n\n\t\tstream.on('data', () => {\n\t\t\tif (stream.getBufferedLength() > maxBuffer) {\n\t\t\t\trejectPromise(new MaxBufferError());\n\t\t\t}\n\t\t});\n\t});\n\n\treturn stream.getBufferedValue();\n}\n\nmodule.exports = getStream;\n// TODO: Remove this for the next major release\nmodule.exports.default = getStream;\nmodule.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'});\nmodule.exports.array = (stream, options) => getStream(stream, {...options, array: true});\nmodule.exports.MaxBufferError = MaxBufferError;\n","'use strict';\nmodule.exports = object => {\n\tconst result = {};\n\n\tfor (const [key, value] of Object.entries(object)) {\n\t\tresult[key.toLowerCase()] = value;\n\t}\n\n\treturn result;\n};\n","'use strict';\n\nconst EventEmitter = require('events');\nconst urlLib = require('url');\nconst normalizeUrl = require('normalize-url');\nconst getStream = require('get-stream');\nconst CachePolicy = require('http-cache-semantics');\nconst Response = require('responselike');\nconst lowercaseKeys = require('lowercase-keys');\nconst cloneResponse = require('clone-response');\nconst Keyv = require('keyv');\n\nclass CacheableRequest {\n\tconstructor(request, cacheAdapter) {\n\t\tif (typeof request !== 'function') {\n\t\t\tthrow new TypeError('Parameter `request` must be a function');\n\t\t}\n\n\t\tthis.cache = new Keyv({\n\t\t\turi: typeof cacheAdapter === 'string' && cacheAdapter,\n\t\t\tstore: typeof cacheAdapter !== 'string' && cacheAdapter,\n\t\t\tnamespace: 'cacheable-request'\n\t\t});\n\n\t\treturn this.createCacheableRequest(request);\n\t}\n\n\tcreateCacheableRequest(request) {\n\t\treturn (opts, cb) => {\n\t\t\tlet url;\n\t\t\tif (typeof opts === 'string') {\n\t\t\t\turl = normalizeUrlObject(urlLib.parse(opts));\n\t\t\t\topts = {};\n\t\t\t} else if (opts instanceof urlLib.URL) {\n\t\t\t\turl = normalizeUrlObject(urlLib.parse(opts.toString()));\n\t\t\t\topts = {};\n\t\t\t} else {\n\t\t\t\tconst [pathname, ...searchParts] = (opts.path || '').split('?');\n\t\t\t\tconst search = searchParts.length > 0 ?\n\t\t\t\t\t`?${searchParts.join('?')}` :\n\t\t\t\t\t'';\n\t\t\t\turl = normalizeUrlObject({ ...opts, pathname, search });\n\t\t\t}\n\n\t\t\topts = {\n\t\t\t\theaders: {},\n\t\t\t\tmethod: 'GET',\n\t\t\t\tcache: true,\n\t\t\t\tstrictTtl: false,\n\t\t\t\tautomaticFailover: false,\n\t\t\t\t...opts,\n\t\t\t\t...urlObjectToRequestOptions(url)\n\t\t\t};\n\t\t\topts.headers = lowercaseKeys(opts.headers);\n\n\t\t\tconst ee = new EventEmitter();\n\t\t\tconst normalizedUrlString = normalizeUrl(\n\t\t\t\turlLib.format(url),\n\t\t\t\t{\n\t\t\t\t\tstripWWW: false,\n\t\t\t\t\tremoveTrailingSlash: false,\n\t\t\t\t\tstripAuthentication: false\n\t\t\t\t}\n\t\t\t);\n\t\t\tconst key = `${opts.method}:${normalizedUrlString}`;\n\t\t\tlet revalidate = false;\n\t\t\tlet madeRequest = false;\n\n\t\t\tconst makeRequest = opts => {\n\t\t\t\tmadeRequest = true;\n\t\t\t\tlet requestErrored = false;\n\t\t\t\tlet requestErrorCallback;\n\n\t\t\t\tconst requestErrorPromise = new Promise(resolve => {\n\t\t\t\t\trequestErrorCallback = () => {\n\t\t\t\t\t\tif (!requestErrored) {\n\t\t\t\t\t\t\trequestErrored = true;\n\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t});\n\n\t\t\t\tconst handler = response => {\n\t\t\t\t\tif (revalidate && !opts.forceRefresh) {\n\t\t\t\t\t\tresponse.status = response.statusCode;\n\t\t\t\t\t\tconst revalidatedPolicy = CachePolicy.fromObject(revalidate.cachePolicy).revalidatedPolicy(opts, response);\n\t\t\t\t\t\tif (!revalidatedPolicy.modified) {\n\t\t\t\t\t\t\tconst headers = revalidatedPolicy.policy.responseHeaders();\n\t\t\t\t\t\t\tresponse = new Response(revalidate.statusCode, headers, revalidate.body, revalidate.url);\n\t\t\t\t\t\t\tresponse.cachePolicy = revalidatedPolicy.policy;\n\t\t\t\t\t\t\tresponse.fromCache = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!response.fromCache) {\n\t\t\t\t\t\tresponse.cachePolicy = new CachePolicy(opts, response, opts);\n\t\t\t\t\t\tresponse.fromCache = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet clonedResponse;\n\t\t\t\t\tif (opts.cache && response.cachePolicy.storable()) {\n\t\t\t\t\t\tclonedResponse = cloneResponse(response);\n\n\t\t\t\t\t\t(async () => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst bodyPromise = getStream.buffer(response);\n\n\t\t\t\t\t\t\t\tawait Promise.race([\n\t\t\t\t\t\t\t\t\trequestErrorPromise,\n\t\t\t\t\t\t\t\t\tnew Promise(resolve => response.once('end', resolve))\n\t\t\t\t\t\t\t\t]);\n\n\t\t\t\t\t\t\t\tif (requestErrored) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tconst body = await bodyPromise;\n\n\t\t\t\t\t\t\t\tconst value = {\n\t\t\t\t\t\t\t\t\tcachePolicy: response.cachePolicy.toObject(),\n\t\t\t\t\t\t\t\t\turl: response.url,\n\t\t\t\t\t\t\t\t\tstatusCode: response.fromCache ? revalidate.statusCode : response.statusCode,\n\t\t\t\t\t\t\t\t\tbody\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\tlet ttl = opts.strictTtl ? response.cachePolicy.timeToLive() : undefined;\n\t\t\t\t\t\t\t\tif (opts.maxTtl) {\n\t\t\t\t\t\t\t\t\tttl = ttl ? Math.min(ttl, opts.maxTtl) : opts.maxTtl;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tawait this.cache.set(key, value, ttl);\n\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\tee.emit('error', new CacheableRequest.CacheError(error));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})();\n\t\t\t\t\t} else if (opts.cache && revalidate) {\n\t\t\t\t\t\t(async () => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tawait this.cache.delete(key);\n\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\tee.emit('error', new CacheableRequest.CacheError(error));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})();\n\t\t\t\t\t}\n\n\t\t\t\t\tee.emit('response', clonedResponse || response);\n\t\t\t\t\tif (typeof cb === 'function') {\n\t\t\t\t\t\tcb(clonedResponse || response);\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\ttry {\n\t\t\t\t\tconst req = request(opts, handler);\n\t\t\t\t\treq.once('error', requestErrorCallback);\n\t\t\t\t\treq.once('abort', requestErrorCallback);\n\t\t\t\t\tee.emit('request', req);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tee.emit('error', new CacheableRequest.RequestError(error));\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t(async () => {\n\t\t\t\tconst get = async opts => {\n\t\t\t\t\tawait Promise.resolve();\n\n\t\t\t\t\tconst cacheEntry = opts.cache ? await this.cache.get(key) : undefined;\n\t\t\t\t\tif (typeof cacheEntry === 'undefined') {\n\t\t\t\t\t\treturn makeRequest(opts);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst policy = CachePolicy.fromObject(cacheEntry.cachePolicy);\n\t\t\t\t\tif (policy.satisfiesWithoutRevalidation(opts) && !opts.forceRefresh) {\n\t\t\t\t\t\tconst headers = policy.responseHeaders();\n\t\t\t\t\t\tconst response = new Response(cacheEntry.statusCode, headers, cacheEntry.body, cacheEntry.url);\n\t\t\t\t\t\tresponse.cachePolicy = policy;\n\t\t\t\t\t\tresponse.fromCache = true;\n\n\t\t\t\t\t\tee.emit('response', response);\n\t\t\t\t\t\tif (typeof cb === 'function') {\n\t\t\t\t\t\t\tcb(response);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\trevalidate = cacheEntry;\n\t\t\t\t\t\topts.headers = policy.revalidationHeaders(opts);\n\t\t\t\t\t\tmakeRequest(opts);\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tconst errorHandler = error => ee.emit('error', new CacheableRequest.CacheError(error));\n\t\t\t\tthis.cache.once('error', errorHandler);\n\t\t\t\tee.on('response', () => this.cache.removeListener('error', errorHandler));\n\n\t\t\t\ttry {\n\t\t\t\t\tawait get(opts);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (opts.automaticFailover && !madeRequest) {\n\t\t\t\t\t\tmakeRequest(opts);\n\t\t\t\t\t}\n\n\t\t\t\t\tee.emit('error', new CacheableRequest.CacheError(error));\n\t\t\t\t}\n\t\t\t})();\n\n\t\t\treturn ee;\n\t\t};\n\t}\n}\n\nfunction urlObjectToRequestOptions(url) {\n\tconst options = { ...url };\n\toptions.path = `${url.pathname || '/'}${url.search || ''}`;\n\tdelete options.pathname;\n\tdelete options.search;\n\treturn options;\n}\n\nfunction normalizeUrlObject(url) {\n\t// If url was parsed by url.parse or new URL:\n\t// - hostname will be set\n\t// - host will be hostname[:port]\n\t// - port will be set if it was explicit in the parsed string\n\t// Otherwise, url was from request options:\n\t// - hostname or host may be set\n\t// - host shall not have port encoded\n\treturn {\n\t\tprotocol: url.protocol,\n\t\tauth: url.auth,\n\t\thostname: url.hostname || url.host || 'localhost',\n\t\tport: url.port,\n\t\tpathname: url.pathname,\n\t\tsearch: url.search\n\t};\n}\n\nCacheableRequest.RequestError = class extends Error {\n\tconstructor(error) {\n\t\tsuper(error.message);\n\t\tthis.name = 'RequestError';\n\t\tObject.assign(this, error);\n\t}\n};\n\nCacheableRequest.CacheError = class extends Error {\n\tconstructor(error) {\n\t\tsuper(error.message);\n\t\tthis.name = 'CacheError';\n\t\tObject.assign(this, error);\n\t}\n};\n\nmodule.exports = CacheableRequest;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","function Caseless (dict) {\n this.dict = dict || {}\n}\nCaseless.prototype.set = function (name, value, clobber) {\n if (typeof name === 'object') {\n for (var i in name) {\n this.set(i, name[i], value)\n }\n } else {\n if (typeof clobber === 'undefined') clobber = true\n var has = this.has(name)\n\n if (!clobber && has) this.dict[has] = this.dict[has] + ',' + value\n else this.dict[has || name] = value\n return has\n }\n}\nCaseless.prototype.has = function (name) {\n var keys = Object.keys(this.dict)\n , name = name.toLowerCase()\n ;\n for (var i=0;i {\n\toptions = Object.assign({pretty: false}, options);\n\n\treturn stack.replace(/\\\\/g, '/')\n\t\t.split('\\n')\n\t\t.filter(line => {\n\t\t\tconst pathMatches = line.match(extractPathRegex);\n\t\t\tif (pathMatches === null || !pathMatches[1]) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tconst match = pathMatches[1];\n\n\t\t\t// Electron\n\t\t\tif (\n\t\t\t\tmatch.includes('.app/Contents/Resources/electron.asar') ||\n\t\t\t\tmatch.includes('.app/Contents/Resources/default_app.asar')\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn !pathRegex.test(match);\n\t\t})\n\t\t.filter(line => line.trim() !== '')\n\t\t.map(line => {\n\t\t\tif (options.pretty) {\n\t\t\t\treturn line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, '~')));\n\t\t\t}\n\n\t\t\treturn line;\n\t\t})\n\t\t.join('\\n');\n};\n","'use strict';\n\nconst PassThrough = require('stream').PassThrough;\nconst mimicResponse = require('mimic-response');\n\nconst cloneResponse = response => {\n\tif (!(response && response.pipe)) {\n\t\tthrow new TypeError('Parameter `response` must be a response stream.');\n\t}\n\n\tconst clone = new PassThrough();\n\tmimicResponse(response, clone);\n\n\treturn response.pipe(clone);\n};\n\nmodule.exports = cloneResponse;\n","var util = require('util');\nvar Stream = require('stream').Stream;\nvar DelayedStream = require('delayed-stream');\n\nmodule.exports = CombinedStream;\nfunction CombinedStream() {\n this.writable = false;\n this.readable = true;\n this.dataSize = 0;\n this.maxDataSize = 2 * 1024 * 1024;\n this.pauseStreams = true;\n\n this._released = false;\n this._streams = [];\n this._currentStream = null;\n this._insideLoop = false;\n this._pendingNext = false;\n}\nutil.inherits(CombinedStream, Stream);\n\nCombinedStream.create = function(options) {\n var combinedStream = new this();\n\n options = options || {};\n for (var option in options) {\n combinedStream[option] = options[option];\n }\n\n return combinedStream;\n};\n\nCombinedStream.isStreamLike = function(stream) {\n return (typeof stream !== 'function')\n && (typeof stream !== 'string')\n && (typeof stream !== 'boolean')\n && (typeof stream !== 'number')\n && (!Buffer.isBuffer(stream));\n};\n\nCombinedStream.prototype.append = function(stream) {\n var isStreamLike = CombinedStream.isStreamLike(stream);\n\n if (isStreamLike) {\n if (!(stream instanceof DelayedStream)) {\n var newStream = DelayedStream.create(stream, {\n maxDataSize: Infinity,\n pauseStream: this.pauseStreams,\n });\n stream.on('data', this._checkDataSize.bind(this));\n stream = newStream;\n }\n\n this._handleErrors(stream);\n\n if (this.pauseStreams) {\n stream.pause();\n }\n }\n\n this._streams.push(stream);\n return this;\n};\n\nCombinedStream.prototype.pipe = function(dest, options) {\n Stream.prototype.pipe.call(this, dest, options);\n this.resume();\n return dest;\n};\n\nCombinedStream.prototype._getNext = function() {\n this._currentStream = null;\n\n if (this._insideLoop) {\n this._pendingNext = true;\n return; // defer call\n }\n\n this._insideLoop = true;\n try {\n do {\n this._pendingNext = false;\n this._realGetNext();\n } while (this._pendingNext);\n } finally {\n this._insideLoop = false;\n }\n};\n\nCombinedStream.prototype._realGetNext = function() {\n var stream = this._streams.shift();\n\n\n if (typeof stream == 'undefined') {\n this.end();\n return;\n }\n\n if (typeof stream !== 'function') {\n this._pipeNext(stream);\n return;\n }\n\n var getStream = stream;\n getStream(function(stream) {\n var isStreamLike = CombinedStream.isStreamLike(stream);\n if (isStreamLike) {\n stream.on('data', this._checkDataSize.bind(this));\n this._handleErrors(stream);\n }\n\n this._pipeNext(stream);\n }.bind(this));\n};\n\nCombinedStream.prototype._pipeNext = function(stream) {\n this._currentStream = stream;\n\n var isStreamLike = CombinedStream.isStreamLike(stream);\n if (isStreamLike) {\n stream.on('end', this._getNext.bind(this));\n stream.pipe(this, {end: false});\n return;\n }\n\n var value = stream;\n this.write(value);\n this._getNext();\n};\n\nCombinedStream.prototype._handleErrors = function(stream) {\n var self = this;\n stream.on('error', function(err) {\n self._emitError(err);\n });\n};\n\nCombinedStream.prototype.write = function(data) {\n this.emit('data', data);\n};\n\nCombinedStream.prototype.pause = function() {\n if (!this.pauseStreams) {\n return;\n }\n\n if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause();\n this.emit('pause');\n};\n\nCombinedStream.prototype.resume = function() {\n if (!this._released) {\n this._released = true;\n this.writable = true;\n this._getNext();\n }\n\n if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume();\n this.emit('resume');\n};\n\nCombinedStream.prototype.end = function() {\n this._reset();\n this.emit('end');\n};\n\nCombinedStream.prototype.destroy = function() {\n this._reset();\n this.emit('close');\n};\n\nCombinedStream.prototype._reset = function() {\n this.writable = false;\n this._streams = [];\n this._currentStream = null;\n};\n\nCombinedStream.prototype._checkDataSize = function() {\n this._updateDataSize();\n if (this.dataSize <= this.maxDataSize) {\n return;\n }\n\n var message =\n 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.';\n this._emitError(new Error(message));\n};\n\nCombinedStream.prototype._updateDataSize = function() {\n this.dataSize = 0;\n\n var self = this;\n this._streams.forEach(function(stream) {\n if (!stream.dataSize) {\n return;\n }\n\n self.dataSize += stream.dataSize;\n });\n\n if (this._currentStream && this._currentStream.dataSize) {\n this.dataSize += this._currentStream.dataSize;\n }\n};\n\nCombinedStream.prototype._emitError = function(err) {\n this._reset();\n this.emit('error', err);\n};\n","module.exports = function (xs, fn) {\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n var x = fn(xs[i], i);\n if (isArray(x)) res.push.apply(res, x);\n else res.push(x);\n }\n return res;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\n\nfunction isArray(arg) {\n if (Array.isArray) {\n return Array.isArray(arg);\n }\n return objectToString(arg) === '[object Array]';\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = Buffer.isBuffer;\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n","//.CommonJS\nvar CSSOM = {\n CSSRule: require(\"./CSSRule\").CSSRule,\n MatcherList: require(\"./MatcherList\").MatcherList\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see https://developer.mozilla.org/en/CSS/@-moz-document\n */\nCSSOM.CSSDocumentRule = function CSSDocumentRule() {\n CSSOM.CSSRule.call(this);\n this.matcher = new CSSOM.MatcherList();\n this.cssRules = [];\n};\n\nCSSOM.CSSDocumentRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSDocumentRule.prototype.constructor = CSSOM.CSSDocumentRule;\nCSSOM.CSSDocumentRule.prototype.type = 10;\n//FIXME\n//CSSOM.CSSDocumentRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;\n//CSSOM.CSSDocumentRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;\n\nObject.defineProperty(CSSOM.CSSDocumentRule.prototype, \"cssText\", {\n get: function() {\n var cssTexts = [];\n for (var i=0, length=this.cssRules.length; i < length; i++) {\n cssTexts.push(this.cssRules[i].cssText);\n }\n return \"@-moz-document \" + this.matcher.matcherText + \" {\" + cssTexts.join(\"\") + \"}\";\n }\n});\n\n\n//.CommonJS\nexports.CSSDocumentRule = CSSOM.CSSDocumentRule;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {\n\tCSSStyleDeclaration: require(\"./CSSStyleDeclaration\").CSSStyleDeclaration,\n\tCSSRule: require(\"./CSSRule\").CSSRule\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://dev.w3.org/csswg/cssom/#css-font-face-rule\n */\nCSSOM.CSSFontFaceRule = function CSSFontFaceRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.style = new CSSOM.CSSStyleDeclaration();\n\tthis.style.parentRule = this;\n};\n\nCSSOM.CSSFontFaceRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSFontFaceRule.prototype.constructor = CSSOM.CSSFontFaceRule;\nCSSOM.CSSFontFaceRule.prototype.type = 5;\n//FIXME\n//CSSOM.CSSFontFaceRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;\n//CSSOM.CSSFontFaceRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;\n\n// http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSFontFaceRule.cpp\nObject.defineProperty(CSSOM.CSSFontFaceRule.prototype, \"cssText\", {\n get: function() {\n return \"@font-face {\" + this.style.cssText + \"}\";\n }\n});\n\n\n//.CommonJS\nexports.CSSFontFaceRule = CSSOM.CSSFontFaceRule;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {\n\tCSSRule: require(\"./CSSRule\").CSSRule\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://www.w3.org/TR/shadow-dom/#host-at-rule\n */\nCSSOM.CSSHostRule = function CSSHostRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.cssRules = [];\n};\n\nCSSOM.CSSHostRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSHostRule.prototype.constructor = CSSOM.CSSHostRule;\nCSSOM.CSSHostRule.prototype.type = 1001;\n//FIXME\n//CSSOM.CSSHostRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;\n//CSSOM.CSSHostRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;\n\nObject.defineProperty(CSSOM.CSSHostRule.prototype, \"cssText\", {\n\tget: function() {\n\t\tvar cssTexts = [];\n\t\tfor (var i=0, length=this.cssRules.length; i < length; i++) {\n\t\t\tcssTexts.push(this.cssRules[i].cssText);\n\t\t}\n\t\treturn \"@host {\" + cssTexts.join(\"\") + \"}\";\n\t}\n});\n\n\n//.CommonJS\nexports.CSSHostRule = CSSOM.CSSHostRule;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {\n\tCSSRule: require(\"./CSSRule\").CSSRule,\n\tCSSStyleSheet: require(\"./CSSStyleSheet\").CSSStyleSheet,\n\tMediaList: require(\"./MediaList\").MediaList\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://dev.w3.org/csswg/cssom/#cssimportrule\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSImportRule\n */\nCSSOM.CSSImportRule = function CSSImportRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.href = \"\";\n\tthis.media = new CSSOM.MediaList();\n\tthis.styleSheet = new CSSOM.CSSStyleSheet();\n};\n\nCSSOM.CSSImportRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSImportRule.prototype.constructor = CSSOM.CSSImportRule;\nCSSOM.CSSImportRule.prototype.type = 3;\n\nObject.defineProperty(CSSOM.CSSImportRule.prototype, \"cssText\", {\n get: function() {\n var mediaText = this.media.mediaText;\n return \"@import url(\" + this.href + \")\" + (mediaText ? \" \" + mediaText : \"\") + \";\";\n },\n set: function(cssText) {\n var i = 0;\n\n /**\n * @import url(partial.css) screen, handheld;\n * || |\n * after-import media\n * |\n * url\n */\n var state = '';\n\n var buffer = '';\n var index;\n for (var character; (character = cssText.charAt(i)); i++) {\n\n switch (character) {\n case ' ':\n case '\\t':\n case '\\r':\n case '\\n':\n case '\\f':\n if (state === 'after-import') {\n state = 'url';\n } else {\n buffer += character;\n }\n break;\n\n case '@':\n if (!state && cssText.indexOf('@import', i) === i) {\n state = 'after-import';\n i += 'import'.length;\n buffer = '';\n }\n break;\n\n case 'u':\n if (state === 'url' && cssText.indexOf('url(', i) === i) {\n index = cssText.indexOf(')', i + 1);\n if (index === -1) {\n throw i + ': \")\" not found';\n }\n i += 'url('.length;\n var url = cssText.slice(i, index);\n if (url[0] === url[url.length - 1]) {\n if (url[0] === '\"' || url[0] === \"'\") {\n url = url.slice(1, -1);\n }\n }\n this.href = url;\n i = index;\n state = 'media';\n }\n break;\n\n case '\"':\n if (state === 'url') {\n index = cssText.indexOf('\"', i + 1);\n if (!index) {\n throw i + \": '\\\"' not found\";\n }\n this.href = cssText.slice(i + 1, index);\n i = index;\n state = 'media';\n }\n break;\n\n case \"'\":\n if (state === 'url') {\n index = cssText.indexOf(\"'\", i + 1);\n if (!index) {\n throw i + ': \"\\'\" not found';\n }\n this.href = cssText.slice(i + 1, index);\n i = index;\n state = 'media';\n }\n break;\n\n case ';':\n if (state === 'media') {\n if (buffer) {\n this.media.mediaText = buffer.trim();\n }\n }\n break;\n\n default:\n if (state === 'media') {\n buffer += character;\n }\n break;\n }\n }\n }\n});\n\n\n//.CommonJS\nexports.CSSImportRule = CSSOM.CSSImportRule;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {\n\tCSSRule: require(\"./CSSRule\").CSSRule,\n\tCSSStyleDeclaration: require('./CSSStyleDeclaration').CSSStyleDeclaration\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://www.w3.org/TR/css3-animations/#DOM-CSSKeyframeRule\n */\nCSSOM.CSSKeyframeRule = function CSSKeyframeRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.keyText = '';\n\tthis.style = new CSSOM.CSSStyleDeclaration();\n\tthis.style.parentRule = this;\n};\n\nCSSOM.CSSKeyframeRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSKeyframeRule.prototype.constructor = CSSOM.CSSKeyframeRule;\nCSSOM.CSSKeyframeRule.prototype.type = 8;\n//FIXME\n//CSSOM.CSSKeyframeRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;\n//CSSOM.CSSKeyframeRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;\n\n// http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSKeyframeRule.cpp\nObject.defineProperty(CSSOM.CSSKeyframeRule.prototype, \"cssText\", {\n get: function() {\n return this.keyText + \" {\" + this.style.cssText + \"} \";\n }\n});\n\n\n//.CommonJS\nexports.CSSKeyframeRule = CSSOM.CSSKeyframeRule;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {\n\tCSSRule: require(\"./CSSRule\").CSSRule\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://www.w3.org/TR/css3-animations/#DOM-CSSKeyframesRule\n */\nCSSOM.CSSKeyframesRule = function CSSKeyframesRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.name = '';\n\tthis.cssRules = [];\n};\n\nCSSOM.CSSKeyframesRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSKeyframesRule.prototype.constructor = CSSOM.CSSKeyframesRule;\nCSSOM.CSSKeyframesRule.prototype.type = 7;\n//FIXME\n//CSSOM.CSSKeyframesRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;\n//CSSOM.CSSKeyframesRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;\n\n// http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSKeyframesRule.cpp\nObject.defineProperty(CSSOM.CSSKeyframesRule.prototype, \"cssText\", {\n get: function() {\n var cssTexts = [];\n for (var i=0, length=this.cssRules.length; i < length; i++) {\n cssTexts.push(\" \" + this.cssRules[i].cssText);\n }\n return \"@\" + (this._vendorPrefix || '') + \"keyframes \" + this.name + \" { \\n\" + cssTexts.join(\"\\n\") + \"\\n}\";\n }\n});\n\n\n//.CommonJS\nexports.CSSKeyframesRule = CSSOM.CSSKeyframesRule;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {\n\tCSSRule: require(\"./CSSRule\").CSSRule,\n\tMediaList: require(\"./MediaList\").MediaList\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://dev.w3.org/csswg/cssom/#cssmediarule\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule\n */\nCSSOM.CSSMediaRule = function CSSMediaRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.media = new CSSOM.MediaList();\n\tthis.cssRules = [];\n};\n\nCSSOM.CSSMediaRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSMediaRule.prototype.constructor = CSSOM.CSSMediaRule;\nCSSOM.CSSMediaRule.prototype.type = 4;\n//FIXME\n//CSSOM.CSSMediaRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;\n//CSSOM.CSSMediaRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;\n\n// http://opensource.apple.com/source/WebCore/WebCore-658.28/css/CSSMediaRule.cpp\nObject.defineProperty(CSSOM.CSSMediaRule.prototype, \"cssText\", {\n get: function() {\n var cssTexts = [];\n for (var i=0, length=this.cssRules.length; i < length; i++) {\n cssTexts.push(this.cssRules[i].cssText);\n }\n return \"@media \" + this.media.mediaText + \" {\" + cssTexts.join(\"\") + \"}\";\n }\n});\n\n\n//.CommonJS\nexports.CSSMediaRule = CSSOM.CSSMediaRule;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://dev.w3.org/csswg/cssom/#the-cssrule-interface\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule\n */\nCSSOM.CSSRule = function CSSRule() {\n\tthis.parentRule = null;\n\tthis.parentStyleSheet = null;\n};\n\nCSSOM.CSSRule.UNKNOWN_RULE = 0; // obsolete\nCSSOM.CSSRule.STYLE_RULE = 1;\nCSSOM.CSSRule.CHARSET_RULE = 2; // obsolete\nCSSOM.CSSRule.IMPORT_RULE = 3;\nCSSOM.CSSRule.MEDIA_RULE = 4;\nCSSOM.CSSRule.FONT_FACE_RULE = 5;\nCSSOM.CSSRule.PAGE_RULE = 6;\nCSSOM.CSSRule.KEYFRAMES_RULE = 7;\nCSSOM.CSSRule.KEYFRAME_RULE = 8;\nCSSOM.CSSRule.MARGIN_RULE = 9;\nCSSOM.CSSRule.NAMESPACE_RULE = 10;\nCSSOM.CSSRule.COUNTER_STYLE_RULE = 11;\nCSSOM.CSSRule.SUPPORTS_RULE = 12;\nCSSOM.CSSRule.DOCUMENT_RULE = 13;\nCSSOM.CSSRule.FONT_FEATURE_VALUES_RULE = 14;\nCSSOM.CSSRule.VIEWPORT_RULE = 15;\nCSSOM.CSSRule.REGION_STYLE_RULE = 16;\n\n\nCSSOM.CSSRule.prototype = {\n\tconstructor: CSSOM.CSSRule\n\t//FIXME\n};\n\n\n//.CommonJS\nexports.CSSRule = CSSOM.CSSRule;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration\n */\nCSSOM.CSSStyleDeclaration = function CSSStyleDeclaration(){\n\tthis.length = 0;\n\tthis.parentRule = null;\n\n\t// NON-STANDARD\n\tthis._importants = {};\n};\n\n\nCSSOM.CSSStyleDeclaration.prototype = {\n\n\tconstructor: CSSOM.CSSStyleDeclaration,\n\n\t/**\n\t *\n\t * @param {string} name\n\t * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyValue\n\t * @return {string} the value of the property if it has been explicitly set for this declaration block.\n\t * Returns the empty string if the property has not been set.\n\t */\n\tgetPropertyValue: function(name) {\n\t\treturn this[name] || \"\";\n\t},\n\n\t/**\n\t *\n\t * @param {string} name\n\t * @param {string} value\n\t * @param {string} [priority=null] \"important\" or null\n\t * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-setProperty\n\t */\n\tsetProperty: function(name, value, priority) {\n\t\tif (this[name]) {\n\t\t\t// Property already exist. Overwrite it.\n\t\t\tvar index = Array.prototype.indexOf.call(this, name);\n\t\t\tif (index < 0) {\n\t\t\t\tthis[this.length] = name;\n\t\t\t\tthis.length++;\n\t\t\t}\n\t\t} else {\n\t\t\t// New property.\n\t\t\tthis[this.length] = name;\n\t\t\tthis.length++;\n\t\t}\n\t\tthis[name] = value + \"\";\n\t\tthis._importants[name] = priority;\n\t},\n\n\t/**\n\t *\n\t * @param {string} name\n\t * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-removeProperty\n\t * @return {string} the value of the property if it has been explicitly set for this declaration block.\n\t * Returns the empty string if the property has not been set or the property name does not correspond to a known CSS property.\n\t */\n\tremoveProperty: function(name) {\n\t\tif (!(name in this)) {\n\t\t\treturn \"\";\n\t\t}\n\t\tvar index = Array.prototype.indexOf.call(this, name);\n\t\tif (index < 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tvar prevValue = this[name];\n\t\tthis[name] = \"\";\n\n\t\t// That's what WebKit and Opera do\n\t\tArray.prototype.splice.call(this, index, 1);\n\n\t\t// That's what Firefox does\n\t\t//this[index] = \"\"\n\n\t\treturn prevValue;\n\t},\n\n\tgetPropertyCSSValue: function() {\n\t\t//FIXME\n\t},\n\n\t/**\n\t *\n\t * @param {String} name\n\t */\n\tgetPropertyPriority: function(name) {\n\t\treturn this._importants[name] || \"\";\n\t},\n\n\n\t/**\n\t * element.style.overflow = \"auto\"\n\t * element.style.getPropertyShorthand(\"overflow-x\")\n\t * -> \"overflow\"\n\t */\n\tgetPropertyShorthand: function() {\n\t\t//FIXME\n\t},\n\n\tisPropertyImplicit: function() {\n\t\t//FIXME\n\t},\n\n\t// Doesn't work in IE < 9\n\tget cssText(){\n\t\tvar properties = [];\n\t\tfor (var i=0, length=this.length; i < length; ++i) {\n\t\t\tvar name = this[i];\n\t\t\tvar value = this.getPropertyValue(name);\n\t\t\tvar priority = this.getPropertyPriority(name);\n\t\t\tif (priority) {\n\t\t\t\tpriority = \" !\" + priority;\n\t\t\t}\n\t\t\tproperties[i] = name + \": \" + value + priority + \";\";\n\t\t}\n\t\treturn properties.join(\" \");\n\t},\n\n\tset cssText(text){\n\t\tvar i, name;\n\t\tfor (i = this.length; i--;) {\n\t\t\tname = this[i];\n\t\t\tthis[name] = \"\";\n\t\t}\n\t\tArray.prototype.splice.call(this, 0, this.length);\n\t\tthis._importants = {};\n\n\t\tvar dummyRule = CSSOM.parse('#bogus{' + text + '}').cssRules[0].style;\n\t\tvar length = dummyRule.length;\n\t\tfor (i = 0; i < length; ++i) {\n\t\t\tname = dummyRule[i];\n\t\t\tthis.setProperty(dummyRule[i], dummyRule.getPropertyValue(name), dummyRule.getPropertyPriority(name));\n\t\t}\n\t}\n};\n\n\n//.CommonJS\nexports.CSSStyleDeclaration = CSSOM.CSSStyleDeclaration;\nCSSOM.parse = require('./parse').parse; // Cannot be included sooner due to the mutual dependency between parse.js and CSSStyleDeclaration.js\n///CommonJS\n","//.CommonJS\nvar CSSOM = {\n\tCSSStyleDeclaration: require(\"./CSSStyleDeclaration\").CSSStyleDeclaration,\n\tCSSRule: require(\"./CSSRule\").CSSRule\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://dev.w3.org/csswg/cssom/#cssstylerule\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleRule\n */\nCSSOM.CSSStyleRule = function CSSStyleRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.selectorText = \"\";\n\tthis.style = new CSSOM.CSSStyleDeclaration();\n\tthis.style.parentRule = this;\n};\n\nCSSOM.CSSStyleRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSStyleRule.prototype.constructor = CSSOM.CSSStyleRule;\nCSSOM.CSSStyleRule.prototype.type = 1;\n\nObject.defineProperty(CSSOM.CSSStyleRule.prototype, \"cssText\", {\n\tget: function() {\n\t\tvar text;\n\t\tif (this.selectorText) {\n\t\t\ttext = this.selectorText + \" {\" + this.style.cssText + \"}\";\n\t\t} else {\n\t\t\ttext = \"\";\n\t\t}\n\t\treturn text;\n\t},\n\tset: function(cssText) {\n\t\tvar rule = CSSOM.CSSStyleRule.parse(cssText);\n\t\tthis.style = rule.style;\n\t\tthis.selectorText = rule.selectorText;\n\t}\n});\n\n\n/**\n * NON-STANDARD\n * lightweight version of parse.js.\n * @param {string} ruleText\n * @return CSSStyleRule\n */\nCSSOM.CSSStyleRule.parse = function(ruleText) {\n\tvar i = 0;\n\tvar state = \"selector\";\n\tvar index;\n\tvar j = i;\n\tvar buffer = \"\";\n\n\tvar SIGNIFICANT_WHITESPACE = {\n\t\t\"selector\": true,\n\t\t\"value\": true\n\t};\n\n\tvar styleRule = new CSSOM.CSSStyleRule();\n\tvar name, priority=\"\";\n\n\tfor (var character; (character = ruleText.charAt(i)); i++) {\n\n\t\tswitch (character) {\n\n\t\tcase \" \":\n\t\tcase \"\\t\":\n\t\tcase \"\\r\":\n\t\tcase \"\\n\":\n\t\tcase \"\\f\":\n\t\t\tif (SIGNIFICANT_WHITESPACE[state]) {\n\t\t\t\t// Squash 2 or more white-spaces in the row into 1\n\t\t\t\tswitch (ruleText.charAt(i - 1)) {\n\t\t\t\t\tcase \" \":\n\t\t\t\t\tcase \"\\t\":\n\t\t\t\t\tcase \"\\r\":\n\t\t\t\t\tcase \"\\n\":\n\t\t\t\t\tcase \"\\f\":\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbuffer += \" \";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\t// String\n\t\tcase '\"':\n\t\t\tj = i + 1;\n\t\t\tindex = ruleText.indexOf('\"', j) + 1;\n\t\t\tif (!index) {\n\t\t\t\tthrow '\" is missing';\n\t\t\t}\n\t\t\tbuffer += ruleText.slice(i, index);\n\t\t\ti = index - 1;\n\t\t\tbreak;\n\n\t\tcase \"'\":\n\t\t\tj = i + 1;\n\t\t\tindex = ruleText.indexOf(\"'\", j) + 1;\n\t\t\tif (!index) {\n\t\t\t\tthrow \"' is missing\";\n\t\t\t}\n\t\t\tbuffer += ruleText.slice(i, index);\n\t\t\ti = index - 1;\n\t\t\tbreak;\n\n\t\t// Comment\n\t\tcase \"/\":\n\t\t\tif (ruleText.charAt(i + 1) === \"*\") {\n\t\t\t\ti += 2;\n\t\t\t\tindex = ruleText.indexOf(\"*/\", i);\n\t\t\t\tif (index === -1) {\n\t\t\t\t\tthrow new SyntaxError(\"Missing */\");\n\t\t\t\t} else {\n\t\t\t\t\ti = index + 1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tbuffer += character;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \"{\":\n\t\t\tif (state === \"selector\") {\n\t\t\t\tstyleRule.selectorText = buffer.trim();\n\t\t\t\tbuffer = \"\";\n\t\t\t\tstate = \"name\";\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \":\":\n\t\t\tif (state === \"name\") {\n\t\t\t\tname = buffer.trim();\n\t\t\t\tbuffer = \"\";\n\t\t\t\tstate = \"value\";\n\t\t\t} else {\n\t\t\t\tbuffer += character;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \"!\":\n\t\t\tif (state === \"value\" && ruleText.indexOf(\"!important\", i) === i) {\n\t\t\t\tpriority = \"important\";\n\t\t\t\ti += \"important\".length;\n\t\t\t} else {\n\t\t\t\tbuffer += character;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \";\":\n\t\t\tif (state === \"value\") {\n\t\t\t\tstyleRule.style.setProperty(name, buffer.trim(), priority);\n\t\t\t\tpriority = \"\";\n\t\t\t\tbuffer = \"\";\n\t\t\t\tstate = \"name\";\n\t\t\t} else {\n\t\t\t\tbuffer += character;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \"}\":\n\t\t\tif (state === \"value\") {\n\t\t\t\tstyleRule.style.setProperty(name, buffer.trim(), priority);\n\t\t\t\tpriority = \"\";\n\t\t\t\tbuffer = \"\";\n\t\t\t} else if (state === \"name\") {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tbuffer += character;\n\t\t\t}\n\t\t\tstate = \"selector\";\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbuffer += character;\n\t\t\tbreak;\n\n\t\t}\n\t}\n\n\treturn styleRule;\n\n};\n\n\n//.CommonJS\nexports.CSSStyleRule = CSSOM.CSSStyleRule;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {\n\tStyleSheet: require(\"./StyleSheet\").StyleSheet,\n\tCSSStyleRule: require(\"./CSSStyleRule\").CSSStyleRule\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet\n */\nCSSOM.CSSStyleSheet = function CSSStyleSheet() {\n\tCSSOM.StyleSheet.call(this);\n\tthis.cssRules = [];\n};\n\n\nCSSOM.CSSStyleSheet.prototype = new CSSOM.StyleSheet();\nCSSOM.CSSStyleSheet.prototype.constructor = CSSOM.CSSStyleSheet;\n\n\n/**\n * Used to insert a new rule into the style sheet. The new rule now becomes part of the cascade.\n *\n * sheet = new Sheet(\"body {margin: 0}\")\n * sheet.toString()\n * -> \"body{margin:0;}\"\n * sheet.insertRule(\"img {border: none}\", 0)\n * -> 0\n * sheet.toString()\n * -> \"img{border:none;}body{margin:0;}\"\n *\n * @param {string} rule\n * @param {number} index\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-insertRule\n * @return {number} The index within the style sheet's rule collection of the newly inserted rule.\n */\nCSSOM.CSSStyleSheet.prototype.insertRule = function(rule, index) {\n\tif (index < 0 || index > this.cssRules.length) {\n\t\tthrow new RangeError(\"INDEX_SIZE_ERR\");\n\t}\n\tvar cssRule = CSSOM.parse(rule).cssRules[0];\n\tcssRule.parentStyleSheet = this;\n\tthis.cssRules.splice(index, 0, cssRule);\n\treturn index;\n};\n\n\n/**\n * Used to delete a rule from the style sheet.\n *\n * sheet = new Sheet(\"img{border:none} body{margin:0}\")\n * sheet.toString()\n * -> \"img{border:none;}body{margin:0;}\"\n * sheet.deleteRule(0)\n * sheet.toString()\n * -> \"body{margin:0;}\"\n *\n * @param {number} index within the style sheet's rule list of the rule to remove.\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-deleteRule\n */\nCSSOM.CSSStyleSheet.prototype.deleteRule = function(index) {\n\tif (index < 0 || index >= this.cssRules.length) {\n\t\tthrow new RangeError(\"INDEX_SIZE_ERR\");\n\t}\n\tthis.cssRules.splice(index, 1);\n};\n\n\n/**\n * NON-STANDARD\n * @return {string} serialize stylesheet\n */\nCSSOM.CSSStyleSheet.prototype.toString = function() {\n\tvar result = \"\";\n\tvar rules = this.cssRules;\n\tfor (var i=0; i 1000 ? '1000px' : 'auto');\n * }\n */\nCSSOM.CSSValueExpression.prototype.parse = function() {\n\tvar token = this._token,\n\t\t\tidx = this._idx;\n\n\tvar character = '',\n\t\t\texpression = '',\n\t\t\terror = '',\n\t\t\tinfo,\n\t\t\tparen = [];\n\n\n\tfor (; ; ++idx) {\n\t\tcharacter = token.charAt(idx);\n\n\t\t// end of token\n\t\tif (character === '') {\n\t\t\terror = 'css expression error: unfinished expression!';\n\t\t\tbreak;\n\t\t}\n\n\t\tswitch(character) {\n\t\t\tcase '(':\n\t\t\t\tparen.push(character);\n\t\t\t\texpression += character;\n\t\t\t\tbreak;\n\n\t\t\tcase ')':\n\t\t\t\tparen.pop(character);\n\t\t\t\texpression += character;\n\t\t\t\tbreak;\n\n\t\t\tcase '/':\n\t\t\t\tif ((info = this._parseJSComment(token, idx))) { // comment?\n\t\t\t\t\tif (info.error) {\n\t\t\t\t\t\terror = 'css expression error: unfinished comment in expression!';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tidx = info.idx;\n\t\t\t\t\t\t// ignore the comment\n\t\t\t\t\t}\n\t\t\t\t} else if ((info = this._parseJSRexExp(token, idx))) { // regexp\n\t\t\t\t\tidx = info.idx;\n\t\t\t\t\texpression += info.text;\n\t\t\t\t} else { // other\n\t\t\t\t\texpression += character;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"'\":\n\t\t\tcase '\"':\n\t\t\t\tinfo = this._parseJSString(token, idx, character);\n\t\t\t\tif (info) { // string\n\t\t\t\t\tidx = info.idx;\n\t\t\t\t\texpression += info.text;\n\t\t\t\t} else {\n\t\t\t\t\texpression += character;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\texpression += character;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (error) {\n\t\t\tbreak;\n\t\t}\n\n\t\t// end of expression\n\t\tif (paren.length === 0) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tvar ret;\n\tif (error) {\n\t\tret = {\n\t\t\terror: error\n\t\t};\n\t} else {\n\t\tret = {\n\t\t\tidx: idx,\n\t\t\texpression: expression\n\t\t};\n\t}\n\n\treturn ret;\n};\n\n\n/**\n *\n * @return {Object|false}\n * - idx:\n * - text:\n * or\n * - error:\n * or\n * false\n *\n */\nCSSOM.CSSValueExpression.prototype._parseJSComment = function(token, idx) {\n\tvar nextChar = token.charAt(idx + 1),\n\t\t\ttext;\n\n\tif (nextChar === '/' || nextChar === '*') {\n\t\tvar startIdx = idx,\n\t\t\t\tendIdx,\n\t\t\t\tcommentEndChar;\n\n\t\tif (nextChar === '/') { // line comment\n\t\t\tcommentEndChar = '\\n';\n\t\t} else if (nextChar === '*') { // block comment\n\t\t\tcommentEndChar = '*/';\n\t\t}\n\n\t\tendIdx = token.indexOf(commentEndChar, startIdx + 1 + 1);\n\t\tif (endIdx !== -1) {\n\t\t\tendIdx = endIdx + commentEndChar.length - 1;\n\t\t\ttext = token.substring(idx, endIdx + 1);\n\t\t\treturn {\n\t\t\t\tidx: endIdx,\n\t\t\t\ttext: text\n\t\t\t};\n\t\t} else {\n\t\t\tvar error = 'css expression error: unfinished comment in expression!';\n\t\t\treturn {\n\t\t\t\terror: error\n\t\t\t};\n\t\t}\n\t} else {\n\t\treturn false;\n\t}\n};\n\n\n/**\n *\n * @return {Object|false}\n *\t\t\t\t\t- idx:\n *\t\t\t\t\t- text:\n *\t\t\t\t\tor \n *\t\t\t\t\tfalse\n *\n */\nCSSOM.CSSValueExpression.prototype._parseJSString = function(token, idx, sep) {\n\tvar endIdx = this._findMatchedIdx(token, idx, sep),\n\t\t\ttext;\n\n\tif (endIdx === -1) {\n\t\treturn false;\n\t} else {\n\t\ttext = token.substring(idx, endIdx + sep.length);\n\n\t\treturn {\n\t\t\tidx: endIdx,\n\t\t\ttext: text\n\t\t};\n\t}\n};\n\n\n/**\n * parse regexp in css expression\n *\n * @return {Object|false}\n *\t\t\t\t- idx:\n *\t\t\t\t- regExp:\n *\t\t\t\tor \n *\t\t\t\tfalse\n */\n\n/*\n\nall legal RegExp\n \n/a/\n(/a/)\n[/a/]\n[12, /a/]\n\n!/a/\n\n+/a/\n-/a/\n* /a/\n/ /a/\n%/a/\n\n===/a/\n!==/a/\n==/a/\n!=/a/\n>/a/\n>=/a/\n>/a/\n>>>/a/\n\n&&/a/\n||/a/\n?/a/\n=/a/\n,/a/\n\n\t\tdelete /a/\n\t\t\t\tin /a/\ninstanceof /a/\n\t\t\t\tnew /a/\n\t\ttypeof /a/\n\t\t\tvoid /a/\n\n*/\nCSSOM.CSSValueExpression.prototype._parseJSRexExp = function(token, idx) {\n\tvar before = token.substring(0, idx).replace(/\\s+$/, \"\"),\n\t\t\tlegalRegx = [\n\t\t\t\t/^$/,\n\t\t\t\t/\\($/,\n\t\t\t\t/\\[$/,\n\t\t\t\t/\\!$/,\n\t\t\t\t/\\+$/,\n\t\t\t\t/\\-$/,\n\t\t\t\t/\\*$/,\n\t\t\t\t/\\/\\s+/,\n\t\t\t\t/\\%$/,\n\t\t\t\t/\\=$/,\n\t\t\t\t/\\>$/,\n\t\t\t\t/<$/,\n\t\t\t\t/\\&$/,\n\t\t\t\t/\\|$/,\n\t\t\t\t/\\^$/,\n\t\t\t\t/\\~$/,\n\t\t\t\t/\\?$/,\n\t\t\t\t/\\,$/,\n\t\t\t\t/delete$/,\n\t\t\t\t/in$/,\n\t\t\t\t/instanceof$/,\n\t\t\t\t/new$/,\n\t\t\t\t/typeof$/,\n\t\t\t\t/void$/\n\t\t\t];\n\n\tvar isLegal = legalRegx.some(function(reg) {\n\t\treturn reg.test(before);\n\t});\n\n\tif (!isLegal) {\n\t\treturn false;\n\t} else {\n\t\tvar sep = '/';\n\n\t\t// same logic as string\n\t\treturn this._parseJSString(token, idx, sep);\n\t}\n};\n\n\n/**\n *\n * find next sep(same line) index in `token`\n *\n * @return {Number}\n *\n */\nCSSOM.CSSValueExpression.prototype._findMatchedIdx = function(token, idx, sep) {\n\tvar startIdx = idx,\n\t\t\tendIdx;\n\n\tvar NOT_FOUND = -1;\n\n\twhile(true) {\n\t\tendIdx = token.indexOf(sep, startIdx + 1);\n\n\t\tif (endIdx === -1) { // not found\n\t\t\tendIdx = NOT_FOUND;\n\t\t\tbreak;\n\t\t} else {\n\t\t\tvar text = token.substring(idx + 1, endIdx),\n\t\t\t\t\tmatched = text.match(/\\\\+$/);\n\t\t\tif (!matched || matched[0] % 2 === 0) { // not escaped\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tstartIdx = endIdx;\n\t\t\t}\n\t\t}\n\t}\n\n\t// boundary must be in the same line(js sting or regexp)\n\tvar nextNewLineIdx = token.indexOf('\\n', idx + 1);\n\tif (nextNewLineIdx < endIdx) {\n\t\tendIdx = NOT_FOUND;\n\t}\n\n\n\treturn endIdx;\n};\n\n\n\n\n//.CommonJS\nexports.CSSValueExpression = CSSOM.CSSValueExpression;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {};\n///CommonJS\n\n\n/**\n * @constructor\n * @see https://developer.mozilla.org/en/CSS/@-moz-document\n */\nCSSOM.MatcherList = function MatcherList(){\n this.length = 0;\n};\n\nCSSOM.MatcherList.prototype = {\n\n constructor: CSSOM.MatcherList,\n\n /**\n * @return {string}\n */\n get matcherText() {\n return Array.prototype.join.call(this, \", \");\n },\n\n /**\n * @param {string} value\n */\n set matcherText(value) {\n // just a temporary solution, actually it may be wrong by just split the value with ',', because a url can include ','.\n var values = value.split(\",\");\n var length = this.length = values.length;\n for (var i=0; i 0;\n\n\t\t\t\t\twhile (ancestorRules.length > 0) {\n\t\t\t\t\t\tparentRule = ancestorRules.pop();\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tparentRule.constructor.name === \"CSSMediaRule\"\n\t\t\t\t\t\t\t|| parentRule.constructor.name === \"CSSSupportsRule\"\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tprevScope = currentScope;\n\t\t\t\t\t\t\tcurrentScope = parentRule;\n\t\t\t\t\t\t\tcurrentScope.cssRules.push(prevScope);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (ancestorRules.length === 0) {\n\t\t\t\t\t\t\thasAncestors = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (!hasAncestors) {\n\t\t\t\t\t\tcurrentScope.__ends = i + 1;\n\t\t\t\t\t\tstyleSheet.cssRules.push(currentScope);\n\t\t\t\t\t\tcurrentScope = styleSheet;\n\t\t\t\t\t\tparentRule = null;\n\t\t\t\t\t}\n\n\t\t\t\t\tbuffer = \"\";\n\t\t\t\t\tstate = \"before-selector\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tswitch (state) {\n\t\t\t\tcase \"before-selector\":\n\t\t\t\t\tstate = \"selector\";\n\t\t\t\t\tstyleRule = new CSSOM.CSSStyleRule();\n\t\t\t\t\tstyleRule.__starts = i;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"before-name\":\n\t\t\t\t\tstate = \"name\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"before-value\":\n\t\t\t\t\tstate = \"value\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"importRule-begin\":\n\t\t\t\t\tstate = \"importRule\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbuffer += character;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn styleSheet;\n};\n\n\n//.CommonJS\nexports.parse = CSSOM.parse;\n// The following modules cannot be included sooner due to the mutual dependency with parse.js\nCSSOM.CSSStyleSheet = require(\"./CSSStyleSheet\").CSSStyleSheet;\nCSSOM.CSSStyleRule = require(\"./CSSStyleRule\").CSSStyleRule;\nCSSOM.CSSImportRule = require(\"./CSSImportRule\").CSSImportRule;\nCSSOM.CSSMediaRule = require(\"./CSSMediaRule\").CSSMediaRule;\nCSSOM.CSSSupportsRule = require(\"./CSSSupportsRule\").CSSSupportsRule;\nCSSOM.CSSFontFaceRule = require(\"./CSSFontFaceRule\").CSSFontFaceRule;\nCSSOM.CSSHostRule = require(\"./CSSHostRule\").CSSHostRule;\nCSSOM.CSSStyleDeclaration = require('./CSSStyleDeclaration').CSSStyleDeclaration;\nCSSOM.CSSKeyframeRule = require('./CSSKeyframeRule').CSSKeyframeRule;\nCSSOM.CSSKeyframesRule = require('./CSSKeyframesRule').CSSKeyframesRule;\nCSSOM.CSSValueExpression = require('./CSSValueExpression').CSSValueExpression;\nCSSOM.CSSDocumentRule = require('./CSSDocumentRule').CSSDocumentRule;\n///CommonJS\n","/*********************************************************************\n * This is a fork from the CSS Style Declaration part of\n * https://github.com/NV/CSSOM\n ********************************************************************/\n'use strict';\nvar CSSOM = require('cssom');\nvar allProperties = require('./allProperties');\nvar allExtraProperties = require('./allExtraProperties');\nvar implementedProperties = require('./implementedProperties');\nvar { dashedToCamelCase } = require('./parsers');\nvar getBasicPropertyDescriptor = require('./utils/getBasicPropertyDescriptor');\n\n/**\n * @constructor\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration\n */\nvar CSSStyleDeclaration = function CSSStyleDeclaration(onChangeCallback) {\n this._values = {};\n this._importants = {};\n this._length = 0;\n this._onChange =\n onChangeCallback ||\n function() {\n return;\n };\n};\nCSSStyleDeclaration.prototype = {\n constructor: CSSStyleDeclaration,\n\n /**\n *\n * @param {string} name\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyValue\n * @return {string} the value of the property if it has been explicitly set for this declaration block.\n * Returns the empty string if the property has not been set.\n */\n getPropertyValue: function(name) {\n if (!this._values.hasOwnProperty(name)) {\n return '';\n }\n return this._values[name].toString();\n },\n\n /**\n *\n * @param {string} name\n * @param {string} value\n * @param {string} [priority=null] \"important\" or null\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-setProperty\n */\n setProperty: function(name, value, priority) {\n if (value === undefined) {\n return;\n }\n if (value === null || value === '') {\n this.removeProperty(name);\n return;\n }\n var isCustomProperty = name.indexOf('--') === 0;\n if (isCustomProperty) {\n this._setProperty(name, value, priority);\n return;\n }\n var lowercaseName = name.toLowerCase();\n if (!allProperties.has(lowercaseName) && !allExtraProperties.has(lowercaseName)) {\n return;\n }\n\n this[lowercaseName] = value;\n this._importants[lowercaseName] = priority;\n },\n _setProperty: function(name, value, priority) {\n if (value === undefined) {\n return;\n }\n if (value === null || value === '') {\n this.removeProperty(name);\n return;\n }\n if (this._values[name]) {\n // Property already exist. Overwrite it.\n var index = Array.prototype.indexOf.call(this, name);\n if (index < 0) {\n this[this._length] = name;\n this._length++;\n }\n } else {\n // New property.\n this[this._length] = name;\n this._length++;\n }\n this._values[name] = value;\n this._importants[name] = priority;\n this._onChange(this.cssText);\n },\n\n /**\n *\n * @param {string} name\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-removeProperty\n * @return {string} the value of the property if it has been explicitly set for this declaration block.\n * Returns the empty string if the property has not been set or the property name does not correspond to a known CSS property.\n */\n removeProperty: function(name) {\n if (!this._values.hasOwnProperty(name)) {\n return '';\n }\n\n var prevValue = this._values[name];\n delete this._values[name];\n delete this._importants[name];\n\n var index = Array.prototype.indexOf.call(this, name);\n if (index < 0) {\n return prevValue;\n }\n\n // That's what WebKit and Opera do\n Array.prototype.splice.call(this, index, 1);\n\n // That's what Firefox does\n //this[index] = \"\"\n\n this._onChange(this.cssText);\n return prevValue;\n },\n\n /**\n *\n * @param {String} name\n */\n getPropertyPriority: function(name) {\n return this._importants[name] || '';\n },\n\n getPropertyCSSValue: function() {\n //FIXME\n return;\n },\n\n /**\n * element.style.overflow = \"auto\"\n * element.style.getPropertyShorthand(\"overflow-x\")\n * -> \"overflow\"\n */\n getPropertyShorthand: function() {\n //FIXME\n return;\n },\n\n isPropertyImplicit: function() {\n //FIXME\n return;\n },\n\n /**\n * http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-item\n */\n item: function(index) {\n index = parseInt(index, 10);\n if (index < 0 || index >= this._length) {\n return '';\n }\n return this[index];\n },\n};\n\nObject.defineProperties(CSSStyleDeclaration.prototype, {\n cssText: {\n get: function() {\n var properties = [];\n var i;\n var name;\n var value;\n var priority;\n for (i = 0; i < this._length; i++) {\n name = this[i];\n value = this.getPropertyValue(name);\n priority = this.getPropertyPriority(name);\n if (priority !== '') {\n priority = ' !' + priority;\n }\n properties.push([name, ': ', value, priority, ';'].join(''));\n }\n return properties.join(' ');\n },\n set: function(value) {\n var i;\n this._values = {};\n Array.prototype.splice.call(this, 0, this._length);\n this._importants = {};\n var dummyRule;\n try {\n dummyRule = CSSOM.parse('#bogus{' + value + '}').cssRules[0].style;\n } catch (err) {\n // malformed css, just return\n return;\n }\n var rule_length = dummyRule.length;\n var name;\n for (i = 0; i < rule_length; ++i) {\n name = dummyRule[i];\n this.setProperty(\n dummyRule[i],\n dummyRule.getPropertyValue(name),\n dummyRule.getPropertyPriority(name)\n );\n }\n this._onChange(this.cssText);\n },\n enumerable: true,\n configurable: true,\n },\n parentRule: {\n get: function() {\n return null;\n },\n enumerable: true,\n configurable: true,\n },\n length: {\n get: function() {\n return this._length;\n },\n /**\n * This deletes indices if the new length is less then the current\n * length. If the new length is more, it does nothing, the new indices\n * will be undefined until set.\n **/\n set: function(value) {\n var i;\n for (i = value; i < this._length; i++) {\n delete this[i];\n }\n this._length = value;\n },\n enumerable: true,\n configurable: true,\n },\n});\n\nrequire('./properties')(CSSStyleDeclaration.prototype);\n\nallProperties.forEach(function(property) {\n if (!implementedProperties.has(property)) {\n var declaration = getBasicPropertyDescriptor(property);\n Object.defineProperty(CSSStyleDeclaration.prototype, property, declaration);\n Object.defineProperty(CSSStyleDeclaration.prototype, dashedToCamelCase(property), declaration);\n }\n});\n\nallExtraProperties.forEach(function(property) {\n if (!implementedProperties.has(property)) {\n var declaration = getBasicPropertyDescriptor(property);\n Object.defineProperty(CSSStyleDeclaration.prototype, property, declaration);\n Object.defineProperty(CSSStyleDeclaration.prototype, dashedToCamelCase(property), declaration);\n }\n});\n\nexports.CSSStyleDeclaration = CSSStyleDeclaration;\n","'use strict';\n\n/**\n * This file contains all implemented properties that are not a part of any\n * current specifications or drafts, but are handled by browsers nevertheless.\n */\n\nvar allWebkitProperties = require('./allWebkitProperties');\n\nmodule.exports = new Set(\n [\n 'background-position-x',\n 'background-position-y',\n 'background-repeat-x',\n 'background-repeat-y',\n 'color-interpolation',\n 'color-profile',\n 'color-rendering',\n 'css-float',\n 'enable-background',\n 'fill',\n 'fill-opacity',\n 'fill-rule',\n 'glyph-orientation-horizontal',\n 'image-rendering',\n 'kerning',\n 'marker',\n 'marker-end',\n 'marker-mid',\n 'marker-offset',\n 'marker-start',\n 'marks',\n 'pointer-events',\n 'shape-rendering',\n 'size',\n 'src',\n 'stop-color',\n 'stop-opacity',\n 'stroke',\n 'stroke-dasharray',\n 'stroke-dashoffset',\n 'stroke-linecap',\n 'stroke-linejoin',\n 'stroke-miterlimit',\n 'stroke-opacity',\n 'stroke-width',\n 'text-anchor',\n 'text-line-through',\n 'text-line-through-color',\n 'text-line-through-mode',\n 'text-line-through-style',\n 'text-line-through-width',\n 'text-overline',\n 'text-overline-color',\n 'text-overline-mode',\n 'text-overline-style',\n 'text-overline-width',\n 'text-rendering',\n 'text-underline',\n 'text-underline-color',\n 'text-underline-mode',\n 'text-underline-style',\n 'text-underline-width',\n 'unicode-range',\n 'vector-effect',\n ].concat(allWebkitProperties)\n);\n","'use strict';\n\n// autogenerated - 4/29/2020\n\n/*\n *\n * https://www.w3.org/Style/CSS/all-properties.en.html\n */\n\nmodule.exports = new Set([\n 'align-content',\n 'align-items',\n 'align-self',\n 'alignment-baseline',\n 'all',\n 'animation',\n 'animation-delay',\n 'animation-direction',\n 'animation-duration',\n 'animation-fill-mode',\n 'animation-iteration-count',\n 'animation-name',\n 'animation-play-state',\n 'animation-timing-function',\n 'appearance',\n 'azimuth',\n 'background',\n 'background-attachment',\n 'background-blend-mode',\n 'background-clip',\n 'background-color',\n 'background-image',\n 'background-origin',\n 'background-position',\n 'background-repeat',\n 'background-size',\n 'baseline-shift',\n 'block-overflow',\n 'block-size',\n 'bookmark-label',\n 'bookmark-level',\n 'bookmark-state',\n 'border',\n 'border-block',\n 'border-block-color',\n 'border-block-end',\n 'border-block-end-color',\n 'border-block-end-style',\n 'border-block-end-width',\n 'border-block-start',\n 'border-block-start-color',\n 'border-block-start-style',\n 'border-block-start-width',\n 'border-block-style',\n 'border-block-width',\n 'border-bottom',\n 'border-bottom-color',\n 'border-bottom-left-radius',\n 'border-bottom-right-radius',\n 'border-bottom-style',\n 'border-bottom-width',\n 'border-boundary',\n 'border-collapse',\n 'border-color',\n 'border-end-end-radius',\n 'border-end-start-radius',\n 'border-image',\n 'border-image-outset',\n 'border-image-repeat',\n 'border-image-slice',\n 'border-image-source',\n 'border-image-width',\n 'border-inline',\n 'border-inline-color',\n 'border-inline-end',\n 'border-inline-end-color',\n 'border-inline-end-style',\n 'border-inline-end-width',\n 'border-inline-start',\n 'border-inline-start-color',\n 'border-inline-start-style',\n 'border-inline-start-width',\n 'border-inline-style',\n 'border-inline-width',\n 'border-left',\n 'border-left-color',\n 'border-left-style',\n 'border-left-width',\n 'border-radius',\n 'border-right',\n 'border-right-color',\n 'border-right-style',\n 'border-right-width',\n 'border-spacing',\n 'border-start-end-radius',\n 'border-start-start-radius',\n 'border-style',\n 'border-top',\n 'border-top-color',\n 'border-top-left-radius',\n 'border-top-right-radius',\n 'border-top-style',\n 'border-top-width',\n 'border-width',\n 'bottom',\n 'box-decoration-break',\n 'box-shadow',\n 'box-sizing',\n 'box-snap',\n 'break-after',\n 'break-before',\n 'break-inside',\n 'caption-side',\n 'caret',\n 'caret-color',\n 'caret-shape',\n 'chains',\n 'clear',\n 'clip',\n 'clip-path',\n 'clip-rule',\n 'color',\n 'color-adjust',\n 'color-interpolation-filters',\n 'color-scheme',\n 'column-count',\n 'column-fill',\n 'column-gap',\n 'column-rule',\n 'column-rule-color',\n 'column-rule-style',\n 'column-rule-width',\n 'column-span',\n 'column-width',\n 'columns',\n 'contain',\n 'content',\n 'continue',\n 'counter-increment',\n 'counter-reset',\n 'counter-set',\n 'cue',\n 'cue-after',\n 'cue-before',\n 'cursor',\n 'direction',\n 'display',\n 'dominant-baseline',\n 'elevation',\n 'empty-cells',\n 'filter',\n 'flex',\n 'flex-basis',\n 'flex-direction',\n 'flex-flow',\n 'flex-grow',\n 'flex-shrink',\n 'flex-wrap',\n 'float',\n 'flood-color',\n 'flood-opacity',\n 'flow',\n 'flow-from',\n 'flow-into',\n 'font',\n 'font-family',\n 'font-feature-settings',\n 'font-kerning',\n 'font-language-override',\n 'font-optical-sizing',\n 'font-palette',\n 'font-size',\n 'font-size-adjust',\n 'font-stretch',\n 'font-style',\n 'font-synthesis',\n 'font-synthesis-small-caps',\n 'font-synthesis-style',\n 'font-synthesis-weight',\n 'font-variant',\n 'font-variant-alternates',\n 'font-variant-caps',\n 'font-variant-east-asian',\n 'font-variant-emoji',\n 'font-variant-ligatures',\n 'font-variant-numeric',\n 'font-variant-position',\n 'font-variation-settings',\n 'font-weight',\n 'footnote-display',\n 'footnote-policy',\n 'forced-color-adjust',\n 'gap',\n 'glyph-orientation-vertical',\n 'grid',\n 'grid-area',\n 'grid-auto-columns',\n 'grid-auto-flow',\n 'grid-auto-rows',\n 'grid-column',\n 'grid-column-end',\n 'grid-column-start',\n 'grid-row',\n 'grid-row-end',\n 'grid-row-start',\n 'grid-template',\n 'grid-template-areas',\n 'grid-template-columns',\n 'grid-template-rows',\n 'hanging-punctuation',\n 'height',\n 'hyphenate-character',\n 'hyphenate-limit-chars',\n 'hyphenate-limit-last',\n 'hyphenate-limit-lines',\n 'hyphenate-limit-zone',\n 'hyphens',\n 'image-orientation',\n 'image-rendering',\n 'image-resolution',\n 'initial-letters',\n 'initial-letters-align',\n 'initial-letters-wrap',\n 'inline-size',\n 'inline-sizing',\n 'inset',\n 'inset-block',\n 'inset-block-end',\n 'inset-block-start',\n 'inset-inline',\n 'inset-inline-end',\n 'inset-inline-start',\n 'isolation',\n 'justify-content',\n 'justify-items',\n 'justify-self',\n 'left',\n 'letter-spacing',\n 'lighting-color',\n 'line-break',\n 'line-clamp',\n 'line-grid',\n 'line-height',\n 'line-padding',\n 'line-snap',\n 'list-style',\n 'list-style-image',\n 'list-style-position',\n 'list-style-type',\n 'margin',\n 'margin-block',\n 'margin-block-end',\n 'margin-block-start',\n 'margin-bottom',\n 'margin-inline',\n 'margin-inline-end',\n 'margin-inline-start',\n 'margin-left',\n 'margin-right',\n 'margin-top',\n 'marker-side',\n 'mask',\n 'mask-border',\n 'mask-border-mode',\n 'mask-border-outset',\n 'mask-border-repeat',\n 'mask-border-slice',\n 'mask-border-source',\n 'mask-border-width',\n 'mask-clip',\n 'mask-composite',\n 'mask-image',\n 'mask-mode',\n 'mask-origin',\n 'mask-position',\n 'mask-repeat',\n 'mask-size',\n 'mask-type',\n 'max-block-size',\n 'max-height',\n 'max-inline-size',\n 'max-lines',\n 'max-width',\n 'min-block-size',\n 'min-height',\n 'min-inline-size',\n 'min-width',\n 'mix-blend-mode',\n 'nav-down',\n 'nav-left',\n 'nav-right',\n 'nav-up',\n 'object-fit',\n 'object-position',\n 'offset',\n 'offset-after',\n 'offset-anchor',\n 'offset-before',\n 'offset-distance',\n 'offset-end',\n 'offset-path',\n 'offset-position',\n 'offset-rotate',\n 'offset-start',\n 'opacity',\n 'order',\n 'orphans',\n 'outline',\n 'outline-color',\n 'outline-offset',\n 'outline-style',\n 'outline-width',\n 'overflow',\n 'overflow-block',\n 'overflow-inline',\n 'overflow-wrap',\n 'overflow-x',\n 'overflow-y',\n 'padding',\n 'padding-block',\n 'padding-block-end',\n 'padding-block-start',\n 'padding-bottom',\n 'padding-inline',\n 'padding-inline-end',\n 'padding-inline-start',\n 'padding-left',\n 'padding-right',\n 'padding-top',\n 'page',\n 'page-break-after',\n 'page-break-before',\n 'page-break-inside',\n 'pause',\n 'pause-after',\n 'pause-before',\n 'pitch',\n 'pitch-range',\n 'place-content',\n 'place-items',\n 'place-self',\n 'play-during',\n 'position',\n 'quotes',\n 'region-fragment',\n 'resize',\n 'rest',\n 'rest-after',\n 'rest-before',\n 'richness',\n 'right',\n 'row-gap',\n 'ruby-align',\n 'ruby-merge',\n 'ruby-position',\n 'running',\n 'scroll-behavior',\n 'scroll-margin',\n 'scroll-margin-block',\n 'scroll-margin-block-end',\n 'scroll-margin-block-start',\n 'scroll-margin-bottom',\n 'scroll-margin-inline',\n 'scroll-margin-inline-end',\n 'scroll-margin-inline-start',\n 'scroll-margin-left',\n 'scroll-margin-right',\n 'scroll-margin-top',\n 'scroll-padding',\n 'scroll-padding-block',\n 'scroll-padding-block-end',\n 'scroll-padding-block-start',\n 'scroll-padding-bottom',\n 'scroll-padding-inline',\n 'scroll-padding-inline-end',\n 'scroll-padding-inline-start',\n 'scroll-padding-left',\n 'scroll-padding-right',\n 'scroll-padding-top',\n 'scroll-snap-align',\n 'scroll-snap-stop',\n 'scroll-snap-type',\n 'shape-image-threshold',\n 'shape-inside',\n 'shape-margin',\n 'shape-outside',\n 'spatial-navigation-action',\n 'spatial-navigation-contain',\n 'spatial-navigation-function',\n 'speak',\n 'speak-as',\n 'speak-header',\n 'speak-numeral',\n 'speak-punctuation',\n 'speech-rate',\n 'stress',\n 'string-set',\n 'tab-size',\n 'table-layout',\n 'text-align',\n 'text-align-all',\n 'text-align-last',\n 'text-combine-upright',\n 'text-decoration',\n 'text-decoration-color',\n 'text-decoration-line',\n 'text-decoration-style',\n 'text-emphasis',\n 'text-emphasis-color',\n 'text-emphasis-position',\n 'text-emphasis-style',\n 'text-group-align',\n 'text-indent',\n 'text-justify',\n 'text-orientation',\n 'text-overflow',\n 'text-shadow',\n 'text-space-collapse',\n 'text-space-trim',\n 'text-spacing',\n 'text-transform',\n 'text-underline-position',\n 'text-wrap',\n 'top',\n 'transform',\n 'transform-box',\n 'transform-origin',\n 'transition',\n 'transition-delay',\n 'transition-duration',\n 'transition-property',\n 'transition-timing-function',\n 'unicode-bidi',\n 'user-select',\n 'vertical-align',\n 'visibility',\n 'voice-balance',\n 'voice-duration',\n 'voice-family',\n 'voice-pitch',\n 'voice-range',\n 'voice-rate',\n 'voice-stress',\n 'voice-volume',\n 'volume',\n 'white-space',\n 'widows',\n 'width',\n 'will-change',\n 'word-boundary-detection',\n 'word-boundary-expansion',\n 'word-break',\n 'word-spacing',\n 'word-wrap',\n 'wrap-after',\n 'wrap-before',\n 'wrap-flow',\n 'wrap-inside',\n 'wrap-through',\n 'writing-mode',\n 'z-index',\n]);\n","'use strict';\n\n/**\n * This file contains all implemented properties that are not a part of any\n * current specifications or drafts, but are handled by browsers nevertheless.\n */\n\nmodule.exports = [\n 'animation',\n 'animation-delay',\n 'animation-direction',\n 'animation-duration',\n 'animation-fill-mode',\n 'animation-iteration-count',\n 'animation-name',\n 'animation-play-state',\n 'animation-timing-function',\n 'appearance',\n 'aspect-ratio',\n 'backface-visibility',\n 'background-clip',\n 'background-composite',\n 'background-origin',\n 'background-size',\n 'border-after',\n 'border-after-color',\n 'border-after-style',\n 'border-after-width',\n 'border-before',\n 'border-before-color',\n 'border-before-style',\n 'border-before-width',\n 'border-end',\n 'border-end-color',\n 'border-end-style',\n 'border-end-width',\n 'border-fit',\n 'border-horizontal-spacing',\n 'border-image',\n 'border-radius',\n 'border-start',\n 'border-start-color',\n 'border-start-style',\n 'border-start-width',\n 'border-vertical-spacing',\n 'box-align',\n 'box-direction',\n 'box-flex',\n 'box-flex-group',\n 'box-lines',\n 'box-ordinal-group',\n 'box-orient',\n 'box-pack',\n 'box-reflect',\n 'box-shadow',\n 'color-correction',\n 'column-axis',\n 'column-break-after',\n 'column-break-before',\n 'column-break-inside',\n 'column-count',\n 'column-gap',\n 'column-rule',\n 'column-rule-color',\n 'column-rule-style',\n 'column-rule-width',\n 'columns',\n 'column-span',\n 'column-width',\n 'filter',\n 'flex-align',\n 'flex-direction',\n 'flex-flow',\n 'flex-item-align',\n 'flex-line-pack',\n 'flex-order',\n 'flex-pack',\n 'flex-wrap',\n 'flow-from',\n 'flow-into',\n 'font-feature-settings',\n 'font-kerning',\n 'font-size-delta',\n 'font-smoothing',\n 'font-variant-ligatures',\n 'highlight',\n 'hyphenate-character',\n 'hyphenate-limit-after',\n 'hyphenate-limit-before',\n 'hyphenate-limit-lines',\n 'hyphens',\n 'line-align',\n 'line-box-contain',\n 'line-break',\n 'line-clamp',\n 'line-grid',\n 'line-snap',\n 'locale',\n 'logical-height',\n 'logical-width',\n 'margin-after',\n 'margin-after-collapse',\n 'margin-before',\n 'margin-before-collapse',\n 'margin-bottom-collapse',\n 'margin-collapse',\n 'margin-end',\n 'margin-start',\n 'margin-top-collapse',\n 'marquee',\n 'marquee-direction',\n 'marquee-increment',\n 'marquee-repetition',\n 'marquee-speed',\n 'marquee-style',\n 'mask',\n 'mask-attachment',\n 'mask-box-image',\n 'mask-box-image-outset',\n 'mask-box-image-repeat',\n 'mask-box-image-slice',\n 'mask-box-image-source',\n 'mask-box-image-width',\n 'mask-clip',\n 'mask-composite',\n 'mask-image',\n 'mask-origin',\n 'mask-position',\n 'mask-position-x',\n 'mask-position-y',\n 'mask-repeat',\n 'mask-repeat-x',\n 'mask-repeat-y',\n 'mask-size',\n 'match-nearest-mail-blockquote-color',\n 'max-logical-height',\n 'max-logical-width',\n 'min-logical-height',\n 'min-logical-width',\n 'nbsp-mode',\n 'overflow-scrolling',\n 'padding-after',\n 'padding-before',\n 'padding-end',\n 'padding-start',\n 'perspective',\n 'perspective-origin',\n 'perspective-origin-x',\n 'perspective-origin-y',\n 'print-color-adjust',\n 'region-break-after',\n 'region-break-before',\n 'region-break-inside',\n 'region-overflow',\n 'rtl-ordering',\n 'svg-shadow',\n 'tap-highlight-color',\n 'text-combine',\n 'text-decorations-in-effect',\n 'text-emphasis',\n 'text-emphasis-color',\n 'text-emphasis-position',\n 'text-emphasis-style',\n 'text-fill-color',\n 'text-orientation',\n 'text-security',\n 'text-size-adjust',\n 'text-stroke',\n 'text-stroke-color',\n 'text-stroke-width',\n 'transform',\n 'transform-origin',\n 'transform-origin-x',\n 'transform-origin-y',\n 'transform-origin-z',\n 'transform-style',\n 'transition',\n 'transition-delay',\n 'transition-duration',\n 'transition-property',\n 'transition-timing-function',\n 'user-drag',\n 'user-modify',\n 'user-select',\n 'wrap',\n 'wrap-flow',\n 'wrap-margin',\n 'wrap-padding',\n 'wrap-shape-inside',\n 'wrap-shape-outside',\n 'wrap-through',\n 'writing-mode',\n 'zoom',\n].map(prop => 'webkit-' + prop);\n","'use strict';\n\nmodule.exports.POSITION_AT_SHORTHAND = {\n first: 0,\n second: 1,\n};\n","'use strict';\n\n// autogenerated - 4/29/2020\n\n/*\n *\n * https://www.w3.org/Style/CSS/all-properties.en.html\n */\n\nvar implementedProperties = new Set();\nimplementedProperties.add(\"azimuth\");\nimplementedProperties.add(\"background\");\nimplementedProperties.add(\"background-attachment\");\nimplementedProperties.add(\"background-color\");\nimplementedProperties.add(\"background-image\");\nimplementedProperties.add(\"background-position\");\nimplementedProperties.add(\"background-repeat\");\nimplementedProperties.add(\"border\");\nimplementedProperties.add(\"border-bottom\");\nimplementedProperties.add(\"border-bottom-color\");\nimplementedProperties.add(\"border-bottom-style\");\nimplementedProperties.add(\"border-bottom-width\");\nimplementedProperties.add(\"border-collapse\");\nimplementedProperties.add(\"border-color\");\nimplementedProperties.add(\"border-left\");\nimplementedProperties.add(\"border-left-color\");\nimplementedProperties.add(\"border-left-style\");\nimplementedProperties.add(\"border-left-width\");\nimplementedProperties.add(\"border-right\");\nimplementedProperties.add(\"border-right-color\");\nimplementedProperties.add(\"border-right-style\");\nimplementedProperties.add(\"border-right-width\");\nimplementedProperties.add(\"border-spacing\");\nimplementedProperties.add(\"border-style\");\nimplementedProperties.add(\"border-top\");\nimplementedProperties.add(\"border-top-color\");\nimplementedProperties.add(\"border-top-style\");\nimplementedProperties.add(\"border-top-width\");\nimplementedProperties.add(\"border-width\");\nimplementedProperties.add(\"bottom\");\nimplementedProperties.add(\"clear\");\nimplementedProperties.add(\"clip\");\nimplementedProperties.add(\"color\");\nimplementedProperties.add(\"css-float\");\nimplementedProperties.add(\"flex\");\nimplementedProperties.add(\"flex-basis\");\nimplementedProperties.add(\"flex-grow\");\nimplementedProperties.add(\"flex-shrink\");\nimplementedProperties.add(\"float\");\nimplementedProperties.add(\"flood-color\");\nimplementedProperties.add(\"font\");\nimplementedProperties.add(\"font-family\");\nimplementedProperties.add(\"font-size\");\nimplementedProperties.add(\"font-style\");\nimplementedProperties.add(\"font-variant\");\nimplementedProperties.add(\"font-weight\");\nimplementedProperties.add(\"height\");\nimplementedProperties.add(\"left\");\nimplementedProperties.add(\"lighting-color\");\nimplementedProperties.add(\"line-height\");\nimplementedProperties.add(\"margin\");\nimplementedProperties.add(\"margin-bottom\");\nimplementedProperties.add(\"margin-left\");\nimplementedProperties.add(\"margin-right\");\nimplementedProperties.add(\"margin-top\");\nimplementedProperties.add(\"opacity\");\nimplementedProperties.add(\"outline-color\");\nimplementedProperties.add(\"padding\");\nimplementedProperties.add(\"padding-bottom\");\nimplementedProperties.add(\"padding-left\");\nimplementedProperties.add(\"padding-right\");\nimplementedProperties.add(\"padding-top\");\nimplementedProperties.add(\"right\");\nimplementedProperties.add(\"stop-color\");\nimplementedProperties.add(\"text-line-through-color\");\nimplementedProperties.add(\"text-overline-color\");\nimplementedProperties.add(\"text-underline-color\");\nimplementedProperties.add(\"top\");\nimplementedProperties.add(\"webkit-border-after-color\");\nimplementedProperties.add(\"webkit-border-before-color\");\nimplementedProperties.add(\"webkit-border-end-color\");\nimplementedProperties.add(\"webkit-border-start-color\");\nimplementedProperties.add(\"webkit-column-rule-color\");\nimplementedProperties.add(\"webkit-match-nearest-mail-blockquote-color\");\nimplementedProperties.add(\"webkit-tap-highlight-color\");\nimplementedProperties.add(\"webkit-text-emphasis-color\");\nimplementedProperties.add(\"webkit-text-fill-color\");\nimplementedProperties.add(\"webkit-text-stroke-color\");\nimplementedProperties.add(\"width\");\nmodule.exports = implementedProperties;\n","/*********************************************************************\n * These are commonly used parsers for CSS Values they take a string *\n * to parse and return a string after it's been converted, if needed *\n ********************************************************************/\n'use strict';\n\nconst namedColors = require('./named_colors.json');\nconst { hslToRgb } = require('./utils/colorSpace');\n\nexports.TYPES = {\n INTEGER: 1,\n NUMBER: 2,\n LENGTH: 3,\n PERCENT: 4,\n URL: 5,\n COLOR: 6,\n STRING: 7,\n ANGLE: 8,\n KEYWORD: 9,\n NULL_OR_EMPTY_STR: 10,\n CALC: 11,\n};\n\n// rough regular expressions\nvar integerRegEx = /^[-+]?[0-9]+$/;\nvar numberRegEx = /^[-+]?[0-9]*\\.?[0-9]+$/;\nvar lengthRegEx = /^(0|[-+]?[0-9]*\\.?[0-9]+(in|cm|em|mm|pt|pc|px|ex|rem|vh|vw|ch))$/;\nvar percentRegEx = /^[-+]?[0-9]*\\.?[0-9]+%$/;\nvar urlRegEx = /^url\\(\\s*([^)]*)\\s*\\)$/;\nvar stringRegEx = /^(\"[^\"]*\"|'[^']*')$/;\nvar colorRegEx1 = /^#([0-9a-fA-F]{3,4}){1,2}$/;\nvar colorRegEx2 = /^rgb\\(([^)]*)\\)$/;\nvar colorRegEx3 = /^rgba\\(([^)]*)\\)$/;\nvar calcRegEx = /^calc\\(([^)]*)\\)$/;\nvar colorRegEx4 = /^hsla?\\(\\s*(-?\\d+|-?\\d*.\\d+)\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*,\\s*(-?\\d+|-?\\d*.\\d+)%\\s*(,\\s*(-?\\d+|-?\\d*.\\d+)\\s*)?\\)/;\nvar angleRegEx = /^([-+]?[0-9]*\\.?[0-9]+)(deg|grad|rad)$/;\n\n// This will return one of the above types based on the passed in string\nexports.valueType = function valueType(val) {\n if (val === '' || val === null) {\n return exports.TYPES.NULL_OR_EMPTY_STR;\n }\n if (typeof val === 'number') {\n val = val.toString();\n }\n\n if (typeof val !== 'string') {\n return undefined;\n }\n\n if (integerRegEx.test(val)) {\n return exports.TYPES.INTEGER;\n }\n if (numberRegEx.test(val)) {\n return exports.TYPES.NUMBER;\n }\n if (lengthRegEx.test(val)) {\n return exports.TYPES.LENGTH;\n }\n if (percentRegEx.test(val)) {\n return exports.TYPES.PERCENT;\n }\n if (urlRegEx.test(val)) {\n return exports.TYPES.URL;\n }\n if (calcRegEx.test(val)) {\n return exports.TYPES.CALC;\n }\n if (stringRegEx.test(val)) {\n return exports.TYPES.STRING;\n }\n if (angleRegEx.test(val)) {\n return exports.TYPES.ANGLE;\n }\n if (colorRegEx1.test(val)) {\n return exports.TYPES.COLOR;\n }\n\n var res = colorRegEx2.exec(val);\n var parts;\n if (res !== null) {\n parts = res[1].split(/\\s*,\\s*/);\n if (parts.length !== 3) {\n return undefined;\n }\n if (\n parts.every(percentRegEx.test.bind(percentRegEx)) ||\n parts.every(integerRegEx.test.bind(integerRegEx))\n ) {\n return exports.TYPES.COLOR;\n }\n return undefined;\n }\n res = colorRegEx3.exec(val);\n if (res !== null) {\n parts = res[1].split(/\\s*,\\s*/);\n if (parts.length !== 4) {\n return undefined;\n }\n if (\n parts.slice(0, 3).every(percentRegEx.test.bind(percentRegEx)) ||\n parts.slice(0, 3).every(integerRegEx.test.bind(integerRegEx))\n ) {\n if (numberRegEx.test(parts[3])) {\n return exports.TYPES.COLOR;\n }\n }\n return undefined;\n }\n\n if (colorRegEx4.test(val)) {\n return exports.TYPES.COLOR;\n }\n\n // could still be a color, one of the standard keyword colors\n val = val.toLowerCase();\n\n if (namedColors.includes(val)) {\n return exports.TYPES.COLOR;\n }\n\n switch (val) {\n // the following are deprecated in CSS3\n case 'activeborder':\n case 'activecaption':\n case 'appworkspace':\n case 'background':\n case 'buttonface':\n case 'buttonhighlight':\n case 'buttonshadow':\n case 'buttontext':\n case 'captiontext':\n case 'graytext':\n case 'highlight':\n case 'highlighttext':\n case 'inactiveborder':\n case 'inactivecaption':\n case 'inactivecaptiontext':\n case 'infobackground':\n case 'infotext':\n case 'menu':\n case 'menutext':\n case 'scrollbar':\n case 'threeddarkshadow':\n case 'threedface':\n case 'threedhighlight':\n case 'threedlightshadow':\n case 'threedshadow':\n case 'window':\n case 'windowframe':\n case 'windowtext':\n return exports.TYPES.COLOR;\n default:\n return exports.TYPES.KEYWORD;\n }\n};\n\nexports.parseInteger = function parseInteger(val) {\n var type = exports.valueType(val);\n if (type === exports.TYPES.NULL_OR_EMPTY_STR) {\n return val;\n }\n if (type !== exports.TYPES.INTEGER) {\n return undefined;\n }\n return String(parseInt(val, 10));\n};\n\nexports.parseNumber = function parseNumber(val) {\n var type = exports.valueType(val);\n if (type === exports.TYPES.NULL_OR_EMPTY_STR) {\n return val;\n }\n if (type !== exports.TYPES.NUMBER && type !== exports.TYPES.INTEGER) {\n return undefined;\n }\n return String(parseFloat(val));\n};\n\nexports.parseLength = function parseLength(val) {\n if (val === 0 || val === '0') {\n return '0px';\n }\n var type = exports.valueType(val);\n if (type === exports.TYPES.NULL_OR_EMPTY_STR) {\n return val;\n }\n if (type !== exports.TYPES.LENGTH) {\n return undefined;\n }\n return val;\n};\n\nexports.parsePercent = function parsePercent(val) {\n if (val === 0 || val === '0') {\n return '0%';\n }\n var type = exports.valueType(val);\n if (type === exports.TYPES.NULL_OR_EMPTY_STR) {\n return val;\n }\n if (type !== exports.TYPES.PERCENT) {\n return undefined;\n }\n return val;\n};\n\n// either a length or a percent\nexports.parseMeasurement = function parseMeasurement(val) {\n var type = exports.valueType(val);\n if (type === exports.TYPES.CALC) {\n return val;\n }\n\n var length = exports.parseLength(val);\n if (length !== undefined) {\n return length;\n }\n return exports.parsePercent(val);\n};\n\nexports.parseUrl = function parseUrl(val) {\n var type = exports.valueType(val);\n if (type === exports.TYPES.NULL_OR_EMPTY_STR) {\n return val;\n }\n var res = urlRegEx.exec(val);\n // does it match the regex?\n if (!res) {\n return undefined;\n }\n var str = res[1];\n // if it starts with single or double quotes, does it end with the same?\n if ((str[0] === '\"' || str[0] === \"'\") && str[0] !== str[str.length - 1]) {\n return undefined;\n }\n if (str[0] === '\"' || str[0] === \"'\") {\n str = str.substr(1, str.length - 2);\n }\n\n var i;\n for (i = 0; i < str.length; i++) {\n switch (str[i]) {\n case '(':\n case ')':\n case ' ':\n case '\\t':\n case '\\n':\n case \"'\":\n case '\"':\n return undefined;\n case '\\\\':\n i++;\n break;\n }\n }\n\n return 'url(' + str + ')';\n};\n\nexports.parseString = function parseString(val) {\n var type = exports.valueType(val);\n if (type === exports.TYPES.NULL_OR_EMPTY_STR) {\n return val;\n }\n if (type !== exports.TYPES.STRING) {\n return undefined;\n }\n var i;\n for (i = 1; i < val.length - 1; i++) {\n switch (val[i]) {\n case val[0]:\n return undefined;\n case '\\\\':\n i++;\n while (i < val.length - 1 && /[0-9A-Fa-f]/.test(val[i])) {\n i++;\n }\n break;\n }\n }\n if (i >= val.length) {\n return undefined;\n }\n return val;\n};\n\nexports.parseColor = function parseColor(val) {\n var type = exports.valueType(val);\n if (type === exports.TYPES.NULL_OR_EMPTY_STR) {\n return val;\n }\n var red,\n green,\n blue,\n hue,\n saturation,\n lightness,\n alpha = 1;\n var parts;\n var res = colorRegEx1.exec(val);\n // is it #aaa, #ababab, #aaaa, #abababaa\n if (res) {\n var defaultHex = val.substr(1);\n var hex = val.substr(1);\n if (hex.length === 3 || hex.length === 4) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n\n if (defaultHex.length === 4) {\n hex = hex + defaultHex[3] + defaultHex[3];\n }\n }\n red = parseInt(hex.substr(0, 2), 16);\n green = parseInt(hex.substr(2, 2), 16);\n blue = parseInt(hex.substr(4, 2), 16);\n if (hex.length === 8) {\n var hexAlpha = hex.substr(6, 2);\n var hexAlphaToRgbaAlpha = Number((parseInt(hexAlpha, 16) / 255).toFixed(3));\n\n return 'rgba(' + red + ', ' + green + ', ' + blue + ', ' + hexAlphaToRgbaAlpha + ')';\n }\n return 'rgb(' + red + ', ' + green + ', ' + blue + ')';\n }\n\n res = colorRegEx2.exec(val);\n if (res) {\n parts = res[1].split(/\\s*,\\s*/);\n if (parts.length !== 3) {\n return undefined;\n }\n if (parts.every(percentRegEx.test.bind(percentRegEx))) {\n red = Math.floor((parseFloat(parts[0].slice(0, -1)) * 255) / 100);\n green = Math.floor((parseFloat(parts[1].slice(0, -1)) * 255) / 100);\n blue = Math.floor((parseFloat(parts[2].slice(0, -1)) * 255) / 100);\n } else if (parts.every(integerRegEx.test.bind(integerRegEx))) {\n red = parseInt(parts[0], 10);\n green = parseInt(parts[1], 10);\n blue = parseInt(parts[2], 10);\n } else {\n return undefined;\n }\n red = Math.min(255, Math.max(0, red));\n green = Math.min(255, Math.max(0, green));\n blue = Math.min(255, Math.max(0, blue));\n return 'rgb(' + red + ', ' + green + ', ' + blue + ')';\n }\n\n res = colorRegEx3.exec(val);\n if (res) {\n parts = res[1].split(/\\s*,\\s*/);\n if (parts.length !== 4) {\n return undefined;\n }\n if (parts.slice(0, 3).every(percentRegEx.test.bind(percentRegEx))) {\n red = Math.floor((parseFloat(parts[0].slice(0, -1)) * 255) / 100);\n green = Math.floor((parseFloat(parts[1].slice(0, -1)) * 255) / 100);\n blue = Math.floor((parseFloat(parts[2].slice(0, -1)) * 255) / 100);\n alpha = parseFloat(parts[3]);\n } else if (parts.slice(0, 3).every(integerRegEx.test.bind(integerRegEx))) {\n red = parseInt(parts[0], 10);\n green = parseInt(parts[1], 10);\n blue = parseInt(parts[2], 10);\n alpha = parseFloat(parts[3]);\n } else {\n return undefined;\n }\n if (isNaN(alpha)) {\n alpha = 1;\n }\n red = Math.min(255, Math.max(0, red));\n green = Math.min(255, Math.max(0, green));\n blue = Math.min(255, Math.max(0, blue));\n alpha = Math.min(1, Math.max(0, alpha));\n if (alpha === 1) {\n return 'rgb(' + red + ', ' + green + ', ' + blue + ')';\n }\n return 'rgba(' + red + ', ' + green + ', ' + blue + ', ' + alpha + ')';\n }\n\n res = colorRegEx4.exec(val);\n if (res) {\n const [, _hue, _saturation, _lightness, _alphaString = ''] = res;\n const _alpha = parseFloat(_alphaString.replace(',', '').trim());\n if (!_hue || !_saturation || !_lightness) {\n return undefined;\n }\n hue = parseFloat(_hue);\n saturation = parseInt(_saturation, 10);\n lightness = parseInt(_lightness, 10);\n if (_alpha && numberRegEx.test(_alpha)) {\n alpha = parseFloat(_alpha);\n }\n\n const [r, g, b] = hslToRgb(hue, saturation / 100, lightness / 100);\n if (!_alphaString || alpha === 1) {\n return 'rgb(' + r + ', ' + g + ', ' + b + ')';\n }\n return 'rgba(' + r + ', ' + g + ', ' + b + ', ' + alpha + ')';\n }\n\n if (type === exports.TYPES.COLOR) {\n return val;\n }\n return undefined;\n};\n\nexports.parseAngle = function parseAngle(val) {\n var type = exports.valueType(val);\n if (type === exports.TYPES.NULL_OR_EMPTY_STR) {\n return val;\n }\n if (type !== exports.TYPES.ANGLE) {\n return undefined;\n }\n var res = angleRegEx.exec(val);\n var flt = parseFloat(res[1]);\n if (res[2] === 'rad') {\n flt *= 180 / Math.PI;\n } else if (res[2] === 'grad') {\n flt *= 360 / 400;\n }\n\n while (flt < 0) {\n flt += 360;\n }\n while (flt > 360) {\n flt -= 360;\n }\n return flt + 'deg';\n};\n\nexports.parseKeyword = function parseKeyword(val, valid_keywords) {\n var type = exports.valueType(val);\n if (type === exports.TYPES.NULL_OR_EMPTY_STR) {\n return val;\n }\n if (type !== exports.TYPES.KEYWORD) {\n return undefined;\n }\n val = val.toString().toLowerCase();\n var i;\n for (i = 0; i < valid_keywords.length; i++) {\n if (valid_keywords[i].toLowerCase() === val) {\n return valid_keywords[i];\n }\n }\n return undefined;\n};\n\n// utility to translate from border-width to borderWidth\nvar dashedToCamelCase = function(dashed) {\n var i;\n var camel = '';\n var nextCap = false;\n for (i = 0; i < dashed.length; i++) {\n if (dashed[i] !== '-') {\n camel += nextCap ? dashed[i].toUpperCase() : dashed[i];\n nextCap = false;\n } else {\n nextCap = true;\n }\n }\n return camel;\n};\nexports.dashedToCamelCase = dashedToCamelCase;\n\nvar is_space = /\\s/;\nvar opening_deliminators = ['\"', \"'\", '('];\nvar closing_deliminators = ['\"', \"'\", ')'];\n// this splits on whitespace, but keeps quoted and parened parts together\nvar getParts = function(str) {\n var deliminator_stack = [];\n var length = str.length;\n var i;\n var parts = [];\n var current_part = '';\n var opening_index;\n var closing_index;\n for (i = 0; i < length; i++) {\n opening_index = opening_deliminators.indexOf(str[i]);\n closing_index = closing_deliminators.indexOf(str[i]);\n if (is_space.test(str[i])) {\n if (deliminator_stack.length === 0) {\n if (current_part !== '') {\n parts.push(current_part);\n }\n current_part = '';\n } else {\n current_part += str[i];\n }\n } else {\n if (str[i] === '\\\\') {\n i++;\n current_part += str[i];\n } else {\n current_part += str[i];\n if (\n closing_index !== -1 &&\n closing_index === deliminator_stack[deliminator_stack.length - 1]\n ) {\n deliminator_stack.pop();\n } else if (opening_index !== -1) {\n deliminator_stack.push(opening_index);\n }\n }\n }\n }\n if (current_part !== '') {\n parts.push(current_part);\n }\n return parts;\n};\n\n/*\n * this either returns undefined meaning that it isn't valid\n * or returns an object where the keys are dashed short\n * hand properties and the values are the values to set\n * on them\n */\nexports.shorthandParser = function parse(v, shorthand_for) {\n var obj = {};\n var type = exports.valueType(v);\n if (type === exports.TYPES.NULL_OR_EMPTY_STR) {\n Object.keys(shorthand_for).forEach(function(property) {\n obj[property] = '';\n });\n return obj;\n }\n\n if (typeof v === 'number') {\n v = v.toString();\n }\n\n if (typeof v !== 'string') {\n return undefined;\n }\n\n if (v.toLowerCase() === 'inherit') {\n return {};\n }\n var parts = getParts(v);\n var valid = true;\n parts.forEach(function(part, i) {\n var part_valid = false;\n Object.keys(shorthand_for).forEach(function(property) {\n if (shorthand_for[property].isValid(part, i)) {\n part_valid = true;\n obj[property] = part;\n }\n });\n valid = valid && part_valid;\n });\n if (!valid) {\n return undefined;\n }\n return obj;\n};\n\nexports.shorthandSetter = function(property, shorthand_for) {\n return function(v) {\n var obj = exports.shorthandParser(v, shorthand_for);\n if (obj === undefined) {\n return;\n }\n //console.log('shorthandSetter for:', property, 'obj:', obj);\n Object.keys(obj).forEach(function(subprop) {\n // in case subprop is an implicit property, this will clear\n // *its* subpropertiesX\n var camel = dashedToCamelCase(subprop);\n this[camel] = obj[subprop];\n // in case it gets translated into something else (0 -> 0px)\n obj[subprop] = this[camel];\n this.removeProperty(subprop);\n // don't add in empty properties\n if (obj[subprop] !== '') {\n this._values[subprop] = obj[subprop];\n }\n }, this);\n Object.keys(shorthand_for).forEach(function(subprop) {\n if (!obj.hasOwnProperty(subprop)) {\n this.removeProperty(subprop);\n delete this._values[subprop];\n }\n }, this);\n // in case the value is something like 'none' that removes all values,\n // check that the generated one is not empty, first remove the property\n // if it already exists, then call the shorthandGetter, if it's an empty\n // string, don't set the property\n this.removeProperty(property);\n var calculated = exports.shorthandGetter(property, shorthand_for).call(this);\n if (calculated !== '') {\n this._setProperty(property, calculated);\n }\n };\n};\n\nexports.shorthandGetter = function(property, shorthand_for) {\n return function() {\n if (this._values[property] !== undefined) {\n return this.getPropertyValue(property);\n }\n return Object.keys(shorthand_for)\n .map(function(subprop) {\n return this.getPropertyValue(subprop);\n }, this)\n .filter(function(value) {\n return value !== '';\n })\n .join(' ');\n };\n};\n\n// isValid(){1,4} | inherit\n// if one, it applies to all\n// if two, the first applies to the top and bottom, and the second to left and right\n// if three, the first applies to the top, the second to left and right, the third bottom\n// if four, top, right, bottom, left\nexports.implicitSetter = function(property_before, property_after, isValid, parser) {\n property_after = property_after || '';\n if (property_after !== '') {\n property_after = '-' + property_after;\n }\n var part_names = ['top', 'right', 'bottom', 'left'];\n\n return function(v) {\n if (typeof v === 'number') {\n v = v.toString();\n }\n if (typeof v !== 'string') {\n return undefined;\n }\n var parts;\n if (v.toLowerCase() === 'inherit' || v === '') {\n parts = [v];\n } else {\n parts = getParts(v);\n }\n if (parts.length < 1 || parts.length > 4) {\n return undefined;\n }\n\n if (!parts.every(isValid)) {\n return undefined;\n }\n\n parts = parts.map(function(part) {\n return parser(part);\n });\n this._setProperty(property_before + property_after, parts.join(' '));\n if (parts.length === 1) {\n parts[1] = parts[0];\n }\n if (parts.length === 2) {\n parts[2] = parts[0];\n }\n if (parts.length === 3) {\n parts[3] = parts[1];\n }\n\n for (var i = 0; i < 4; i++) {\n var property = property_before + '-' + part_names[i] + property_after;\n this.removeProperty(property);\n if (parts[i] !== '') {\n this._values[property] = parts[i];\n }\n }\n return v;\n };\n};\n\n//\n// Companion to implicitSetter, but for the individual parts.\n// This sets the individual value, and checks to see if all four\n// sub-parts are set. If so, it sets the shorthand version and removes\n// the individual parts from the cssText.\n//\nexports.subImplicitSetter = function(prefix, part, isValid, parser) {\n var property = prefix + '-' + part;\n var subparts = [prefix + '-top', prefix + '-right', prefix + '-bottom', prefix + '-left'];\n\n return function(v) {\n if (typeof v === 'number') {\n v = v.toString();\n }\n if (typeof v !== 'string') {\n return undefined;\n }\n if (!isValid(v)) {\n return undefined;\n }\n v = parser(v);\n this._setProperty(property, v);\n var parts = [];\n for (var i = 0; i < 4; i++) {\n if (this._values[subparts[i]] == null || this._values[subparts[i]] === '') {\n break;\n }\n parts.push(this._values[subparts[i]]);\n }\n if (parts.length === 4) {\n for (i = 0; i < 4; i++) {\n this.removeProperty(subparts[i]);\n this._values[subparts[i]] = parts[i];\n }\n this._setProperty(prefix, parts.join(' '));\n }\n return v;\n };\n};\n\nvar camel_to_dashed = /[A-Z]/g;\nvar first_segment = /^\\([^-]\\)-/;\nvar vendor_prefixes = ['o', 'moz', 'ms', 'webkit'];\nexports.camelToDashed = function(camel_case) {\n var match;\n var dashed = camel_case.replace(camel_to_dashed, '-$&').toLowerCase();\n match = dashed.match(first_segment);\n if (match && vendor_prefixes.indexOf(match[1]) !== -1) {\n dashed = '-' + dashed;\n }\n return dashed;\n};\n","'use strict';\n\n// autogenerated - 4/29/2020\n\n/*\n *\n * https://www.w3.org/Style/CSS/all-properties.en.html\n */\n\nvar external_dependency_parsers_0 = require(\"./parsers.js\");\n\nvar external_dependency_constants_1 = require(\"./constants.js\");\n\nvar azimuth_export_definition;\nazimuth_export_definition = {\n set: function (v) {\n var valueType = external_dependency_parsers_0.valueType(v);\n\n if (valueType === external_dependency_parsers_0.TYPES.ANGLE) {\n return this._setProperty('azimuth', external_dependency_parsers_0.parseAngle(v));\n }\n\n if (valueType === external_dependency_parsers_0.TYPES.KEYWORD) {\n var keywords = v.toLowerCase().trim().split(/\\s+/);\n var hasBehind = false;\n\n if (keywords.length > 2) {\n return;\n }\n\n var behindIndex = keywords.indexOf('behind');\n hasBehind = behindIndex !== -1;\n\n if (keywords.length === 2) {\n if (!hasBehind) {\n return;\n }\n\n keywords.splice(behindIndex, 1);\n }\n\n if (keywords[0] === 'leftwards' || keywords[0] === 'rightwards') {\n if (hasBehind) {\n return;\n }\n\n return this._setProperty('azimuth', keywords[0]);\n }\n\n if (keywords[0] === 'behind') {\n return this._setProperty('azimuth', '180deg');\n }\n\n switch (keywords[0]) {\n case 'left-side':\n return this._setProperty('azimuth', '270deg');\n\n case 'far-left':\n return this._setProperty('azimuth', (hasBehind ? 240 : 300) + 'deg');\n\n case 'left':\n return this._setProperty('azimuth', (hasBehind ? 220 : 320) + 'deg');\n\n case 'center-left':\n return this._setProperty('azimuth', (hasBehind ? 200 : 340) + 'deg');\n\n case 'center':\n return this._setProperty('azimuth', (hasBehind ? 180 : 0) + 'deg');\n\n case 'center-right':\n return this._setProperty('azimuth', (hasBehind ? 160 : 20) + 'deg');\n\n case 'right':\n return this._setProperty('azimuth', (hasBehind ? 140 : 40) + 'deg');\n\n case 'far-right':\n return this._setProperty('azimuth', (hasBehind ? 120 : 60) + 'deg');\n\n case 'right-side':\n return this._setProperty('azimuth', '90deg');\n\n default:\n return;\n }\n }\n },\n get: function () {\n return this.getPropertyValue('azimuth');\n },\n enumerable: true,\n configurable: true\n};\nvar backgroundColor_export_isValid, backgroundColor_export_definition;\n\nvar backgroundColor_local_var_parse = function parse(v) {\n var parsed = external_dependency_parsers_0.parseColor(v);\n\n if (parsed !== undefined) {\n return parsed;\n }\n\n if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'transparent' || v.toLowerCase() === 'inherit')) {\n return v;\n }\n\n return undefined;\n};\n\nbackgroundColor_export_isValid = function isValid(v) {\n return backgroundColor_local_var_parse(v) !== undefined;\n};\n\nbackgroundColor_export_definition = {\n set: function (v) {\n var parsed = backgroundColor_local_var_parse(v);\n\n if (parsed === undefined) {\n return;\n }\n\n this._setProperty('background-color', parsed);\n },\n get: function () {\n return this.getPropertyValue('background-color');\n },\n enumerable: true,\n configurable: true\n};\nvar backgroundImage_export_isValid, backgroundImage_export_definition;\n\nvar backgroundImage_local_var_parse = function parse(v) {\n var parsed = external_dependency_parsers_0.parseUrl(v);\n\n if (parsed !== undefined) {\n return parsed;\n }\n\n if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'none' || v.toLowerCase() === 'inherit')) {\n return v;\n }\n\n return undefined;\n};\n\nbackgroundImage_export_isValid = function isValid(v) {\n return backgroundImage_local_var_parse(v) !== undefined;\n};\n\nbackgroundImage_export_definition = {\n set: function (v) {\n this._setProperty('background-image', backgroundImage_local_var_parse(v));\n },\n get: function () {\n return this.getPropertyValue('background-image');\n },\n enumerable: true,\n configurable: true\n};\nvar backgroundRepeat_export_isValid, backgroundRepeat_export_definition;\n\nvar backgroundRepeat_local_var_parse = function parse(v) {\n if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'repeat' || v.toLowerCase() === 'repeat-x' || v.toLowerCase() === 'repeat-y' || v.toLowerCase() === 'no-repeat' || v.toLowerCase() === 'inherit')) {\n return v;\n }\n\n return undefined;\n};\n\nbackgroundRepeat_export_isValid = function isValid(v) {\n return backgroundRepeat_local_var_parse(v) !== undefined;\n};\n\nbackgroundRepeat_export_definition = {\n set: function (v) {\n this._setProperty('background-repeat', backgroundRepeat_local_var_parse(v));\n },\n get: function () {\n return this.getPropertyValue('background-repeat');\n },\n enumerable: true,\n configurable: true\n};\nvar backgroundAttachment_export_isValid, backgroundAttachment_export_definition;\n\nvar backgroundAttachment_local_var_isValid = backgroundAttachment_export_isValid = function isValid(v) {\n return external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'scroll' || v.toLowerCase() === 'fixed' || v.toLowerCase() === 'inherit');\n};\n\nbackgroundAttachment_export_definition = {\n set: function (v) {\n if (!backgroundAttachment_local_var_isValid(v)) {\n return;\n }\n\n this._setProperty('background-attachment', v);\n },\n get: function () {\n return this.getPropertyValue('background-attachment');\n },\n enumerable: true,\n configurable: true\n};\nvar backgroundPosition_export_isValid, backgroundPosition_export_definition;\nvar backgroundPosition_local_var_valid_keywords = ['top', 'center', 'bottom', 'left', 'right'];\n\nvar backgroundPosition_local_var_parse = function parse(v) {\n if (v === '' || v === null) {\n return undefined;\n }\n\n var parts = v.split(/\\s+/);\n\n if (parts.length > 2 || parts.length < 1) {\n return undefined;\n }\n\n var types = [];\n parts.forEach(function (part, index) {\n types[index] = external_dependency_parsers_0.valueType(part);\n });\n\n if (parts.length === 1) {\n if (types[0] === external_dependency_parsers_0.TYPES.LENGTH || types[0] === external_dependency_parsers_0.TYPES.PERCENT) {\n return v;\n }\n\n if (types[0] === external_dependency_parsers_0.TYPES.KEYWORD) {\n if (backgroundPosition_local_var_valid_keywords.indexOf(v.toLowerCase()) !== -1 || v.toLowerCase() === 'inherit') {\n return v;\n }\n }\n\n return undefined;\n }\n\n if ((types[0] === external_dependency_parsers_0.TYPES.LENGTH || types[0] === external_dependency_parsers_0.TYPES.PERCENT) && (types[1] === external_dependency_parsers_0.TYPES.LENGTH || types[1] === external_dependency_parsers_0.TYPES.PERCENT)) {\n return v;\n }\n\n if (types[0] !== external_dependency_parsers_0.TYPES.KEYWORD || types[1] !== external_dependency_parsers_0.TYPES.KEYWORD) {\n return undefined;\n }\n\n if (backgroundPosition_local_var_valid_keywords.indexOf(parts[0]) !== -1 && backgroundPosition_local_var_valid_keywords.indexOf(parts[1]) !== -1) {\n return v;\n }\n\n return undefined;\n};\n\nbackgroundPosition_export_isValid = function isValid(v) {\n return backgroundPosition_local_var_parse(v) !== undefined;\n};\n\nbackgroundPosition_export_definition = {\n set: function (v) {\n this._setProperty('background-position', backgroundPosition_local_var_parse(v));\n },\n get: function () {\n return this.getPropertyValue('background-position');\n },\n enumerable: true,\n configurable: true\n};\nvar background_export_definition;\nvar background_local_var_shorthand_for = {\n 'background-color': {\n isValid: backgroundColor_export_isValid,\n definition: backgroundColor_export_definition\n },\n 'background-image': {\n isValid: backgroundImage_export_isValid,\n definition: backgroundImage_export_definition\n },\n 'background-repeat': {\n isValid: backgroundRepeat_export_isValid,\n definition: backgroundRepeat_export_definition\n },\n 'background-attachment': {\n isValid: backgroundAttachment_export_isValid,\n definition: backgroundAttachment_export_definition\n },\n 'background-position': {\n isValid: backgroundPosition_export_isValid,\n definition: backgroundPosition_export_definition\n }\n};\nbackground_export_definition = {\n set: external_dependency_parsers_0.shorthandSetter('background', background_local_var_shorthand_for),\n get: external_dependency_parsers_0.shorthandGetter('background', background_local_var_shorthand_for),\n enumerable: true,\n configurable: true\n};\nvar borderWidth_export_isValid, borderWidth_export_definition;\n// the valid border-widths:\nvar borderWidth_local_var_widths = ['thin', 'medium', 'thick'];\n\nborderWidth_export_isValid = function parse(v) {\n var length = external_dependency_parsers_0.parseLength(v);\n\n if (length !== undefined) {\n return true;\n }\n\n if (typeof v !== 'string') {\n return false;\n }\n\n if (v === '') {\n return true;\n }\n\n v = v.toLowerCase();\n\n if (borderWidth_local_var_widths.indexOf(v) === -1) {\n return false;\n }\n\n return true;\n};\n\nvar borderWidth_local_var_isValid = borderWidth_export_isValid;\n\nvar borderWidth_local_var_parser = function (v) {\n var length = external_dependency_parsers_0.parseLength(v);\n\n if (length !== undefined) {\n return length;\n }\n\n if (borderWidth_local_var_isValid(v)) {\n return v.toLowerCase();\n }\n\n return undefined;\n};\n\nborderWidth_export_definition = {\n set: external_dependency_parsers_0.implicitSetter('border', 'width', borderWidth_local_var_isValid, borderWidth_local_var_parser),\n get: function () {\n return this.getPropertyValue('border-width');\n },\n enumerable: true,\n configurable: true\n};\nvar borderStyle_export_isValid, borderStyle_export_definition;\n// the valid border-styles:\nvar borderStyle_local_var_styles = ['none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset'];\n\nborderStyle_export_isValid = function parse(v) {\n return typeof v === 'string' && (v === '' || borderStyle_local_var_styles.indexOf(v) !== -1);\n};\n\nvar borderStyle_local_var_isValid = borderStyle_export_isValid;\n\nvar borderStyle_local_var_parser = function (v) {\n if (borderStyle_local_var_isValid(v)) {\n return v.toLowerCase();\n }\n\n return undefined;\n};\n\nborderStyle_export_definition = {\n set: external_dependency_parsers_0.implicitSetter('border', 'style', borderStyle_local_var_isValid, borderStyle_local_var_parser),\n get: function () {\n return this.getPropertyValue('border-style');\n },\n enumerable: true,\n configurable: true\n};\nvar borderColor_export_isValid, borderColor_export_definition;\n\nborderColor_export_isValid = function parse(v) {\n if (typeof v !== 'string') {\n return false;\n }\n\n return v === '' || v.toLowerCase() === 'transparent' || external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.COLOR;\n};\n\nvar borderColor_local_var_isValid = borderColor_export_isValid;\n\nvar borderColor_local_var_parser = function (v) {\n if (borderColor_local_var_isValid(v)) {\n return v.toLowerCase();\n }\n\n return undefined;\n};\n\nborderColor_export_definition = {\n set: external_dependency_parsers_0.implicitSetter('border', 'color', borderColor_local_var_isValid, borderColor_local_var_parser),\n get: function () {\n return this.getPropertyValue('border-color');\n },\n enumerable: true,\n configurable: true\n};\nvar border_export_definition;\nvar border_local_var_shorthand_for = {\n 'border-width': {\n isValid: borderWidth_export_isValid,\n definition: borderWidth_export_definition\n },\n 'border-style': {\n isValid: borderStyle_export_isValid,\n definition: borderStyle_export_definition\n },\n 'border-color': {\n isValid: borderColor_export_isValid,\n definition: borderColor_export_definition\n }\n};\nvar border_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('border', border_local_var_shorthand_for);\nvar border_local_var_myShorthandGetter = external_dependency_parsers_0.shorthandGetter('border', border_local_var_shorthand_for);\nborder_export_definition = {\n set: function (v) {\n if (v.toString().toLowerCase() === 'none') {\n v = '';\n }\n\n border_local_var_myShorthandSetter.call(this, v);\n this.removeProperty('border-top');\n this.removeProperty('border-left');\n this.removeProperty('border-right');\n this.removeProperty('border-bottom');\n this._values['border-top'] = this._values.border;\n this._values['border-left'] = this._values.border;\n this._values['border-right'] = this._values.border;\n this._values['border-bottom'] = this._values.border;\n },\n get: border_local_var_myShorthandGetter,\n enumerable: true,\n configurable: true\n};\nvar borderBottomWidth_export_isValid, borderBottomWidth_export_definition;\nvar borderBottomWidth_local_var_isValid = borderBottomWidth_export_isValid = borderWidth_export_isValid;\nborderBottomWidth_export_definition = {\n set: function (v) {\n if (borderBottomWidth_local_var_isValid(v)) {\n this._setProperty('border-bottom-width', v);\n }\n },\n get: function () {\n return this.getPropertyValue('border-bottom-width');\n },\n enumerable: true,\n configurable: true\n};\nvar borderBottomStyle_export_isValid, borderBottomStyle_export_definition;\nborderBottomStyle_export_isValid = borderStyle_export_isValid;\nborderBottomStyle_export_definition = {\n set: function (v) {\n if (borderStyle_export_isValid(v)) {\n if (v.toLowerCase() === 'none') {\n v = '';\n this.removeProperty('border-bottom-width');\n }\n\n this._setProperty('border-bottom-style', v);\n }\n },\n get: function () {\n return this.getPropertyValue('border-bottom-style');\n },\n enumerable: true,\n configurable: true\n};\nvar borderBottomColor_export_isValid, borderBottomColor_export_definition;\nvar borderBottomColor_local_var_isValid = borderBottomColor_export_isValid = borderColor_export_isValid;\nborderBottomColor_export_definition = {\n set: function (v) {\n if (borderBottomColor_local_var_isValid(v)) {\n this._setProperty('border-bottom-color', v);\n }\n },\n get: function () {\n return this.getPropertyValue('border-bottom-color');\n },\n enumerable: true,\n configurable: true\n};\nvar borderBottom_export_definition;\nvar borderBottom_local_var_shorthand_for = {\n 'border-bottom-width': {\n isValid: borderBottomWidth_export_isValid,\n definition: borderBottomWidth_export_definition\n },\n 'border-bottom-style': {\n isValid: borderBottomStyle_export_isValid,\n definition: borderBottomStyle_export_definition\n },\n 'border-bottom-color': {\n isValid: borderBottomColor_export_isValid,\n definition: borderBottomColor_export_definition\n }\n};\nborderBottom_export_definition = {\n set: external_dependency_parsers_0.shorthandSetter('border-bottom', borderBottom_local_var_shorthand_for),\n get: external_dependency_parsers_0.shorthandGetter('border-bottom', borderBottom_local_var_shorthand_for),\n enumerable: true,\n configurable: true\n};\nvar borderCollapse_export_definition;\n\nvar borderCollapse_local_var_parse = function parse(v) {\n if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'collapse' || v.toLowerCase() === 'separate' || v.toLowerCase() === 'inherit')) {\n return v;\n }\n\n return undefined;\n};\n\nborderCollapse_export_definition = {\n set: function (v) {\n this._setProperty('border-collapse', borderCollapse_local_var_parse(v));\n },\n get: function () {\n return this.getPropertyValue('border-collapse');\n },\n enumerable: true,\n configurable: true\n};\nvar borderLeftWidth_export_isValid, borderLeftWidth_export_definition;\nvar borderLeftWidth_local_var_isValid = borderLeftWidth_export_isValid = borderWidth_export_isValid;\nborderLeftWidth_export_definition = {\n set: function (v) {\n if (borderLeftWidth_local_var_isValid(v)) {\n this._setProperty('border-left-width', v);\n }\n },\n get: function () {\n return this.getPropertyValue('border-left-width');\n },\n enumerable: true,\n configurable: true\n};\nvar borderLeftStyle_export_isValid, borderLeftStyle_export_definition;\nborderLeftStyle_export_isValid = borderStyle_export_isValid;\nborderLeftStyle_export_definition = {\n set: function (v) {\n if (borderStyle_export_isValid(v)) {\n if (v.toLowerCase() === 'none') {\n v = '';\n this.removeProperty('border-left-width');\n }\n\n this._setProperty('border-left-style', v);\n }\n },\n get: function () {\n return this.getPropertyValue('border-left-style');\n },\n enumerable: true,\n configurable: true\n};\nvar borderLeftColor_export_isValid, borderLeftColor_export_definition;\nvar borderLeftColor_local_var_isValid = borderLeftColor_export_isValid = borderColor_export_isValid;\nborderLeftColor_export_definition = {\n set: function (v) {\n if (borderLeftColor_local_var_isValid(v)) {\n this._setProperty('border-left-color', v);\n }\n },\n get: function () {\n return this.getPropertyValue('border-left-color');\n },\n enumerable: true,\n configurable: true\n};\nvar borderLeft_export_definition;\nvar borderLeft_local_var_shorthand_for = {\n 'border-left-width': {\n isValid: borderLeftWidth_export_isValid,\n definition: borderLeftWidth_export_definition\n },\n 'border-left-style': {\n isValid: borderLeftStyle_export_isValid,\n definition: borderLeftStyle_export_definition\n },\n 'border-left-color': {\n isValid: borderLeftColor_export_isValid,\n definition: borderLeftColor_export_definition\n }\n};\nborderLeft_export_definition = {\n set: external_dependency_parsers_0.shorthandSetter('border-left', borderLeft_local_var_shorthand_for),\n get: external_dependency_parsers_0.shorthandGetter('border-left', borderLeft_local_var_shorthand_for),\n enumerable: true,\n configurable: true\n};\nvar borderRightWidth_export_isValid, borderRightWidth_export_definition;\nvar borderRightWidth_local_var_isValid = borderRightWidth_export_isValid = borderWidth_export_isValid;\nborderRightWidth_export_definition = {\n set: function (v) {\n if (borderRightWidth_local_var_isValid(v)) {\n this._setProperty('border-right-width', v);\n }\n },\n get: function () {\n return this.getPropertyValue('border-right-width');\n },\n enumerable: true,\n configurable: true\n};\nvar borderRightStyle_export_isValid, borderRightStyle_export_definition;\nborderRightStyle_export_isValid = borderStyle_export_isValid;\nborderRightStyle_export_definition = {\n set: function (v) {\n if (borderStyle_export_isValid(v)) {\n if (v.toLowerCase() === 'none') {\n v = '';\n this.removeProperty('border-right-width');\n }\n\n this._setProperty('border-right-style', v);\n }\n },\n get: function () {\n return this.getPropertyValue('border-right-style');\n },\n enumerable: true,\n configurable: true\n};\nvar borderRightColor_export_isValid, borderRightColor_export_definition;\nvar borderRightColor_local_var_isValid = borderRightColor_export_isValid = borderColor_export_isValid;\nborderRightColor_export_definition = {\n set: function (v) {\n if (borderRightColor_local_var_isValid(v)) {\n this._setProperty('border-right-color', v);\n }\n },\n get: function () {\n return this.getPropertyValue('border-right-color');\n },\n enumerable: true,\n configurable: true\n};\nvar borderRight_export_definition;\nvar borderRight_local_var_shorthand_for = {\n 'border-right-width': {\n isValid: borderRightWidth_export_isValid,\n definition: borderRightWidth_export_definition\n },\n 'border-right-style': {\n isValid: borderRightStyle_export_isValid,\n definition: borderRightStyle_export_definition\n },\n 'border-right-color': {\n isValid: borderRightColor_export_isValid,\n definition: borderRightColor_export_definition\n }\n};\nborderRight_export_definition = {\n set: external_dependency_parsers_0.shorthandSetter('border-right', borderRight_local_var_shorthand_for),\n get: external_dependency_parsers_0.shorthandGetter('border-right', borderRight_local_var_shorthand_for),\n enumerable: true,\n configurable: true\n};\nvar borderSpacing_export_definition;\n\n// ? | inherit\n// if one, it applies to both horizontal and verical spacing\n// if two, the first applies to the horizontal and the second applies to vertical spacing\nvar borderSpacing_local_var_parse = function parse(v) {\n if (v === '' || v === null) {\n return undefined;\n }\n\n if (v === 0) {\n return '0px';\n }\n\n if (v.toLowerCase() === 'inherit') {\n return v;\n }\n\n var parts = v.split(/\\s+/);\n\n if (parts.length !== 1 && parts.length !== 2) {\n return undefined;\n }\n\n parts.forEach(function (part) {\n if (external_dependency_parsers_0.valueType(part) !== external_dependency_parsers_0.TYPES.LENGTH) {\n return undefined;\n }\n });\n return v;\n};\n\nborderSpacing_export_definition = {\n set: function (v) {\n this._setProperty('border-spacing', borderSpacing_local_var_parse(v));\n },\n get: function () {\n return this.getPropertyValue('border-spacing');\n },\n enumerable: true,\n configurable: true\n};\nvar borderTopWidth_export_isValid, borderTopWidth_export_definition;\nborderTopWidth_export_isValid = borderWidth_export_isValid;\nborderTopWidth_export_definition = {\n set: function (v) {\n if (borderWidth_export_isValid(v)) {\n this._setProperty('border-top-width', v);\n }\n },\n get: function () {\n return this.getPropertyValue('border-top-width');\n },\n enumerable: true,\n configurable: true\n};\nvar borderTopStyle_export_isValid, borderTopStyle_export_definition;\nborderTopStyle_export_isValid = borderStyle_export_isValid;\nborderTopStyle_export_definition = {\n set: function (v) {\n if (borderStyle_export_isValid(v)) {\n if (v.toLowerCase() === 'none') {\n v = '';\n this.removeProperty('border-top-width');\n }\n\n this._setProperty('border-top-style', v);\n }\n },\n get: function () {\n return this.getPropertyValue('border-top-style');\n },\n enumerable: true,\n configurable: true\n};\nvar borderTopColor_export_isValid, borderTopColor_export_definition;\nvar borderTopColor_local_var_isValid = borderTopColor_export_isValid = borderColor_export_isValid;\nborderTopColor_export_definition = {\n set: function (v) {\n if (borderTopColor_local_var_isValid(v)) {\n this._setProperty('border-top-color', v);\n }\n },\n get: function () {\n return this.getPropertyValue('border-top-color');\n },\n enumerable: true,\n configurable: true\n};\nvar borderTop_export_definition;\nvar borderTop_local_var_shorthand_for = {\n 'border-top-width': {\n isValid: borderTopWidth_export_isValid,\n definition: borderTopWidth_export_definition\n },\n 'border-top-style': {\n isValid: borderTopStyle_export_isValid,\n definition: borderTopStyle_export_definition\n },\n 'border-top-color': {\n isValid: borderTopColor_export_isValid,\n definition: borderTopColor_export_definition\n }\n};\nborderTop_export_definition = {\n set: external_dependency_parsers_0.shorthandSetter('border-top', borderTop_local_var_shorthand_for),\n get: external_dependency_parsers_0.shorthandGetter('border-top', borderTop_local_var_shorthand_for),\n enumerable: true,\n configurable: true\n};\nvar bottom_export_definition;\nbottom_export_definition = {\n set: function (v) {\n this._setProperty('bottom', external_dependency_parsers_0.parseMeasurement(v));\n },\n get: function () {\n return this.getPropertyValue('bottom');\n },\n enumerable: true,\n configurable: true\n};\nvar clear_export_definition;\nvar clear_local_var_clear_keywords = ['none', 'left', 'right', 'both', 'inherit'];\nclear_export_definition = {\n set: function (v) {\n this._setProperty('clear', external_dependency_parsers_0.parseKeyword(v, clear_local_var_clear_keywords));\n },\n get: function () {\n return this.getPropertyValue('clear');\n },\n enumerable: true,\n configurable: true\n};\nvar clip_export_definition;\nvar clip_local_var_shape_regex = /^rect\\((.*)\\)$/i;\n\nvar clip_local_var_parse = function (val) {\n if (val === '' || val === null) {\n return val;\n }\n\n if (typeof val !== 'string') {\n return undefined;\n }\n\n val = val.toLowerCase();\n\n if (val === 'auto' || val === 'inherit') {\n return val;\n }\n\n var matches = val.match(clip_local_var_shape_regex);\n\n if (!matches) {\n return undefined;\n }\n\n var parts = matches[1].split(/\\s*,\\s*/);\n\n if (parts.length !== 4) {\n return undefined;\n }\n\n var valid = parts.every(function (part, index) {\n var measurement = external_dependency_parsers_0.parseMeasurement(part);\n parts[index] = measurement;\n return measurement !== undefined;\n });\n\n if (!valid) {\n return undefined;\n }\n\n parts = parts.join(', ');\n return val.replace(matches[1], parts);\n};\n\nclip_export_definition = {\n set: function (v) {\n this._setProperty('clip', clip_local_var_parse(v));\n },\n get: function () {\n return this.getPropertyValue('clip');\n },\n enumerable: true,\n configurable: true\n};\nvar color_export_definition;\ncolor_export_definition = {\n set: function (v) {\n this._setProperty('color', external_dependency_parsers_0.parseColor(v));\n },\n get: function () {\n return this.getPropertyValue('color');\n },\n enumerable: true,\n configurable: true\n};\nvar cssFloat_export_definition;\ncssFloat_export_definition = {\n set: function (v) {\n this._setProperty('float', v);\n },\n get: function () {\n return this.getPropertyValue('float');\n },\n enumerable: true,\n configurable: true\n};\nvar flexGrow_export_isValid, flexGrow_export_definition;\n\nflexGrow_export_isValid = function isValid(v, positionAtFlexShorthand) {\n return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.first;\n};\n\nflexGrow_export_definition = {\n set: function (v) {\n this._setProperty('flex-grow', external_dependency_parsers_0.parseNumber(v));\n },\n get: function () {\n return this.getPropertyValue('flex-grow');\n },\n enumerable: true,\n configurable: true\n};\nvar flexShrink_export_isValid, flexShrink_export_definition;\n\nflexShrink_export_isValid = function isValid(v, positionAtFlexShorthand) {\n return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.second;\n};\n\nflexShrink_export_definition = {\n set: function (v) {\n this._setProperty('flex-shrink', external_dependency_parsers_0.parseNumber(v));\n },\n get: function () {\n return this.getPropertyValue('flex-shrink');\n },\n enumerable: true,\n configurable: true\n};\nvar flexBasis_export_isValid, flexBasis_export_definition;\n\nfunction flexBasis_local_fn_parse(v) {\n if (String(v).toLowerCase() === 'auto') {\n return 'auto';\n }\n\n if (String(v).toLowerCase() === 'inherit') {\n return 'inherit';\n }\n\n return external_dependency_parsers_0.parseMeasurement(v);\n}\n\nflexBasis_export_isValid = function isValid(v) {\n return flexBasis_local_fn_parse(v) !== undefined;\n};\n\nflexBasis_export_definition = {\n set: function (v) {\n this._setProperty('flex-basis', flexBasis_local_fn_parse(v));\n },\n get: function () {\n return this.getPropertyValue('flex-basis');\n },\n enumerable: true,\n configurable: true\n};\nvar flex_export_isValid, flex_export_definition;\nvar flex_local_var_shorthand_for = {\n 'flex-grow': {\n isValid: flexGrow_export_isValid,\n definition: flexGrow_export_definition\n },\n 'flex-shrink': {\n isValid: flexShrink_export_isValid,\n definition: flexShrink_export_definition\n },\n 'flex-basis': {\n isValid: flexBasis_export_isValid,\n definition: flexBasis_export_definition\n }\n};\nvar flex_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('flex', flex_local_var_shorthand_for);\n\nflex_export_isValid = function isValid(v) {\n return external_dependency_parsers_0.shorthandParser(v, flex_local_var_shorthand_for) !== undefined;\n};\n\nflex_export_definition = {\n set: function (v) {\n var normalizedValue = String(v).trim().toLowerCase();\n\n if (normalizedValue === 'none') {\n flex_local_var_myShorthandSetter.call(this, '0 0 auto');\n return;\n }\n\n if (normalizedValue === 'initial') {\n flex_local_var_myShorthandSetter.call(this, '0 1 auto');\n return;\n }\n\n if (normalizedValue === 'auto') {\n this.removeProperty('flex-grow');\n this.removeProperty('flex-shrink');\n this.setProperty('flex-basis', normalizedValue);\n return;\n }\n\n flex_local_var_myShorthandSetter.call(this, v);\n },\n get: external_dependency_parsers_0.shorthandGetter('flex', flex_local_var_shorthand_for),\n enumerable: true,\n configurable: true\n};\nvar float_export_definition;\nfloat_export_definition = {\n set: function (v) {\n this._setProperty('float', v);\n },\n get: function () {\n return this.getPropertyValue('float');\n },\n enumerable: true,\n configurable: true\n};\nvar floodColor_export_definition;\nfloodColor_export_definition = {\n set: function (v) {\n this._setProperty('flood-color', external_dependency_parsers_0.parseColor(v));\n },\n get: function () {\n return this.getPropertyValue('flood-color');\n },\n enumerable: true,\n configurable: true\n};\nvar fontFamily_export_isValid, fontFamily_export_definition;\nvar fontFamily_local_var_partsRegEx = /\\s*,\\s*/;\n\nfontFamily_export_isValid = function isValid(v) {\n if (v === '' || v === null) {\n return true;\n }\n\n var parts = v.split(fontFamily_local_var_partsRegEx);\n var len = parts.length;\n var i;\n var type;\n\n for (i = 0; i < len; i++) {\n type = external_dependency_parsers_0.valueType(parts[i]);\n\n if (type === external_dependency_parsers_0.TYPES.STRING || type === external_dependency_parsers_0.TYPES.KEYWORD) {\n return true;\n }\n }\n\n return false;\n};\n\nfontFamily_export_definition = {\n set: function (v) {\n this._setProperty('font-family', v);\n },\n get: function () {\n return this.getPropertyValue('font-family');\n },\n enumerable: true,\n configurable: true\n};\nvar fontSize_export_isValid, fontSize_export_definition;\nvar fontSize_local_var_absoluteSizes = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];\nvar fontSize_local_var_relativeSizes = ['larger', 'smaller'];\n\nfontSize_export_isValid = function (v) {\n var type = external_dependency_parsers_0.valueType(v.toLowerCase());\n return type === external_dependency_parsers_0.TYPES.LENGTH || type === external_dependency_parsers_0.TYPES.PERCENT || type === external_dependency_parsers_0.TYPES.KEYWORD && fontSize_local_var_absoluteSizes.indexOf(v.toLowerCase()) !== -1 || type === external_dependency_parsers_0.TYPES.KEYWORD && fontSize_local_var_relativeSizes.indexOf(v.toLowerCase()) !== -1;\n};\n\nfunction fontSize_local_fn_parse(v) {\n const valueAsString = String(v).toLowerCase();\n const optionalArguments = fontSize_local_var_absoluteSizes.concat(fontSize_local_var_relativeSizes);\n const isOptionalArgument = optionalArguments.some(stringValue => stringValue.toLowerCase() === valueAsString);\n return isOptionalArgument ? valueAsString : external_dependency_parsers_0.parseMeasurement(v);\n}\n\nfontSize_export_definition = {\n set: function (v) {\n this._setProperty('font-size', fontSize_local_fn_parse(v));\n },\n get: function () {\n return this.getPropertyValue('font-size');\n },\n enumerable: true,\n configurable: true\n};\nvar fontStyle_export_isValid, fontStyle_export_definition;\nvar fontStyle_local_var_valid_styles = ['normal', 'italic', 'oblique', 'inherit'];\n\nfontStyle_export_isValid = function (v) {\n return fontStyle_local_var_valid_styles.indexOf(v.toLowerCase()) !== -1;\n};\n\nfontStyle_export_definition = {\n set: function (v) {\n this._setProperty('font-style', v);\n },\n get: function () {\n return this.getPropertyValue('font-style');\n },\n enumerable: true,\n configurable: true\n};\nvar fontVariant_export_isValid, fontVariant_export_definition;\nvar fontVariant_local_var_valid_variants = ['normal', 'small-caps', 'inherit'];\n\nfontVariant_export_isValid = function isValid(v) {\n return fontVariant_local_var_valid_variants.indexOf(v.toLowerCase()) !== -1;\n};\n\nfontVariant_export_definition = {\n set: function (v) {\n this._setProperty('font-variant', v);\n },\n get: function () {\n return this.getPropertyValue('font-variant');\n },\n enumerable: true,\n configurable: true\n};\nvar fontWeight_export_isValid, fontWeight_export_definition;\nvar fontWeight_local_var_valid_weights = ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900', 'inherit'];\n\nfontWeight_export_isValid = function isValid(v) {\n return fontWeight_local_var_valid_weights.indexOf(v.toLowerCase()) !== -1;\n};\n\nfontWeight_export_definition = {\n set: function (v) {\n this._setProperty('font-weight', v);\n },\n get: function () {\n return this.getPropertyValue('font-weight');\n },\n enumerable: true,\n configurable: true\n};\nvar lineHeight_export_isValid, lineHeight_export_definition;\n\nlineHeight_export_isValid = function isValid(v) {\n var type = external_dependency_parsers_0.valueType(v);\n return type === external_dependency_parsers_0.TYPES.KEYWORD && v.toLowerCase() === 'normal' || v.toLowerCase() === 'inherit' || type === external_dependency_parsers_0.TYPES.NUMBER || type === external_dependency_parsers_0.TYPES.LENGTH || type === external_dependency_parsers_0.TYPES.PERCENT;\n};\n\nlineHeight_export_definition = {\n set: function (v) {\n this._setProperty('line-height', v);\n },\n get: function () {\n return this.getPropertyValue('line-height');\n },\n enumerable: true,\n configurable: true\n};\nvar font_export_definition;\nvar font_local_var_shorthand_for = {\n 'font-family': {\n isValid: fontFamily_export_isValid,\n definition: fontFamily_export_definition\n },\n 'font-size': {\n isValid: fontSize_export_isValid,\n definition: fontSize_export_definition\n },\n 'font-style': {\n isValid: fontStyle_export_isValid,\n definition: fontStyle_export_definition\n },\n 'font-variant': {\n isValid: fontVariant_export_isValid,\n definition: fontVariant_export_definition\n },\n 'font-weight': {\n isValid: fontWeight_export_isValid,\n definition: fontWeight_export_definition\n },\n 'line-height': {\n isValid: lineHeight_export_isValid,\n definition: lineHeight_export_definition\n }\n};\nvar font_local_var_static_fonts = ['caption', 'icon', 'menu', 'message-box', 'small-caption', 'status-bar', 'inherit'];\nvar font_local_var_setter = external_dependency_parsers_0.shorthandSetter('font', font_local_var_shorthand_for);\nfont_export_definition = {\n set: function (v) {\n var short = external_dependency_parsers_0.shorthandParser(v, font_local_var_shorthand_for);\n\n if (short !== undefined) {\n return font_local_var_setter.call(this, v);\n }\n\n if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && font_local_var_static_fonts.indexOf(v.toLowerCase()) !== -1) {\n this._setProperty('font', v);\n }\n },\n get: external_dependency_parsers_0.shorthandGetter('font', font_local_var_shorthand_for),\n enumerable: true,\n configurable: true\n};\nvar height_export_definition;\n\nfunction height_local_fn_parse(v) {\n if (String(v).toLowerCase() === 'auto') {\n return 'auto';\n }\n\n if (String(v).toLowerCase() === 'inherit') {\n return 'inherit';\n }\n\n return external_dependency_parsers_0.parseMeasurement(v);\n}\n\nheight_export_definition = {\n set: function (v) {\n this._setProperty('height', height_local_fn_parse(v));\n },\n get: function () {\n return this.getPropertyValue('height');\n },\n enumerable: true,\n configurable: true\n};\nvar left_export_definition;\nleft_export_definition = {\n set: function (v) {\n this._setProperty('left', external_dependency_parsers_0.parseMeasurement(v));\n },\n get: function () {\n return this.getPropertyValue('left');\n },\n enumerable: true,\n configurable: true\n};\nvar lightingColor_export_definition;\nlightingColor_export_definition = {\n set: function (v) {\n this._setProperty('lighting-color', external_dependency_parsers_0.parseColor(v));\n },\n get: function () {\n return this.getPropertyValue('lighting-color');\n },\n enumerable: true,\n configurable: true\n};\nvar margin_export_definition, margin_export_isValid, margin_export_parser;\nvar margin_local_var_TYPES = external_dependency_parsers_0.TYPES;\n\nvar margin_local_var_isValid = function (v) {\n if (v.toLowerCase() === 'auto') {\n return true;\n }\n\n var type = external_dependency_parsers_0.valueType(v);\n return type === margin_local_var_TYPES.LENGTH || type === margin_local_var_TYPES.PERCENT || type === margin_local_var_TYPES.INTEGER && (v === '0' || v === 0);\n};\n\nvar margin_local_var_parser = function (v) {\n var V = v.toLowerCase();\n\n if (V === 'auto') {\n return V;\n }\n\n return external_dependency_parsers_0.parseMeasurement(v);\n};\n\nvar margin_local_var_mySetter = external_dependency_parsers_0.implicitSetter('margin', '', margin_local_var_isValid, margin_local_var_parser);\nvar margin_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('margin', '', function () {\n return true;\n}, function (v) {\n return v;\n});\nmargin_export_definition = {\n set: function (v) {\n if (typeof v === 'number') {\n v = String(v);\n }\n\n if (typeof v !== 'string') {\n return;\n }\n\n var V = v.toLowerCase();\n\n switch (V) {\n case 'inherit':\n case 'initial':\n case 'unset':\n case '':\n margin_local_var_myGlobal.call(this, V);\n break;\n\n default:\n margin_local_var_mySetter.call(this, v);\n break;\n }\n },\n get: function () {\n return this.getPropertyValue('margin');\n },\n enumerable: true,\n configurable: true\n};\nmargin_export_isValid = margin_local_var_isValid;\nmargin_export_parser = margin_local_var_parser;\nvar marginBottom_export_definition;\nmarginBottom_export_definition = {\n set: external_dependency_parsers_0.subImplicitSetter('margin', 'bottom', {\n definition: margin_export_definition,\n isValid: margin_export_isValid,\n parser: margin_export_parser\n }.isValid, {\n definition: margin_export_definition,\n isValid: margin_export_isValid,\n parser: margin_export_parser\n }.parser),\n get: function () {\n return this.getPropertyValue('margin-bottom');\n },\n enumerable: true,\n configurable: true\n};\nvar marginLeft_export_definition;\nmarginLeft_export_definition = {\n set: external_dependency_parsers_0.subImplicitSetter('margin', 'left', {\n definition: margin_export_definition,\n isValid: margin_export_isValid,\n parser: margin_export_parser\n }.isValid, {\n definition: margin_export_definition,\n isValid: margin_export_isValid,\n parser: margin_export_parser\n }.parser),\n get: function () {\n return this.getPropertyValue('margin-left');\n },\n enumerable: true,\n configurable: true\n};\nvar marginRight_export_definition;\nmarginRight_export_definition = {\n set: external_dependency_parsers_0.subImplicitSetter('margin', 'right', {\n definition: margin_export_definition,\n isValid: margin_export_isValid,\n parser: margin_export_parser\n }.isValid, {\n definition: margin_export_definition,\n isValid: margin_export_isValid,\n parser: margin_export_parser\n }.parser),\n get: function () {\n return this.getPropertyValue('margin-right');\n },\n enumerable: true,\n configurable: true\n};\nvar marginTop_export_definition;\nmarginTop_export_definition = {\n set: external_dependency_parsers_0.subImplicitSetter('margin', 'top', {\n definition: margin_export_definition,\n isValid: margin_export_isValid,\n parser: margin_export_parser\n }.isValid, {\n definition: margin_export_definition,\n isValid: margin_export_isValid,\n parser: margin_export_parser\n }.parser),\n get: function () {\n return this.getPropertyValue('margin-top');\n },\n enumerable: true,\n configurable: true\n};\nvar opacity_export_definition;\nopacity_export_definition = {\n set: function (v) {\n this._setProperty('opacity', external_dependency_parsers_0.parseNumber(v));\n },\n get: function () {\n return this.getPropertyValue('opacity');\n },\n enumerable: true,\n configurable: true\n};\nvar outlineColor_export_definition;\noutlineColor_export_definition = {\n set: function (v) {\n this._setProperty('outline-color', external_dependency_parsers_0.parseColor(v));\n },\n get: function () {\n return this.getPropertyValue('outline-color');\n },\n enumerable: true,\n configurable: true\n};\nvar padding_export_definition, padding_export_isValid, padding_export_parser;\nvar padding_local_var_TYPES = external_dependency_parsers_0.TYPES;\n\nvar padding_local_var_isValid = function (v) {\n var type = external_dependency_parsers_0.valueType(v);\n return type === padding_local_var_TYPES.LENGTH || type === padding_local_var_TYPES.PERCENT || type === padding_local_var_TYPES.INTEGER && (v === '0' || v === 0);\n};\n\nvar padding_local_var_parser = function (v) {\n return external_dependency_parsers_0.parseMeasurement(v);\n};\n\nvar padding_local_var_mySetter = external_dependency_parsers_0.implicitSetter('padding', '', padding_local_var_isValid, padding_local_var_parser);\nvar padding_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('padding', '', function () {\n return true;\n}, function (v) {\n return v;\n});\npadding_export_definition = {\n set: function (v) {\n if (typeof v === 'number') {\n v = String(v);\n }\n\n if (typeof v !== 'string') {\n return;\n }\n\n var V = v.toLowerCase();\n\n switch (V) {\n case 'inherit':\n case 'initial':\n case 'unset':\n case '':\n padding_local_var_myGlobal.call(this, V);\n break;\n\n default:\n padding_local_var_mySetter.call(this, v);\n break;\n }\n },\n get: function () {\n return this.getPropertyValue('padding');\n },\n enumerable: true,\n configurable: true\n};\npadding_export_isValid = padding_local_var_isValid;\npadding_export_parser = padding_local_var_parser;\nvar paddingBottom_export_definition;\npaddingBottom_export_definition = {\n set: external_dependency_parsers_0.subImplicitSetter('padding', 'bottom', {\n definition: padding_export_definition,\n isValid: padding_export_isValid,\n parser: padding_export_parser\n }.isValid, {\n definition: padding_export_definition,\n isValid: padding_export_isValid,\n parser: padding_export_parser\n }.parser),\n get: function () {\n return this.getPropertyValue('padding-bottom');\n },\n enumerable: true,\n configurable: true\n};\nvar paddingLeft_export_definition;\npaddingLeft_export_definition = {\n set: external_dependency_parsers_0.subImplicitSetter('padding', 'left', {\n definition: padding_export_definition,\n isValid: padding_export_isValid,\n parser: padding_export_parser\n }.isValid, {\n definition: padding_export_definition,\n isValid: padding_export_isValid,\n parser: padding_export_parser\n }.parser),\n get: function () {\n return this.getPropertyValue('padding-left');\n },\n enumerable: true,\n configurable: true\n};\nvar paddingRight_export_definition;\npaddingRight_export_definition = {\n set: external_dependency_parsers_0.subImplicitSetter('padding', 'right', {\n definition: padding_export_definition,\n isValid: padding_export_isValid,\n parser: padding_export_parser\n }.isValid, {\n definition: padding_export_definition,\n isValid: padding_export_isValid,\n parser: padding_export_parser\n }.parser),\n get: function () {\n return this.getPropertyValue('padding-right');\n },\n enumerable: true,\n configurable: true\n};\nvar paddingTop_export_definition;\npaddingTop_export_definition = {\n set: external_dependency_parsers_0.subImplicitSetter('padding', 'top', {\n definition: padding_export_definition,\n isValid: padding_export_isValid,\n parser: padding_export_parser\n }.isValid, {\n definition: padding_export_definition,\n isValid: padding_export_isValid,\n parser: padding_export_parser\n }.parser),\n get: function () {\n return this.getPropertyValue('padding-top');\n },\n enumerable: true,\n configurable: true\n};\nvar right_export_definition;\nright_export_definition = {\n set: function (v) {\n this._setProperty('right', external_dependency_parsers_0.parseMeasurement(v));\n },\n get: function () {\n return this.getPropertyValue('right');\n },\n enumerable: true,\n configurable: true\n};\nvar stopColor_export_definition;\nstopColor_export_definition = {\n set: function (v) {\n this._setProperty('stop-color', external_dependency_parsers_0.parseColor(v));\n },\n get: function () {\n return this.getPropertyValue('stop-color');\n },\n enumerable: true,\n configurable: true\n};\nvar textLineThroughColor_export_definition;\ntextLineThroughColor_export_definition = {\n set: function (v) {\n this._setProperty('text-line-through-color', external_dependency_parsers_0.parseColor(v));\n },\n get: function () {\n return this.getPropertyValue('text-line-through-color');\n },\n enumerable: true,\n configurable: true\n};\nvar textOverlineColor_export_definition;\ntextOverlineColor_export_definition = {\n set: function (v) {\n this._setProperty('text-overline-color', external_dependency_parsers_0.parseColor(v));\n },\n get: function () {\n return this.getPropertyValue('text-overline-color');\n },\n enumerable: true,\n configurable: true\n};\nvar textUnderlineColor_export_definition;\ntextUnderlineColor_export_definition = {\n set: function (v) {\n this._setProperty('text-underline-color', external_dependency_parsers_0.parseColor(v));\n },\n get: function () {\n return this.getPropertyValue('text-underline-color');\n },\n enumerable: true,\n configurable: true\n};\nvar top_export_definition;\ntop_export_definition = {\n set: function (v) {\n this._setProperty('top', external_dependency_parsers_0.parseMeasurement(v));\n },\n get: function () {\n return this.getPropertyValue('top');\n },\n enumerable: true,\n configurable: true\n};\nvar webkitBorderAfterColor_export_definition;\nwebkitBorderAfterColor_export_definition = {\n set: function (v) {\n this._setProperty('-webkit-border-after-color', external_dependency_parsers_0.parseColor(v));\n },\n get: function () {\n return this.getPropertyValue('-webkit-border-after-color');\n },\n enumerable: true,\n configurable: true\n};\nvar webkitBorderBeforeColor_export_definition;\nwebkitBorderBeforeColor_export_definition = {\n set: function (v) {\n this._setProperty('-webkit-border-before-color', external_dependency_parsers_0.parseColor(v));\n },\n get: function () {\n return this.getPropertyValue('-webkit-border-before-color');\n },\n enumerable: true,\n configurable: true\n};\nvar webkitBorderEndColor_export_definition;\nwebkitBorderEndColor_export_definition = {\n set: function (v) {\n this._setProperty('-webkit-border-end-color', external_dependency_parsers_0.parseColor(v));\n },\n get: function () {\n return this.getPropertyValue('-webkit-border-end-color');\n },\n enumerable: true,\n configurable: true\n};\nvar webkitBorderStartColor_export_definition;\nwebkitBorderStartColor_export_definition = {\n set: function (v) {\n this._setProperty('-webkit-border-start-color', external_dependency_parsers_0.parseColor(v));\n },\n get: function () {\n return this.getPropertyValue('-webkit-border-start-color');\n },\n enumerable: true,\n configurable: true\n};\nvar webkitColumnRuleColor_export_definition;\nwebkitColumnRuleColor_export_definition = {\n set: function (v) {\n this._setProperty('-webkit-column-rule-color', external_dependency_parsers_0.parseColor(v));\n },\n get: function () {\n return this.getPropertyValue('-webkit-column-rule-color');\n },\n enumerable: true,\n configurable: true\n};\nvar webkitMatchNearestMailBlockquoteColor_export_definition;\nwebkitMatchNearestMailBlockquoteColor_export_definition = {\n set: function (v) {\n this._setProperty('-webkit-match-nearest-mail-blockquote-color', external_dependency_parsers_0.parseColor(v));\n },\n get: function () {\n return this.getPropertyValue('-webkit-match-nearest-mail-blockquote-color');\n },\n enumerable: true,\n configurable: true\n};\nvar webkitTapHighlightColor_export_definition;\nwebkitTapHighlightColor_export_definition = {\n set: function (v) {\n this._setProperty('-webkit-tap-highlight-color', external_dependency_parsers_0.parseColor(v));\n },\n get: function () {\n return this.getPropertyValue('-webkit-tap-highlight-color');\n },\n enumerable: true,\n configurable: true\n};\nvar webkitTextEmphasisColor_export_definition;\nwebkitTextEmphasisColor_export_definition = {\n set: function (v) {\n this._setProperty('-webkit-text-emphasis-color', external_dependency_parsers_0.parseColor(v));\n },\n get: function () {\n return this.getPropertyValue('-webkit-text-emphasis-color');\n },\n enumerable: true,\n configurable: true\n};\nvar webkitTextFillColor_export_definition;\nwebkitTextFillColor_export_definition = {\n set: function (v) {\n this._setProperty('-webkit-text-fill-color', external_dependency_parsers_0.parseColor(v));\n },\n get: function () {\n return this.getPropertyValue('-webkit-text-fill-color');\n },\n enumerable: true,\n configurable: true\n};\nvar webkitTextStrokeColor_export_definition;\nwebkitTextStrokeColor_export_definition = {\n set: function (v) {\n this._setProperty('-webkit-text-stroke-color', external_dependency_parsers_0.parseColor(v));\n },\n get: function () {\n return this.getPropertyValue('-webkit-text-stroke-color');\n },\n enumerable: true,\n configurable: true\n};\nvar width_export_definition;\n\nfunction width_local_fn_parse(v) {\n if (String(v).toLowerCase() === 'auto') {\n return 'auto';\n }\n\n if (String(v).toLowerCase() === 'inherit') {\n return 'inherit';\n }\n\n return external_dependency_parsers_0.parseMeasurement(v);\n}\n\nwidth_export_definition = {\n set: function (v) {\n this._setProperty('width', width_local_fn_parse(v));\n },\n get: function () {\n return this.getPropertyValue('width');\n },\n enumerable: true,\n configurable: true\n};\n\nmodule.exports = function (prototype) {\n Object.defineProperties(prototype, {\n azimuth: azimuth_export_definition,\n backgroundColor: backgroundColor_export_definition,\n \"background-color\": backgroundColor_export_definition,\n backgroundImage: backgroundImage_export_definition,\n \"background-image\": backgroundImage_export_definition,\n backgroundRepeat: backgroundRepeat_export_definition,\n \"background-repeat\": backgroundRepeat_export_definition,\n backgroundAttachment: backgroundAttachment_export_definition,\n \"background-attachment\": backgroundAttachment_export_definition,\n backgroundPosition: backgroundPosition_export_definition,\n \"background-position\": backgroundPosition_export_definition,\n background: background_export_definition,\n borderWidth: borderWidth_export_definition,\n \"border-width\": borderWidth_export_definition,\n borderStyle: borderStyle_export_definition,\n \"border-style\": borderStyle_export_definition,\n borderColor: borderColor_export_definition,\n \"border-color\": borderColor_export_definition,\n border: border_export_definition,\n borderBottomWidth: borderBottomWidth_export_definition,\n \"border-bottom-width\": borderBottomWidth_export_definition,\n borderBottomStyle: borderBottomStyle_export_definition,\n \"border-bottom-style\": borderBottomStyle_export_definition,\n borderBottomColor: borderBottomColor_export_definition,\n \"border-bottom-color\": borderBottomColor_export_definition,\n borderBottom: borderBottom_export_definition,\n \"border-bottom\": borderBottom_export_definition,\n borderCollapse: borderCollapse_export_definition,\n \"border-collapse\": borderCollapse_export_definition,\n borderLeftWidth: borderLeftWidth_export_definition,\n \"border-left-width\": borderLeftWidth_export_definition,\n borderLeftStyle: borderLeftStyle_export_definition,\n \"border-left-style\": borderLeftStyle_export_definition,\n borderLeftColor: borderLeftColor_export_definition,\n \"border-left-color\": borderLeftColor_export_definition,\n borderLeft: borderLeft_export_definition,\n \"border-left\": borderLeft_export_definition,\n borderRightWidth: borderRightWidth_export_definition,\n \"border-right-width\": borderRightWidth_export_definition,\n borderRightStyle: borderRightStyle_export_definition,\n \"border-right-style\": borderRightStyle_export_definition,\n borderRightColor: borderRightColor_export_definition,\n \"border-right-color\": borderRightColor_export_definition,\n borderRight: borderRight_export_definition,\n \"border-right\": borderRight_export_definition,\n borderSpacing: borderSpacing_export_definition,\n \"border-spacing\": borderSpacing_export_definition,\n borderTopWidth: borderTopWidth_export_definition,\n \"border-top-width\": borderTopWidth_export_definition,\n borderTopStyle: borderTopStyle_export_definition,\n \"border-top-style\": borderTopStyle_export_definition,\n borderTopColor: borderTopColor_export_definition,\n \"border-top-color\": borderTopColor_export_definition,\n borderTop: borderTop_export_definition,\n \"border-top\": borderTop_export_definition,\n bottom: bottom_export_definition,\n clear: clear_export_definition,\n clip: clip_export_definition,\n color: color_export_definition,\n cssFloat: cssFloat_export_definition,\n \"css-float\": cssFloat_export_definition,\n flexGrow: flexGrow_export_definition,\n \"flex-grow\": flexGrow_export_definition,\n flexShrink: flexShrink_export_definition,\n \"flex-shrink\": flexShrink_export_definition,\n flexBasis: flexBasis_export_definition,\n \"flex-basis\": flexBasis_export_definition,\n flex: flex_export_definition,\n float: float_export_definition,\n floodColor: floodColor_export_definition,\n \"flood-color\": floodColor_export_definition,\n fontFamily: fontFamily_export_definition,\n \"font-family\": fontFamily_export_definition,\n fontSize: fontSize_export_definition,\n \"font-size\": fontSize_export_definition,\n fontStyle: fontStyle_export_definition,\n \"font-style\": fontStyle_export_definition,\n fontVariant: fontVariant_export_definition,\n \"font-variant\": fontVariant_export_definition,\n fontWeight: fontWeight_export_definition,\n \"font-weight\": fontWeight_export_definition,\n lineHeight: lineHeight_export_definition,\n \"line-height\": lineHeight_export_definition,\n font: font_export_definition,\n height: height_export_definition,\n left: left_export_definition,\n lightingColor: lightingColor_export_definition,\n \"lighting-color\": lightingColor_export_definition,\n margin: margin_export_definition,\n marginBottom: marginBottom_export_definition,\n \"margin-bottom\": marginBottom_export_definition,\n marginLeft: marginLeft_export_definition,\n \"margin-left\": marginLeft_export_definition,\n marginRight: marginRight_export_definition,\n \"margin-right\": marginRight_export_definition,\n marginTop: marginTop_export_definition,\n \"margin-top\": marginTop_export_definition,\n opacity: opacity_export_definition,\n outlineColor: outlineColor_export_definition,\n \"outline-color\": outlineColor_export_definition,\n padding: padding_export_definition,\n paddingBottom: paddingBottom_export_definition,\n \"padding-bottom\": paddingBottom_export_definition,\n paddingLeft: paddingLeft_export_definition,\n \"padding-left\": paddingLeft_export_definition,\n paddingRight: paddingRight_export_definition,\n \"padding-right\": paddingRight_export_definition,\n paddingTop: paddingTop_export_definition,\n \"padding-top\": paddingTop_export_definition,\n right: right_export_definition,\n stopColor: stopColor_export_definition,\n \"stop-color\": stopColor_export_definition,\n textLineThroughColor: textLineThroughColor_export_definition,\n \"text-line-through-color\": textLineThroughColor_export_definition,\n textOverlineColor: textOverlineColor_export_definition,\n \"text-overline-color\": textOverlineColor_export_definition,\n textUnderlineColor: textUnderlineColor_export_definition,\n \"text-underline-color\": textUnderlineColor_export_definition,\n top: top_export_definition,\n webkitBorderAfterColor: webkitBorderAfterColor_export_definition,\n \"webkit-border-after-color\": webkitBorderAfterColor_export_definition,\n webkitBorderBeforeColor: webkitBorderBeforeColor_export_definition,\n \"webkit-border-before-color\": webkitBorderBeforeColor_export_definition,\n webkitBorderEndColor: webkitBorderEndColor_export_definition,\n \"webkit-border-end-color\": webkitBorderEndColor_export_definition,\n webkitBorderStartColor: webkitBorderStartColor_export_definition,\n \"webkit-border-start-color\": webkitBorderStartColor_export_definition,\n webkitColumnRuleColor: webkitColumnRuleColor_export_definition,\n \"webkit-column-rule-color\": webkitColumnRuleColor_export_definition,\n webkitMatchNearestMailBlockquoteColor: webkitMatchNearestMailBlockquoteColor_export_definition,\n \"webkit-match-nearest-mail-blockquote-color\": webkitMatchNearestMailBlockquoteColor_export_definition,\n webkitTapHighlightColor: webkitTapHighlightColor_export_definition,\n \"webkit-tap-highlight-color\": webkitTapHighlightColor_export_definition,\n webkitTextEmphasisColor: webkitTextEmphasisColor_export_definition,\n \"webkit-text-emphasis-color\": webkitTextEmphasisColor_export_definition,\n webkitTextFillColor: webkitTextFillColor_export_definition,\n \"webkit-text-fill-color\": webkitTextFillColor_export_definition,\n webkitTextStrokeColor: webkitTextStrokeColor_export_definition,\n \"webkit-text-stroke-color\": webkitTextStrokeColor_export_definition,\n width: width_export_definition\n });\n};\n","'use strict';\n\nconst hueToRgb = (t1, t2, hue) => {\n if (hue < 0) hue += 6;\n if (hue >= 6) hue -= 6;\n\n if (hue < 1) return (t2 - t1) * hue + t1;\n else if (hue < 3) return t2;\n else if (hue < 4) return (t2 - t1) * (4 - hue) + t1;\n else return t1;\n};\n\n// https://www.w3.org/TR/css-color-4/#hsl-to-rgb\nexports.hslToRgb = (hue, sat, light) => {\n const t2 = light <= 0.5 ? light * (sat + 1) : light + sat - light * sat;\n const t1 = light * 2 - t2;\n const r = hueToRgb(t1, t2, hue + 2);\n const g = hueToRgb(t1, t2, hue);\n const b = hueToRgb(t1, t2, hue - 2);\n return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)];\n};\n","'use strict';\n\nmodule.exports = function getBasicPropertyDescriptor(name) {\n return {\n set: function(v) {\n this._setProperty(name, v);\n },\n get: function() {\n return this.getPropertyValue(name);\n },\n enumerable: true,\n configurable: true,\n };\n};\n","//.CommonJS\nvar CSSOM = {\n CSSRule: require(\"./CSSRule\").CSSRule,\n MatcherList: require(\"./MatcherList\").MatcherList\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see https://developer.mozilla.org/en/CSS/@-moz-document\n */\nCSSOM.CSSDocumentRule = function CSSDocumentRule() {\n CSSOM.CSSRule.call(this);\n this.matcher = new CSSOM.MatcherList();\n this.cssRules = [];\n};\n\nCSSOM.CSSDocumentRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSDocumentRule.prototype.constructor = CSSOM.CSSDocumentRule;\nCSSOM.CSSDocumentRule.prototype.type = 10;\n//FIXME\n//CSSOM.CSSDocumentRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;\n//CSSOM.CSSDocumentRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;\n\nObject.defineProperty(CSSOM.CSSDocumentRule.prototype, \"cssText\", {\n get: function() {\n var cssTexts = [];\n for (var i=0, length=this.cssRules.length; i < length; i++) {\n cssTexts.push(this.cssRules[i].cssText);\n }\n return \"@-moz-document \" + this.matcher.matcherText + \" {\" + cssTexts.join(\"\") + \"}\";\n }\n});\n\n\n//.CommonJS\nexports.CSSDocumentRule = CSSOM.CSSDocumentRule;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {\n\tCSSStyleDeclaration: require(\"./CSSStyleDeclaration\").CSSStyleDeclaration,\n\tCSSRule: require(\"./CSSRule\").CSSRule\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://dev.w3.org/csswg/cssom/#css-font-face-rule\n */\nCSSOM.CSSFontFaceRule = function CSSFontFaceRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.style = new CSSOM.CSSStyleDeclaration();\n\tthis.style.parentRule = this;\n};\n\nCSSOM.CSSFontFaceRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSFontFaceRule.prototype.constructor = CSSOM.CSSFontFaceRule;\nCSSOM.CSSFontFaceRule.prototype.type = 5;\n//FIXME\n//CSSOM.CSSFontFaceRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;\n//CSSOM.CSSFontFaceRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;\n\n// http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSFontFaceRule.cpp\nObject.defineProperty(CSSOM.CSSFontFaceRule.prototype, \"cssText\", {\n get: function() {\n return \"@font-face {\" + this.style.cssText + \"}\";\n }\n});\n\n\n//.CommonJS\nexports.CSSFontFaceRule = CSSOM.CSSFontFaceRule;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {\n\tCSSRule: require(\"./CSSRule\").CSSRule\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://www.w3.org/TR/shadow-dom/#host-at-rule\n */\nCSSOM.CSSHostRule = function CSSHostRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.cssRules = [];\n};\n\nCSSOM.CSSHostRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSHostRule.prototype.constructor = CSSOM.CSSHostRule;\nCSSOM.CSSHostRule.prototype.type = 1001;\n//FIXME\n//CSSOM.CSSHostRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;\n//CSSOM.CSSHostRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;\n\nObject.defineProperty(CSSOM.CSSHostRule.prototype, \"cssText\", {\n\tget: function() {\n\t\tvar cssTexts = [];\n\t\tfor (var i=0, length=this.cssRules.length; i < length; i++) {\n\t\t\tcssTexts.push(this.cssRules[i].cssText);\n\t\t}\n\t\treturn \"@host {\" + cssTexts.join(\"\") + \"}\";\n\t}\n});\n\n\n//.CommonJS\nexports.CSSHostRule = CSSOM.CSSHostRule;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {\n\tCSSRule: require(\"./CSSRule\").CSSRule,\n\tCSSStyleSheet: require(\"./CSSStyleSheet\").CSSStyleSheet,\n\tMediaList: require(\"./MediaList\").MediaList\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://dev.w3.org/csswg/cssom/#cssimportrule\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSImportRule\n */\nCSSOM.CSSImportRule = function CSSImportRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.href = \"\";\n\tthis.media = new CSSOM.MediaList();\n\tthis.styleSheet = new CSSOM.CSSStyleSheet();\n};\n\nCSSOM.CSSImportRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSImportRule.prototype.constructor = CSSOM.CSSImportRule;\nCSSOM.CSSImportRule.prototype.type = 3;\n\nObject.defineProperty(CSSOM.CSSImportRule.prototype, \"cssText\", {\n get: function() {\n var mediaText = this.media.mediaText;\n return \"@import url(\" + this.href + \")\" + (mediaText ? \" \" + mediaText : \"\") + \";\";\n },\n set: function(cssText) {\n var i = 0;\n\n /**\n * @import url(partial.css) screen, handheld;\n * || |\n * after-import media\n * |\n * url\n */\n var state = '';\n\n var buffer = '';\n var index;\n for (var character; (character = cssText.charAt(i)); i++) {\n\n switch (character) {\n case ' ':\n case '\\t':\n case '\\r':\n case '\\n':\n case '\\f':\n if (state === 'after-import') {\n state = 'url';\n } else {\n buffer += character;\n }\n break;\n\n case '@':\n if (!state && cssText.indexOf('@import', i) === i) {\n state = 'after-import';\n i += 'import'.length;\n buffer = '';\n }\n break;\n\n case 'u':\n if (state === 'url' && cssText.indexOf('url(', i) === i) {\n index = cssText.indexOf(')', i + 1);\n if (index === -1) {\n throw i + ': \")\" not found';\n }\n i += 'url('.length;\n var url = cssText.slice(i, index);\n if (url[0] === url[url.length - 1]) {\n if (url[0] === '\"' || url[0] === \"'\") {\n url = url.slice(1, -1);\n }\n }\n this.href = url;\n i = index;\n state = 'media';\n }\n break;\n\n case '\"':\n if (state === 'url') {\n index = cssText.indexOf('\"', i + 1);\n if (!index) {\n throw i + \": '\\\"' not found\";\n }\n this.href = cssText.slice(i + 1, index);\n i = index;\n state = 'media';\n }\n break;\n\n case \"'\":\n if (state === 'url') {\n index = cssText.indexOf(\"'\", i + 1);\n if (!index) {\n throw i + ': \"\\'\" not found';\n }\n this.href = cssText.slice(i + 1, index);\n i = index;\n state = 'media';\n }\n break;\n\n case ';':\n if (state === 'media') {\n if (buffer) {\n this.media.mediaText = buffer.trim();\n }\n }\n break;\n\n default:\n if (state === 'media') {\n buffer += character;\n }\n break;\n }\n }\n }\n});\n\n\n//.CommonJS\nexports.CSSImportRule = CSSOM.CSSImportRule;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {\n\tCSSRule: require(\"./CSSRule\").CSSRule,\n\tCSSStyleDeclaration: require('./CSSStyleDeclaration').CSSStyleDeclaration\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://www.w3.org/TR/css3-animations/#DOM-CSSKeyframeRule\n */\nCSSOM.CSSKeyframeRule = function CSSKeyframeRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.keyText = '';\n\tthis.style = new CSSOM.CSSStyleDeclaration();\n\tthis.style.parentRule = this;\n};\n\nCSSOM.CSSKeyframeRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSKeyframeRule.prototype.constructor = CSSOM.CSSKeyframeRule;\nCSSOM.CSSKeyframeRule.prototype.type = 9;\n//FIXME\n//CSSOM.CSSKeyframeRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;\n//CSSOM.CSSKeyframeRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;\n\n// http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSKeyframeRule.cpp\nObject.defineProperty(CSSOM.CSSKeyframeRule.prototype, \"cssText\", {\n get: function() {\n return this.keyText + \" {\" + this.style.cssText + \"} \";\n }\n});\n\n\n//.CommonJS\nexports.CSSKeyframeRule = CSSOM.CSSKeyframeRule;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {\n\tCSSRule: require(\"./CSSRule\").CSSRule\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://www.w3.org/TR/css3-animations/#DOM-CSSKeyframesRule\n */\nCSSOM.CSSKeyframesRule = function CSSKeyframesRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.name = '';\n\tthis.cssRules = [];\n};\n\nCSSOM.CSSKeyframesRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSKeyframesRule.prototype.constructor = CSSOM.CSSKeyframesRule;\nCSSOM.CSSKeyframesRule.prototype.type = 8;\n//FIXME\n//CSSOM.CSSKeyframesRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;\n//CSSOM.CSSKeyframesRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;\n\n// http://www.opensource.apple.com/source/WebCore/WebCore-955.66.1/css/WebKitCSSKeyframesRule.cpp\nObject.defineProperty(CSSOM.CSSKeyframesRule.prototype, \"cssText\", {\n get: function() {\n var cssTexts = [];\n for (var i=0, length=this.cssRules.length; i < length; i++) {\n cssTexts.push(\" \" + this.cssRules[i].cssText);\n }\n return \"@\" + (this._vendorPrefix || '') + \"keyframes \" + this.name + \" { \\n\" + cssTexts.join(\"\\n\") + \"\\n}\";\n }\n});\n\n\n//.CommonJS\nexports.CSSKeyframesRule = CSSOM.CSSKeyframesRule;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {\n\tCSSRule: require(\"./CSSRule\").CSSRule,\n\tMediaList: require(\"./MediaList\").MediaList\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://dev.w3.org/csswg/cssom/#cssmediarule\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule\n */\nCSSOM.CSSMediaRule = function CSSMediaRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.media = new CSSOM.MediaList();\n\tthis.cssRules = [];\n};\n\nCSSOM.CSSMediaRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSMediaRule.prototype.constructor = CSSOM.CSSMediaRule;\nCSSOM.CSSMediaRule.prototype.type = 4;\n//FIXME\n//CSSOM.CSSMediaRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;\n//CSSOM.CSSMediaRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;\n\n// http://opensource.apple.com/source/WebCore/WebCore-658.28/css/CSSMediaRule.cpp\nObject.defineProperty(CSSOM.CSSMediaRule.prototype, \"cssText\", {\n get: function() {\n var cssTexts = [];\n for (var i=0, length=this.cssRules.length; i < length; i++) {\n cssTexts.push(this.cssRules[i].cssText);\n }\n return \"@media \" + this.media.mediaText + \" {\" + cssTexts.join(\"\") + \"}\";\n }\n});\n\n\n//.CommonJS\nexports.CSSMediaRule = CSSOM.CSSMediaRule;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://dev.w3.org/csswg/cssom/#the-cssrule-interface\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule\n */\nCSSOM.CSSRule = function CSSRule() {\n\tthis.parentRule = null;\n\tthis.parentStyleSheet = null;\n};\n\nCSSOM.CSSRule.UNKNOWN_RULE = 0; // obsolete\nCSSOM.CSSRule.STYLE_RULE = 1;\nCSSOM.CSSRule.CHARSET_RULE = 2; // obsolete\nCSSOM.CSSRule.IMPORT_RULE = 3;\nCSSOM.CSSRule.MEDIA_RULE = 4;\nCSSOM.CSSRule.FONT_FACE_RULE = 5;\nCSSOM.CSSRule.PAGE_RULE = 6;\nCSSOM.CSSRule.KEYFRAMES_RULE = 7;\nCSSOM.CSSRule.KEYFRAME_RULE = 8;\nCSSOM.CSSRule.MARGIN_RULE = 9;\nCSSOM.CSSRule.NAMESPACE_RULE = 10;\nCSSOM.CSSRule.COUNTER_STYLE_RULE = 11;\nCSSOM.CSSRule.SUPPORTS_RULE = 12;\nCSSOM.CSSRule.DOCUMENT_RULE = 13;\nCSSOM.CSSRule.FONT_FEATURE_VALUES_RULE = 14;\nCSSOM.CSSRule.VIEWPORT_RULE = 15;\nCSSOM.CSSRule.REGION_STYLE_RULE = 16;\n\n\nCSSOM.CSSRule.prototype = {\n\tconstructor: CSSOM.CSSRule\n\t//FIXME\n};\n\n\n//.CommonJS\nexports.CSSRule = CSSOM.CSSRule;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration\n */\nCSSOM.CSSStyleDeclaration = function CSSStyleDeclaration(){\n\tthis.length = 0;\n\tthis.parentRule = null;\n\n\t// NON-STANDARD\n\tthis._importants = {};\n};\n\n\nCSSOM.CSSStyleDeclaration.prototype = {\n\n\tconstructor: CSSOM.CSSStyleDeclaration,\n\n\t/**\n\t *\n\t * @param {string} name\n\t * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyValue\n\t * @return {string} the value of the property if it has been explicitly set for this declaration block.\n\t * Returns the empty string if the property has not been set.\n\t */\n\tgetPropertyValue: function(name) {\n\t\treturn this[name] || \"\";\n\t},\n\n\t/**\n\t *\n\t * @param {string} name\n\t * @param {string} value\n\t * @param {string} [priority=null] \"important\" or null\n\t * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-setProperty\n\t */\n\tsetProperty: function(name, value, priority) {\n\t\tif (this[name]) {\n\t\t\t// Property already exist. Overwrite it.\n\t\t\tvar index = Array.prototype.indexOf.call(this, name);\n\t\t\tif (index < 0) {\n\t\t\t\tthis[this.length] = name;\n\t\t\t\tthis.length++;\n\t\t\t}\n\t\t} else {\n\t\t\t// New property.\n\t\t\tthis[this.length] = name;\n\t\t\tthis.length++;\n\t\t}\n\t\tthis[name] = value + \"\";\n\t\tthis._importants[name] = priority;\n\t},\n\n\t/**\n\t *\n\t * @param {string} name\n\t * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-removeProperty\n\t * @return {string} the value of the property if it has been explicitly set for this declaration block.\n\t * Returns the empty string if the property has not been set or the property name does not correspond to a known CSS property.\n\t */\n\tremoveProperty: function(name) {\n\t\tif (!(name in this)) {\n\t\t\treturn \"\";\n\t\t}\n\t\tvar index = Array.prototype.indexOf.call(this, name);\n\t\tif (index < 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tvar prevValue = this[name];\n\t\tthis[name] = \"\";\n\n\t\t// That's what WebKit and Opera do\n\t\tArray.prototype.splice.call(this, index, 1);\n\n\t\t// That's what Firefox does\n\t\t//this[index] = \"\"\n\n\t\treturn prevValue;\n\t},\n\n\tgetPropertyCSSValue: function() {\n\t\t//FIXME\n\t},\n\n\t/**\n\t *\n\t * @param {String} name\n\t */\n\tgetPropertyPriority: function(name) {\n\t\treturn this._importants[name] || \"\";\n\t},\n\n\n\t/**\n\t * element.style.overflow = \"auto\"\n\t * element.style.getPropertyShorthand(\"overflow-x\")\n\t * -> \"overflow\"\n\t */\n\tgetPropertyShorthand: function() {\n\t\t//FIXME\n\t},\n\n\tisPropertyImplicit: function() {\n\t\t//FIXME\n\t},\n\n\t// Doesn't work in IE < 9\n\tget cssText(){\n\t\tvar properties = [];\n\t\tfor (var i=0, length=this.length; i < length; ++i) {\n\t\t\tvar name = this[i];\n\t\t\tvar value = this.getPropertyValue(name);\n\t\t\tvar priority = this.getPropertyPriority(name);\n\t\t\tif (priority) {\n\t\t\t\tpriority = \" !\" + priority;\n\t\t\t}\n\t\t\tproperties[i] = name + \": \" + value + priority + \";\";\n\t\t}\n\t\treturn properties.join(\" \");\n\t},\n\n\tset cssText(text){\n\t\tvar i, name;\n\t\tfor (i = this.length; i--;) {\n\t\t\tname = this[i];\n\t\t\tthis[name] = \"\";\n\t\t}\n\t\tArray.prototype.splice.call(this, 0, this.length);\n\t\tthis._importants = {};\n\n\t\tvar dummyRule = CSSOM.parse('#bogus{' + text + '}').cssRules[0].style;\n\t\tvar length = dummyRule.length;\n\t\tfor (i = 0; i < length; ++i) {\n\t\t\tname = dummyRule[i];\n\t\t\tthis.setProperty(dummyRule[i], dummyRule.getPropertyValue(name), dummyRule.getPropertyPriority(name));\n\t\t}\n\t}\n};\n\n\n//.CommonJS\nexports.CSSStyleDeclaration = CSSOM.CSSStyleDeclaration;\nCSSOM.parse = require('./parse').parse; // Cannot be included sooner due to the mutual dependency between parse.js and CSSStyleDeclaration.js\n///CommonJS\n","//.CommonJS\nvar CSSOM = {\n\tCSSStyleDeclaration: require(\"./CSSStyleDeclaration\").CSSStyleDeclaration,\n\tCSSRule: require(\"./CSSRule\").CSSRule\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://dev.w3.org/csswg/cssom/#cssstylerule\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleRule\n */\nCSSOM.CSSStyleRule = function CSSStyleRule() {\n\tCSSOM.CSSRule.call(this);\n\tthis.selectorText = \"\";\n\tthis.style = new CSSOM.CSSStyleDeclaration();\n\tthis.style.parentRule = this;\n};\n\nCSSOM.CSSStyleRule.prototype = new CSSOM.CSSRule();\nCSSOM.CSSStyleRule.prototype.constructor = CSSOM.CSSStyleRule;\nCSSOM.CSSStyleRule.prototype.type = 1;\n\nObject.defineProperty(CSSOM.CSSStyleRule.prototype, \"cssText\", {\n\tget: function() {\n\t\tvar text;\n\t\tif (this.selectorText) {\n\t\t\ttext = this.selectorText + \" {\" + this.style.cssText + \"}\";\n\t\t} else {\n\t\t\ttext = \"\";\n\t\t}\n\t\treturn text;\n\t},\n\tset: function(cssText) {\n\t\tvar rule = CSSOM.CSSStyleRule.parse(cssText);\n\t\tthis.style = rule.style;\n\t\tthis.selectorText = rule.selectorText;\n\t}\n});\n\n\n/**\n * NON-STANDARD\n * lightweight version of parse.js.\n * @param {string} ruleText\n * @return CSSStyleRule\n */\nCSSOM.CSSStyleRule.parse = function(ruleText) {\n\tvar i = 0;\n\tvar state = \"selector\";\n\tvar index;\n\tvar j = i;\n\tvar buffer = \"\";\n\n\tvar SIGNIFICANT_WHITESPACE = {\n\t\t\"selector\": true,\n\t\t\"value\": true\n\t};\n\n\tvar styleRule = new CSSOM.CSSStyleRule();\n\tvar name, priority=\"\";\n\n\tfor (var character; (character = ruleText.charAt(i)); i++) {\n\n\t\tswitch (character) {\n\n\t\tcase \" \":\n\t\tcase \"\\t\":\n\t\tcase \"\\r\":\n\t\tcase \"\\n\":\n\t\tcase \"\\f\":\n\t\t\tif (SIGNIFICANT_WHITESPACE[state]) {\n\t\t\t\t// Squash 2 or more white-spaces in the row into 1\n\t\t\t\tswitch (ruleText.charAt(i - 1)) {\n\t\t\t\t\tcase \" \":\n\t\t\t\t\tcase \"\\t\":\n\t\t\t\t\tcase \"\\r\":\n\t\t\t\t\tcase \"\\n\":\n\t\t\t\t\tcase \"\\f\":\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbuffer += \" \";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\t// String\n\t\tcase '\"':\n\t\t\tj = i + 1;\n\t\t\tindex = ruleText.indexOf('\"', j) + 1;\n\t\t\tif (!index) {\n\t\t\t\tthrow '\" is missing';\n\t\t\t}\n\t\t\tbuffer += ruleText.slice(i, index);\n\t\t\ti = index - 1;\n\t\t\tbreak;\n\n\t\tcase \"'\":\n\t\t\tj = i + 1;\n\t\t\tindex = ruleText.indexOf(\"'\", j) + 1;\n\t\t\tif (!index) {\n\t\t\t\tthrow \"' is missing\";\n\t\t\t}\n\t\t\tbuffer += ruleText.slice(i, index);\n\t\t\ti = index - 1;\n\t\t\tbreak;\n\n\t\t// Comment\n\t\tcase \"/\":\n\t\t\tif (ruleText.charAt(i + 1) === \"*\") {\n\t\t\t\ti += 2;\n\t\t\t\tindex = ruleText.indexOf(\"*/\", i);\n\t\t\t\tif (index === -1) {\n\t\t\t\t\tthrow new SyntaxError(\"Missing */\");\n\t\t\t\t} else {\n\t\t\t\t\ti = index + 1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tbuffer += character;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \"{\":\n\t\t\tif (state === \"selector\") {\n\t\t\t\tstyleRule.selectorText = buffer.trim();\n\t\t\t\tbuffer = \"\";\n\t\t\t\tstate = \"name\";\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \":\":\n\t\t\tif (state === \"name\") {\n\t\t\t\tname = buffer.trim();\n\t\t\t\tbuffer = \"\";\n\t\t\t\tstate = \"value\";\n\t\t\t} else {\n\t\t\t\tbuffer += character;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \"!\":\n\t\t\tif (state === \"value\" && ruleText.indexOf(\"!important\", i) === i) {\n\t\t\t\tpriority = \"important\";\n\t\t\t\ti += \"important\".length;\n\t\t\t} else {\n\t\t\t\tbuffer += character;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \";\":\n\t\t\tif (state === \"value\") {\n\t\t\t\tstyleRule.style.setProperty(name, buffer.trim(), priority);\n\t\t\t\tpriority = \"\";\n\t\t\t\tbuffer = \"\";\n\t\t\t\tstate = \"name\";\n\t\t\t} else {\n\t\t\t\tbuffer += character;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \"}\":\n\t\t\tif (state === \"value\") {\n\t\t\t\tstyleRule.style.setProperty(name, buffer.trim(), priority);\n\t\t\t\tpriority = \"\";\n\t\t\t\tbuffer = \"\";\n\t\t\t} else if (state === \"name\") {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tbuffer += character;\n\t\t\t}\n\t\t\tstate = \"selector\";\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbuffer += character;\n\t\t\tbreak;\n\n\t\t}\n\t}\n\n\treturn styleRule;\n\n};\n\n\n//.CommonJS\nexports.CSSStyleRule = CSSOM.CSSStyleRule;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {\n\tStyleSheet: require(\"./StyleSheet\").StyleSheet,\n\tCSSStyleRule: require(\"./CSSStyleRule\").CSSStyleRule\n};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet\n */\nCSSOM.CSSStyleSheet = function CSSStyleSheet() {\n\tCSSOM.StyleSheet.call(this);\n\tthis.cssRules = [];\n};\n\n\nCSSOM.CSSStyleSheet.prototype = new CSSOM.StyleSheet();\nCSSOM.CSSStyleSheet.prototype.constructor = CSSOM.CSSStyleSheet;\n\n\n/**\n * Used to insert a new rule into the style sheet. The new rule now becomes part of the cascade.\n *\n * sheet = new Sheet(\"body {margin: 0}\")\n * sheet.toString()\n * -> \"body{margin:0;}\"\n * sheet.insertRule(\"img {border: none}\", 0)\n * -> 0\n * sheet.toString()\n * -> \"img{border:none;}body{margin:0;}\"\n *\n * @param {string} rule\n * @param {number} index\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-insertRule\n * @return {number} The index within the style sheet's rule collection of the newly inserted rule.\n */\nCSSOM.CSSStyleSheet.prototype.insertRule = function(rule, index) {\n\tif (index < 0 || index > this.cssRules.length) {\n\t\tthrow new RangeError(\"INDEX_SIZE_ERR\");\n\t}\n\tvar cssRule = CSSOM.parse(rule).cssRules[0];\n\tcssRule.parentStyleSheet = this;\n\tthis.cssRules.splice(index, 0, cssRule);\n\treturn index;\n};\n\n\n/**\n * Used to delete a rule from the style sheet.\n *\n * sheet = new Sheet(\"img{border:none} body{margin:0}\")\n * sheet.toString()\n * -> \"img{border:none;}body{margin:0;}\"\n * sheet.deleteRule(0)\n * sheet.toString()\n * -> \"body{margin:0;}\"\n *\n * @param {number} index within the style sheet's rule list of the rule to remove.\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet-deleteRule\n */\nCSSOM.CSSStyleSheet.prototype.deleteRule = function(index) {\n\tif (index < 0 || index >= this.cssRules.length) {\n\t\tthrow new RangeError(\"INDEX_SIZE_ERR\");\n\t}\n\tthis.cssRules.splice(index, 1);\n};\n\n\n/**\n * NON-STANDARD\n * @return {string} serialize stylesheet\n */\nCSSOM.CSSStyleSheet.prototype.toString = function() {\n\tvar result = \"\";\n\tvar rules = this.cssRules;\n\tfor (var i=0; i 1000 ? '1000px' : 'auto');\n * }\n */\nCSSOM.CSSValueExpression.prototype.parse = function() {\n\tvar token = this._token,\n\t\t\tidx = this._idx;\n\n\tvar character = '',\n\t\t\texpression = '',\n\t\t\terror = '',\n\t\t\tinfo,\n\t\t\tparen = [];\n\n\n\tfor (; ; ++idx) {\n\t\tcharacter = token.charAt(idx);\n\n\t\t// end of token\n\t\tif (character === '') {\n\t\t\terror = 'css expression error: unfinished expression!';\n\t\t\tbreak;\n\t\t}\n\n\t\tswitch(character) {\n\t\t\tcase '(':\n\t\t\t\tparen.push(character);\n\t\t\t\texpression += character;\n\t\t\t\tbreak;\n\n\t\t\tcase ')':\n\t\t\t\tparen.pop(character);\n\t\t\t\texpression += character;\n\t\t\t\tbreak;\n\n\t\t\tcase '/':\n\t\t\t\tif ((info = this._parseJSComment(token, idx))) { // comment?\n\t\t\t\t\tif (info.error) {\n\t\t\t\t\t\terror = 'css expression error: unfinished comment in expression!';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tidx = info.idx;\n\t\t\t\t\t\t// ignore the comment\n\t\t\t\t\t}\n\t\t\t\t} else if ((info = this._parseJSRexExp(token, idx))) { // regexp\n\t\t\t\t\tidx = info.idx;\n\t\t\t\t\texpression += info.text;\n\t\t\t\t} else { // other\n\t\t\t\t\texpression += character;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"'\":\n\t\t\tcase '\"':\n\t\t\t\tinfo = this._parseJSString(token, idx, character);\n\t\t\t\tif (info) { // string\n\t\t\t\t\tidx = info.idx;\n\t\t\t\t\texpression += info.text;\n\t\t\t\t} else {\n\t\t\t\t\texpression += character;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\texpression += character;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (error) {\n\t\t\tbreak;\n\t\t}\n\n\t\t// end of expression\n\t\tif (paren.length === 0) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tvar ret;\n\tif (error) {\n\t\tret = {\n\t\t\terror: error\n\t\t};\n\t} else {\n\t\tret = {\n\t\t\tidx: idx,\n\t\t\texpression: expression\n\t\t};\n\t}\n\n\treturn ret;\n};\n\n\n/**\n *\n * @return {Object|false}\n * - idx:\n * - text:\n * or\n * - error:\n * or\n * false\n *\n */\nCSSOM.CSSValueExpression.prototype._parseJSComment = function(token, idx) {\n\tvar nextChar = token.charAt(idx + 1),\n\t\t\ttext;\n\n\tif (nextChar === '/' || nextChar === '*') {\n\t\tvar startIdx = idx,\n\t\t\t\tendIdx,\n\t\t\t\tcommentEndChar;\n\n\t\tif (nextChar === '/') { // line comment\n\t\t\tcommentEndChar = '\\n';\n\t\t} else if (nextChar === '*') { // block comment\n\t\t\tcommentEndChar = '*/';\n\t\t}\n\n\t\tendIdx = token.indexOf(commentEndChar, startIdx + 1 + 1);\n\t\tif (endIdx !== -1) {\n\t\t\tendIdx = endIdx + commentEndChar.length - 1;\n\t\t\ttext = token.substring(idx, endIdx + 1);\n\t\t\treturn {\n\t\t\t\tidx: endIdx,\n\t\t\t\ttext: text\n\t\t\t};\n\t\t} else {\n\t\t\tvar error = 'css expression error: unfinished comment in expression!';\n\t\t\treturn {\n\t\t\t\terror: error\n\t\t\t};\n\t\t}\n\t} else {\n\t\treturn false;\n\t}\n};\n\n\n/**\n *\n * @return {Object|false}\n *\t\t\t\t\t- idx:\n *\t\t\t\t\t- text:\n *\t\t\t\t\tor \n *\t\t\t\t\tfalse\n *\n */\nCSSOM.CSSValueExpression.prototype._parseJSString = function(token, idx, sep) {\n\tvar endIdx = this._findMatchedIdx(token, idx, sep),\n\t\t\ttext;\n\n\tif (endIdx === -1) {\n\t\treturn false;\n\t} else {\n\t\ttext = token.substring(idx, endIdx + sep.length);\n\n\t\treturn {\n\t\t\tidx: endIdx,\n\t\t\ttext: text\n\t\t};\n\t}\n};\n\n\n/**\n * parse regexp in css expression\n *\n * @return {Object|false}\n *\t\t\t\t- idx:\n *\t\t\t\t- regExp:\n *\t\t\t\tor \n *\t\t\t\tfalse\n */\n\n/*\n\nall legal RegExp\n \n/a/\n(/a/)\n[/a/]\n[12, /a/]\n\n!/a/\n\n+/a/\n-/a/\n* /a/\n/ /a/\n%/a/\n\n===/a/\n!==/a/\n==/a/\n!=/a/\n>/a/\n>=/a/\n>/a/\n>>>/a/\n\n&&/a/\n||/a/\n?/a/\n=/a/\n,/a/\n\n\t\tdelete /a/\n\t\t\t\tin /a/\ninstanceof /a/\n\t\t\t\tnew /a/\n\t\ttypeof /a/\n\t\t\tvoid /a/\n\n*/\nCSSOM.CSSValueExpression.prototype._parseJSRexExp = function(token, idx) {\n\tvar before = token.substring(0, idx).replace(/\\s+$/, \"\"),\n\t\t\tlegalRegx = [\n\t\t\t\t/^$/,\n\t\t\t\t/\\($/,\n\t\t\t\t/\\[$/,\n\t\t\t\t/\\!$/,\n\t\t\t\t/\\+$/,\n\t\t\t\t/\\-$/,\n\t\t\t\t/\\*$/,\n\t\t\t\t/\\/\\s+/,\n\t\t\t\t/\\%$/,\n\t\t\t\t/\\=$/,\n\t\t\t\t/\\>$/,\n\t\t\t\t/<$/,\n\t\t\t\t/\\&$/,\n\t\t\t\t/\\|$/,\n\t\t\t\t/\\^$/,\n\t\t\t\t/\\~$/,\n\t\t\t\t/\\?$/,\n\t\t\t\t/\\,$/,\n\t\t\t\t/delete$/,\n\t\t\t\t/in$/,\n\t\t\t\t/instanceof$/,\n\t\t\t\t/new$/,\n\t\t\t\t/typeof$/,\n\t\t\t\t/void$/\n\t\t\t];\n\n\tvar isLegal = legalRegx.some(function(reg) {\n\t\treturn reg.test(before);\n\t});\n\n\tif (!isLegal) {\n\t\treturn false;\n\t} else {\n\t\tvar sep = '/';\n\n\t\t// same logic as string\n\t\treturn this._parseJSString(token, idx, sep);\n\t}\n};\n\n\n/**\n *\n * find next sep(same line) index in `token`\n *\n * @return {Number}\n *\n */\nCSSOM.CSSValueExpression.prototype._findMatchedIdx = function(token, idx, sep) {\n\tvar startIdx = idx,\n\t\t\tendIdx;\n\n\tvar NOT_FOUND = -1;\n\n\twhile(true) {\n\t\tendIdx = token.indexOf(sep, startIdx + 1);\n\n\t\tif (endIdx === -1) { // not found\n\t\t\tendIdx = NOT_FOUND;\n\t\t\tbreak;\n\t\t} else {\n\t\t\tvar text = token.substring(idx + 1, endIdx),\n\t\t\t\t\tmatched = text.match(/\\\\+$/);\n\t\t\tif (!matched || matched[0] % 2 === 0) { // not escaped\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tstartIdx = endIdx;\n\t\t\t}\n\t\t}\n\t}\n\n\t// boundary must be in the same line(js sting or regexp)\n\tvar nextNewLineIdx = token.indexOf('\\n', idx + 1);\n\tif (nextNewLineIdx < endIdx) {\n\t\tendIdx = NOT_FOUND;\n\t}\n\n\n\treturn endIdx;\n};\n\n\n\n\n//.CommonJS\nexports.CSSValueExpression = CSSOM.CSSValueExpression;\n///CommonJS\n","//.CommonJS\nvar CSSOM = {};\n///CommonJS\n\n\n/**\n * @constructor\n * @see https://developer.mozilla.org/en/CSS/@-moz-document\n */\nCSSOM.MatcherList = function MatcherList(){\n this.length = 0;\n};\n\nCSSOM.MatcherList.prototype = {\n\n constructor: CSSOM.MatcherList,\n\n /**\n * @return {string}\n */\n get matcherText() {\n return Array.prototype.join.call(this, \", \");\n },\n\n /**\n * @param {string} value\n */\n set matcherText(value) {\n // just a temporary solution, actually it may be wrong by just split the value with ',', because a url can include ','.\n var values = value.split(\",\");\n var length = this.length = values.length;\n for (var i=0; i 0;\n\n\t\t\t\t\twhile (ancestorRules.length > 0) {\n\t\t\t\t\t\tparentRule = ancestorRules.pop();\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tparentRule.constructor.name === \"CSSMediaRule\"\n\t\t\t\t\t\t\t|| parentRule.constructor.name === \"CSSSupportsRule\"\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tprevScope = currentScope;\n\t\t\t\t\t\t\tcurrentScope = parentRule;\n\t\t\t\t\t\t\tcurrentScope.cssRules.push(prevScope);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (ancestorRules.length === 0) {\n\t\t\t\t\t\t\thasAncestors = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (!hasAncestors) {\n\t\t\t\t\t\tcurrentScope.__ends = i + 1;\n\t\t\t\t\t\tstyleSheet.cssRules.push(currentScope);\n\t\t\t\t\t\tcurrentScope = styleSheet;\n\t\t\t\t\t\tparentRule = null;\n\t\t\t\t\t}\n\n\t\t\t\t\tbuffer = \"\";\n\t\t\t\t\tstate = \"before-selector\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tswitch (state) {\n\t\t\t\tcase \"before-selector\":\n\t\t\t\t\tstate = \"selector\";\n\t\t\t\t\tstyleRule = new CSSOM.CSSStyleRule();\n\t\t\t\t\tstyleRule.__starts = i;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"before-name\":\n\t\t\t\t\tstate = \"name\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"before-value\":\n\t\t\t\t\tstate = \"value\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"importRule-begin\":\n\t\t\t\t\tstate = \"importRule\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbuffer += character;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn styleSheet;\n};\n\n\n//.CommonJS\nexports.parse = CSSOM.parse;\n// The following modules cannot be included sooner due to the mutual dependency with parse.js\nCSSOM.CSSStyleSheet = require(\"./CSSStyleSheet\").CSSStyleSheet;\nCSSOM.CSSStyleRule = require(\"./CSSStyleRule\").CSSStyleRule;\nCSSOM.CSSImportRule = require(\"./CSSImportRule\").CSSImportRule;\nCSSOM.CSSMediaRule = require(\"./CSSMediaRule\").CSSMediaRule;\nCSSOM.CSSSupportsRule = require(\"./CSSSupportsRule\").CSSSupportsRule;\nCSSOM.CSSFontFaceRule = require(\"./CSSFontFaceRule\").CSSFontFaceRule;\nCSSOM.CSSHostRule = require(\"./CSSHostRule\").CSSHostRule;\nCSSOM.CSSStyleDeclaration = require('./CSSStyleDeclaration').CSSStyleDeclaration;\nCSSOM.CSSKeyframeRule = require('./CSSKeyframeRule').CSSKeyframeRule;\nCSSOM.CSSKeyframesRule = require('./CSSKeyframesRule').CSSKeyframesRule;\nCSSOM.CSSValueExpression = require('./CSSValueExpression').CSSValueExpression;\nCSSOM.CSSDocumentRule = require('./CSSDocumentRule').CSSDocumentRule;\n///CommonJS\n","\"use strict\";\nconst MIMEType = require(\"whatwg-mimetype\");\nconst { parseURL, serializeURL } = require(\"whatwg-url\");\nconst {\n stripLeadingAndTrailingASCIIWhitespace,\n stringPercentDecode,\n isomorphicDecode,\n forgivingBase64Decode\n} = require(\"./utils.js\");\n\nmodule.exports = stringInput => {\n const urlRecord = parseURL(stringInput);\n\n if (urlRecord === null) {\n return null;\n }\n\n return module.exports.fromURLRecord(urlRecord);\n};\n\nmodule.exports.fromURLRecord = urlRecord => {\n if (urlRecord.scheme !== \"data\") {\n return null;\n }\n\n const input = serializeURL(urlRecord, true).substring(\"data:\".length);\n\n let position = 0;\n\n let mimeType = \"\";\n while (position < input.length && input[position] !== \",\") {\n mimeType += input[position];\n ++position;\n }\n mimeType = stripLeadingAndTrailingASCIIWhitespace(mimeType);\n\n if (position === input.length) {\n return null;\n }\n\n ++position;\n\n const encodedBody = input.substring(position);\n\n let body = stringPercentDecode(encodedBody);\n\n // Can't use /i regexp flag because it isn't restricted to ASCII.\n const mimeTypeBase64MatchResult = /(.*); *[Bb][Aa][Ss][Ee]64$/.exec(mimeType);\n if (mimeTypeBase64MatchResult) {\n const stringBody = isomorphicDecode(body);\n body = forgivingBase64Decode(stringBody);\n\n if (body === null) {\n return null;\n }\n mimeType = mimeTypeBase64MatchResult[1];\n }\n\n if (mimeType.startsWith(\";\")) {\n mimeType = \"text/plain\" + mimeType;\n }\n\n let mimeTypeRecord;\n try {\n mimeTypeRecord = new MIMEType(mimeType);\n } catch (e) {\n mimeTypeRecord = new MIMEType(\"text/plain;charset=US-ASCII\");\n }\n\n return {\n mimeType: mimeTypeRecord,\n body\n };\n};\n","\"use strict\";\nconst { percentDecode } = require(\"whatwg-url\");\nconst { atob } = require(\"abab\");\n\nexports.stripLeadingAndTrailingASCIIWhitespace = string => {\n return string.replace(/^[ \\t\\n\\f\\r]+/, \"\").replace(/[ \\t\\n\\f\\r]+$/, \"\");\n};\n\nexports.stringPercentDecode = input => {\n return percentDecode(Buffer.from(input, \"utf-8\"));\n};\n\nexports.isomorphicDecode = input => {\n return input.toString(\"binary\");\n};\n\nexports.forgivingBase64Decode = data => {\n const asString = atob(data);\n if (asString === null) {\n return null;\n }\n return Buffer.from(asString, \"binary\");\n};\n",";(function (globalScope) {\r\n 'use strict';\r\n\r\n\r\n /*\r\n * decimal.js v10.2.1\r\n * An arbitrary-precision Decimal type for JavaScript.\r\n * https://github.com/MikeMcl/decimal.js\r\n * Copyright (c) 2020 Michael Mclaughlin \r\n * MIT Licence\r\n */\r\n\r\n\r\n // ----------------------------------- EDITABLE DEFAULTS ------------------------------------ //\r\n\r\n\r\n // The maximum exponent magnitude.\r\n // The limit on the value of `toExpNeg`, `toExpPos`, `minE` and `maxE`.\r\n var EXP_LIMIT = 9e15, // 0 to 9e15\r\n\r\n // The limit on the value of `precision`, and on the value of the first argument to\r\n // `toDecimalPlaces`, `toExponential`, `toFixed`, `toPrecision` and `toSignificantDigits`.\r\n MAX_DIGITS = 1e9, // 0 to 1e9\r\n\r\n // Base conversion alphabet.\r\n NUMERALS = '0123456789abcdef',\r\n\r\n // The natural logarithm of 10 (1025 digits).\r\n LN10 = '2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058',\r\n\r\n // Pi (1025 digits).\r\n PI = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789',\r\n\r\n\r\n // The initial configuration properties of the Decimal constructor.\r\n DEFAULTS = {\r\n\r\n // These values must be integers within the stated ranges (inclusive).\r\n // Most of these values can be changed at run-time using the `Decimal.config` method.\r\n\r\n // The maximum number of significant digits of the result of a calculation or base conversion.\r\n // E.g. `Decimal.config({ precision: 20 });`\r\n precision: 20, // 1 to MAX_DIGITS\r\n\r\n // The rounding mode used when rounding to `precision`.\r\n //\r\n // ROUND_UP 0 Away from zero.\r\n // ROUND_DOWN 1 Towards zero.\r\n // ROUND_CEIL 2 Towards +Infinity.\r\n // ROUND_FLOOR 3 Towards -Infinity.\r\n // ROUND_HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n // ROUND_HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n // ROUND_HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n // ROUND_HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n // ROUND_HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n //\r\n // E.g.\r\n // `Decimal.rounding = 4;`\r\n // `Decimal.rounding = Decimal.ROUND_HALF_UP;`\r\n rounding: 4, // 0 to 8\r\n\r\n // The modulo mode used when calculating the modulus: a mod n.\r\n // The quotient (q = a / n) is calculated according to the corresponding rounding mode.\r\n // The remainder (r) is calculated as: r = a - n * q.\r\n //\r\n // UP 0 The remainder is positive if the dividend is negative, else is negative.\r\n // DOWN 1 The remainder has the same sign as the dividend (JavaScript %).\r\n // FLOOR 3 The remainder has the same sign as the divisor (Python %).\r\n // HALF_EVEN 6 The IEEE 754 remainder function.\r\n // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). Always positive.\r\n //\r\n // Truncated division (1), floored division (3), the IEEE 754 remainder (6), and Euclidian\r\n // division (9) are commonly used for the modulus operation. The other rounding modes can also\r\n // be used, but they may not give useful results.\r\n modulo: 1, // 0 to 9\r\n\r\n // The exponent value at and beneath which `toString` returns exponential notation.\r\n // JavaScript numbers: -7\r\n toExpNeg: -7, // 0 to -EXP_LIMIT\r\n\r\n // The exponent value at and above which `toString` returns exponential notation.\r\n // JavaScript numbers: 21\r\n toExpPos: 21, // 0 to EXP_LIMIT\r\n\r\n // The minimum exponent value, beneath which underflow to zero occurs.\r\n // JavaScript numbers: -324 (5e-324)\r\n minE: -EXP_LIMIT, // -1 to -EXP_LIMIT\r\n\r\n // The maximum exponent value, above which overflow to Infinity occurs.\r\n // JavaScript numbers: 308 (1.7976931348623157e+308)\r\n maxE: EXP_LIMIT, // 1 to EXP_LIMIT\r\n\r\n // Whether to use cryptographically-secure random number generation, if available.\r\n crypto: false // true/false\r\n },\r\n\r\n\r\n // ----------------------------------- END OF EDITABLE DEFAULTS ------------------------------- //\r\n\r\n\r\n Decimal, inexact, noConflict, quadrant,\r\n external = true,\r\n\r\n decimalError = '[DecimalError] ',\r\n invalidArgument = decimalError + 'Invalid argument: ',\r\n precisionLimitExceeded = decimalError + 'Precision limit exceeded',\r\n cryptoUnavailable = decimalError + 'crypto unavailable',\r\n\r\n mathfloor = Math.floor,\r\n mathpow = Math.pow,\r\n\r\n isBinary = /^0b([01]+(\\.[01]*)?|\\.[01]+)(p[+-]?\\d+)?$/i,\r\n isHex = /^0x([0-9a-f]+(\\.[0-9a-f]*)?|\\.[0-9a-f]+)(p[+-]?\\d+)?$/i,\r\n isOctal = /^0o([0-7]+(\\.[0-7]*)?|\\.[0-7]+)(p[+-]?\\d+)?$/i,\r\n isDecimal = /^(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i,\r\n\r\n BASE = 1e7,\r\n LOG_BASE = 7,\r\n MAX_SAFE_INTEGER = 9007199254740991,\r\n\r\n LN10_PRECISION = LN10.length - 1,\r\n PI_PRECISION = PI.length - 1,\r\n\r\n // Decimal.prototype object\r\n P = { name: '[object Decimal]' };\r\n\r\n\r\n // Decimal prototype methods\r\n\r\n\r\n /*\r\n * absoluteValue abs\r\n * ceil\r\n * comparedTo cmp\r\n * cosine cos\r\n * cubeRoot cbrt\r\n * decimalPlaces dp\r\n * dividedBy div\r\n * dividedToIntegerBy divToInt\r\n * equals eq\r\n * floor\r\n * greaterThan gt\r\n * greaterThanOrEqualTo gte\r\n * hyperbolicCosine cosh\r\n * hyperbolicSine sinh\r\n * hyperbolicTangent tanh\r\n * inverseCosine acos\r\n * inverseHyperbolicCosine acosh\r\n * inverseHyperbolicSine asinh\r\n * inverseHyperbolicTangent atanh\r\n * inverseSine asin\r\n * inverseTangent atan\r\n * isFinite\r\n * isInteger isInt\r\n * isNaN\r\n * isNegative isNeg\r\n * isPositive isPos\r\n * isZero\r\n * lessThan lt\r\n * lessThanOrEqualTo lte\r\n * logarithm log\r\n * [maximum] [max]\r\n * [minimum] [min]\r\n * minus sub\r\n * modulo mod\r\n * naturalExponential exp\r\n * naturalLogarithm ln\r\n * negated neg\r\n * plus add\r\n * precision sd\r\n * round\r\n * sine sin\r\n * squareRoot sqrt\r\n * tangent tan\r\n * times mul\r\n * toBinary\r\n * toDecimalPlaces toDP\r\n * toExponential\r\n * toFixed\r\n * toFraction\r\n * toHexadecimal toHex\r\n * toNearest\r\n * toNumber\r\n * toOctal\r\n * toPower pow\r\n * toPrecision\r\n * toSignificantDigits toSD\r\n * toString\r\n * truncated trunc\r\n * valueOf toJSON\r\n */\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the absolute value of this Decimal.\r\n *\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new this.constructor(this);\r\n if (x.s < 0) x.s = 1;\r\n return finalise(x);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the\r\n * direction of positive Infinity.\r\n *\r\n */\r\n P.ceil = function () {\r\n return finalise(new this.constructor(this), this.e + 1, 2);\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this Decimal is greater than the value of `y`,\r\n * -1 if the value of this Decimal is less than the value of `y`,\r\n * 0 if they have the same value,\r\n * NaN if the value of either Decimal is NaN.\r\n *\r\n */\r\n P.comparedTo = P.cmp = function (y) {\r\n var i, j, xdL, ydL,\r\n x = this,\r\n xd = x.d,\r\n yd = (y = new x.constructor(y)).d,\r\n xs = x.s,\r\n ys = y.s;\r\n\r\n // Either NaN or ±Infinity?\r\n if (!xd || !yd) {\r\n return !xs || !ys ? NaN : xs !== ys ? xs : xd === yd ? 0 : !xd ^ xs < 0 ? 1 : -1;\r\n }\r\n\r\n // Either zero?\r\n if (!xd[0] || !yd[0]) return xd[0] ? xs : yd[0] ? -ys : 0;\r\n\r\n // Signs differ?\r\n if (xs !== ys) return xs;\r\n\r\n // Compare exponents.\r\n if (x.e !== y.e) return x.e > y.e ^ xs < 0 ? 1 : -1;\r\n\r\n xdL = xd.length;\r\n ydL = yd.length;\r\n\r\n // Compare digit by digit.\r\n for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) {\r\n if (xd[i] !== yd[i]) return xd[i] > yd[i] ^ xs < 0 ? 1 : -1;\r\n }\r\n\r\n // Compare lengths.\r\n return xdL === ydL ? 0 : xdL > ydL ^ xs < 0 ? 1 : -1;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the cosine of the value in radians of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-1, 1]\r\n *\r\n * cos(0) = 1\r\n * cos(-0) = 1\r\n * cos(Infinity) = NaN\r\n * cos(-Infinity) = NaN\r\n * cos(NaN) = NaN\r\n *\r\n */\r\n P.cosine = P.cos = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.d) return new Ctor(NaN);\r\n\r\n // cos(0) = cos(-0) = 1\r\n if (!x.d[0]) return new Ctor(1);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE;\r\n Ctor.rounding = 1;\r\n\r\n x = cosine(Ctor, toLessThanHalfPi(Ctor, x));\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(quadrant == 2 || quadrant == 3 ? x.neg() : x, pr, rm, true);\r\n };\r\n\r\n\r\n /*\r\n *\r\n * Return a new Decimal whose value is the cube root of the value of this Decimal, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * cbrt(0) = 0\r\n * cbrt(-0) = -0\r\n * cbrt(1) = 1\r\n * cbrt(-1) = -1\r\n * cbrt(N) = N\r\n * cbrt(-I) = -I\r\n * cbrt(I) = I\r\n *\r\n * Math.cbrt(x) = (x < 0 ? -Math.pow(-x, 1/3) : Math.pow(x, 1/3))\r\n *\r\n */\r\n P.cubeRoot = P.cbrt = function () {\r\n var e, m, n, r, rep, s, sd, t, t3, t3plusx,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite() || x.isZero()) return new Ctor(x);\r\n external = false;\r\n\r\n // Initial estimate.\r\n s = x.s * mathpow(x.s * x, 1 / 3);\r\n\r\n // Math.cbrt underflow/overflow?\r\n // Pass x to Math.pow as integer, then adjust the exponent of the result.\r\n if (!s || Math.abs(s) == 1 / 0) {\r\n n = digitsToString(x.d);\r\n e = x.e;\r\n\r\n // Adjust n exponent so it is a multiple of 3 away from x exponent.\r\n if (s = (e - n.length + 1) % 3) n += (s == 1 || s == -2 ? '0' : '00');\r\n s = mathpow(n, 1 / 3);\r\n\r\n // Rarely, e may be one less than the result exponent value.\r\n e = mathfloor((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2));\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new Ctor(n);\r\n r.s = x.s;\r\n } else {\r\n r = new Ctor(s.toString());\r\n }\r\n\r\n sd = (e = Ctor.precision) + 3;\r\n\r\n // Halley's method.\r\n // TODO? Compare Newton's method.\r\n for (;;) {\r\n t = r;\r\n t3 = t.times(t).times(t);\r\n t3plusx = t3.plus(x);\r\n r = divide(t3plusx.plus(x).times(t), t3plusx.plus(t3), sd + 2, 1);\r\n\r\n // TODO? Replace with for-loop and checkRoundingDigits.\r\n if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) {\r\n n = n.slice(sd - 3, sd + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or 4999\r\n // , i.e. approaching a rounding boundary, continue the iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the exact result as the\r\n // nines may infinitely repeat.\r\n if (!rep) {\r\n finalise(t, e + 1, 0);\r\n\r\n if (t.times(t).times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n sd += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result.\r\n // If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n finalise(r, e + 1, 1);\r\n m = !r.times(r).times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n external = true;\r\n\r\n return finalise(r, e, Ctor.rounding, m);\r\n };\r\n\r\n\r\n /*\r\n * Return the number of decimal places of the value of this Decimal.\r\n *\r\n */\r\n P.decimalPlaces = P.dp = function () {\r\n var w,\r\n d = this.d,\r\n n = NaN;\r\n\r\n if (d) {\r\n w = d.length - 1;\r\n n = (w - mathfloor(this.e / LOG_BASE)) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last word.\r\n w = d[w];\r\n if (w) for (; w % 10 == 0; w /= 10) n--;\r\n if (n < 0) n = 0;\r\n }\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * n / 0 = I\r\n * n / N = N\r\n * n / I = 0\r\n * 0 / n = 0\r\n * 0 / 0 = N\r\n * 0 / N = N\r\n * 0 / I = 0\r\n * N / n = N\r\n * N / 0 = N\r\n * N / N = N\r\n * N / I = N\r\n * I / n = I\r\n * I / 0 = I\r\n * I / N = N\r\n * I / I = N\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal divided by `y`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.dividedBy = P.div = function (y) {\r\n return divide(this, new this.constructor(y));\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the integer part of dividing the value of this Decimal\r\n * by the value of `y`, rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.dividedToIntegerBy = P.divToInt = function (y) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n return finalise(divide(x, new Ctor(y), 0, 1, 1), Ctor.precision, Ctor.rounding);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is equal to the value of `y`, otherwise return false.\r\n *\r\n */\r\n P.equals = P.eq = function (y) {\r\n return this.cmp(y) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the\r\n * direction of negative Infinity.\r\n *\r\n */\r\n P.floor = function () {\r\n return finalise(new this.constructor(this), this.e + 1, 3);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is greater than the value of `y`, otherwise return\r\n * false.\r\n *\r\n */\r\n P.greaterThan = P.gt = function (y) {\r\n return this.cmp(y) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is greater than or equal to the value of `y`,\r\n * otherwise return false.\r\n *\r\n */\r\n P.greaterThanOrEqualTo = P.gte = function (y) {\r\n var k = this.cmp(y);\r\n return k == 1 || k === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic cosine of the value in radians of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [1, Infinity]\r\n *\r\n * cosh(x) = 1 + x^2/2! + x^4/4! + x^6/6! + ...\r\n *\r\n * cosh(0) = 1\r\n * cosh(-0) = 1\r\n * cosh(Infinity) = Infinity\r\n * cosh(-Infinity) = Infinity\r\n * cosh(NaN) = NaN\r\n *\r\n * x time taken (ms) result\r\n * 1000 9 9.8503555700852349694e+433\r\n * 10000 25 4.4034091128314607936e+4342\r\n * 100000 171 1.4033316802130615897e+43429\r\n * 1000000 3817 1.5166076984010437725e+434294\r\n * 10000000 abandoned after 2 minute wait\r\n *\r\n * TODO? Compare performance of cosh(x) = 0.5 * (exp(x) + exp(-x))\r\n *\r\n */\r\n P.hyperbolicCosine = P.cosh = function () {\r\n var k, n, pr, rm, len,\r\n x = this,\r\n Ctor = x.constructor,\r\n one = new Ctor(1);\r\n\r\n if (!x.isFinite()) return new Ctor(x.s ? 1 / 0 : NaN);\r\n if (x.isZero()) return one;\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + 4;\r\n Ctor.rounding = 1;\r\n len = x.d.length;\r\n\r\n // Argument reduction: cos(4x) = 1 - 8cos^2(x) + 8cos^4(x) + 1\r\n // i.e. cos(x) = 1 - cos^2(x/4)(8 - 8cos^2(x/4))\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n // TODO? Estimation reused from cosine() and may not be optimal here.\r\n if (len < 32) {\r\n k = Math.ceil(len / 3);\r\n n = (1 / tinyPow(4, k)).toString();\r\n } else {\r\n k = 16;\r\n n = '2.3283064365386962890625e-10';\r\n }\r\n\r\n x = taylorSeries(Ctor, 1, x.times(n), new Ctor(1), true);\r\n\r\n // Reverse argument reduction\r\n var cosh2_x,\r\n i = k,\r\n d8 = new Ctor(8);\r\n for (; i--;) {\r\n cosh2_x = x.times(x);\r\n x = one.minus(cosh2_x.times(d8.minus(cosh2_x.times(d8))));\r\n }\r\n\r\n return finalise(x, Ctor.precision = pr, Ctor.rounding = rm, true);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic sine of the value in radians of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * sinh(x) = x + x^3/3! + x^5/5! + x^7/7! + ...\r\n *\r\n * sinh(0) = 0\r\n * sinh(-0) = -0\r\n * sinh(Infinity) = Infinity\r\n * sinh(-Infinity) = -Infinity\r\n * sinh(NaN) = NaN\r\n *\r\n * x time taken (ms)\r\n * 10 2 ms\r\n * 100 5 ms\r\n * 1000 14 ms\r\n * 10000 82 ms\r\n * 100000 886 ms 1.4033316802130615897e+43429\r\n * 200000 2613 ms\r\n * 300000 5407 ms\r\n * 400000 8824 ms\r\n * 500000 13026 ms 8.7080643612718084129e+217146\r\n * 1000000 48543 ms\r\n *\r\n * TODO? Compare performance of sinh(x) = 0.5 * (exp(x) - exp(-x))\r\n *\r\n */\r\n P.hyperbolicSine = P.sinh = function () {\r\n var k, pr, rm, len,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite() || x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + 4;\r\n Ctor.rounding = 1;\r\n len = x.d.length;\r\n\r\n if (len < 3) {\r\n x = taylorSeries(Ctor, 2, x, x, true);\r\n } else {\r\n\r\n // Alternative argument reduction: sinh(3x) = sinh(x)(3 + 4sinh^2(x))\r\n // i.e. sinh(x) = sinh(x/3)(3 + 4sinh^2(x/3))\r\n // 3 multiplications and 1 addition\r\n\r\n // Argument reduction: sinh(5x) = sinh(x)(5 + sinh^2(x)(20 + 16sinh^2(x)))\r\n // i.e. sinh(x) = sinh(x/5)(5 + sinh^2(x/5)(20 + 16sinh^2(x/5)))\r\n // 4 multiplications and 2 additions\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n k = 1.4 * Math.sqrt(len);\r\n k = k > 16 ? 16 : k | 0;\r\n\r\n x = x.times(1 / tinyPow(5, k));\r\n x = taylorSeries(Ctor, 2, x, x, true);\r\n\r\n // Reverse argument reduction\r\n var sinh2_x,\r\n d5 = new Ctor(5),\r\n d16 = new Ctor(16),\r\n d20 = new Ctor(20);\r\n for (; k--;) {\r\n sinh2_x = x.times(x);\r\n x = x.times(d5.plus(sinh2_x.times(d16.times(sinh2_x).plus(d20))));\r\n }\r\n }\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(x, pr, rm, true);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic tangent of the value in radians of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-1, 1]\r\n *\r\n * tanh(x) = sinh(x) / cosh(x)\r\n *\r\n * tanh(0) = 0\r\n * tanh(-0) = -0\r\n * tanh(Infinity) = 1\r\n * tanh(-Infinity) = -1\r\n * tanh(NaN) = NaN\r\n *\r\n */\r\n P.hyperbolicTangent = P.tanh = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(x.s);\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + 7;\r\n Ctor.rounding = 1;\r\n\r\n return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arccosine (inverse cosine) in radians of the value of\r\n * this Decimal.\r\n *\r\n * Domain: [-1, 1]\r\n * Range: [0, pi]\r\n *\r\n * acos(x) = pi/2 - asin(x)\r\n *\r\n * acos(0) = pi/2\r\n * acos(-0) = pi/2\r\n * acos(1) = 0\r\n * acos(-1) = pi\r\n * acos(1/2) = pi/3\r\n * acos(-1/2) = 2*pi/3\r\n * acos(|x| > 1) = NaN\r\n * acos(NaN) = NaN\r\n *\r\n */\r\n P.inverseCosine = P.acos = function () {\r\n var halfPi,\r\n x = this,\r\n Ctor = x.constructor,\r\n k = x.abs().cmp(1),\r\n pr = Ctor.precision,\r\n rm = Ctor.rounding;\r\n\r\n if (k !== -1) {\r\n return k === 0\r\n // |x| is 1\r\n ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0)\r\n // |x| > 1 or x is NaN\r\n : new Ctor(NaN);\r\n }\r\n\r\n if (x.isZero()) return getPi(Ctor, pr + 4, rm).times(0.5);\r\n\r\n // TODO? Special case acos(0.5) = pi/3 and acos(-0.5) = 2*pi/3\r\n\r\n Ctor.precision = pr + 6;\r\n Ctor.rounding = 1;\r\n\r\n x = x.asin();\r\n halfPi = getPi(Ctor, pr + 4, rm).times(0.5);\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return halfPi.minus(x);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic cosine in radians of the\r\n * value of this Decimal.\r\n *\r\n * Domain: [1, Infinity]\r\n * Range: [0, Infinity]\r\n *\r\n * acosh(x) = ln(x + sqrt(x^2 - 1))\r\n *\r\n * acosh(x < 1) = NaN\r\n * acosh(NaN) = NaN\r\n * acosh(Infinity) = Infinity\r\n * acosh(-Infinity) = NaN\r\n * acosh(0) = NaN\r\n * acosh(-0) = NaN\r\n * acosh(1) = 0\r\n * acosh(-1) = NaN\r\n *\r\n */\r\n P.inverseHyperbolicCosine = P.acosh = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (x.lte(1)) return new Ctor(x.eq(1) ? 0 : NaN);\r\n if (!x.isFinite()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(Math.abs(x.e), x.sd()) + 4;\r\n Ctor.rounding = 1;\r\n external = false;\r\n\r\n x = x.times(x).minus(1).sqrt().plus(x);\r\n\r\n external = true;\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.ln();\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic sine in radians of the value\r\n * of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * asinh(x) = ln(x + sqrt(x^2 + 1))\r\n *\r\n * asinh(NaN) = NaN\r\n * asinh(Infinity) = Infinity\r\n * asinh(-Infinity) = -Infinity\r\n * asinh(0) = 0\r\n * asinh(-0) = -0\r\n *\r\n */\r\n P.inverseHyperbolicSine = P.asinh = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite() || x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + 2 * Math.max(Math.abs(x.e), x.sd()) + 6;\r\n Ctor.rounding = 1;\r\n external = false;\r\n\r\n x = x.times(x).plus(1).sqrt().plus(x);\r\n\r\n external = true;\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.ln();\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic tangent in radians of the\r\n * value of this Decimal.\r\n *\r\n * Domain: [-1, 1]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * atanh(x) = 0.5 * ln((1 + x) / (1 - x))\r\n *\r\n * atanh(|x| > 1) = NaN\r\n * atanh(NaN) = NaN\r\n * atanh(Infinity) = NaN\r\n * atanh(-Infinity) = NaN\r\n * atanh(0) = 0\r\n * atanh(-0) = -0\r\n * atanh(1) = Infinity\r\n * atanh(-1) = -Infinity\r\n *\r\n */\r\n P.inverseHyperbolicTangent = P.atanh = function () {\r\n var pr, rm, wpr, xsd,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(NaN);\r\n if (x.e >= 0) return new Ctor(x.abs().eq(1) ? x.s / 0 : x.isZero() ? x : NaN);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n xsd = x.sd();\r\n\r\n if (Math.max(xsd, pr) < 2 * -x.e - 1) return finalise(new Ctor(x), pr, rm, true);\r\n\r\n Ctor.precision = wpr = xsd - x.e;\r\n\r\n x = divide(x.plus(1), new Ctor(1).minus(x), wpr + pr, 1);\r\n\r\n Ctor.precision = pr + 4;\r\n Ctor.rounding = 1;\r\n\r\n x = x.ln();\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.times(0.5);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arcsine (inverse sine) in radians of the value of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-pi/2, pi/2]\r\n *\r\n * asin(x) = 2*atan(x/(1 + sqrt(1 - x^2)))\r\n *\r\n * asin(0) = 0\r\n * asin(-0) = -0\r\n * asin(1/2) = pi/6\r\n * asin(-1/2) = -pi/6\r\n * asin(1) = pi/2\r\n * asin(-1) = -pi/2\r\n * asin(|x| > 1) = NaN\r\n * asin(NaN) = NaN\r\n *\r\n * TODO? Compare performance of Taylor series.\r\n *\r\n */\r\n P.inverseSine = P.asin = function () {\r\n var halfPi, k,\r\n pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n k = x.abs().cmp(1);\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n if (k !== -1) {\r\n\r\n // |x| is 1\r\n if (k === 0) {\r\n halfPi = getPi(Ctor, pr + 4, rm).times(0.5);\r\n halfPi.s = x.s;\r\n return halfPi;\r\n }\r\n\r\n // |x| > 1 or x is NaN\r\n return new Ctor(NaN);\r\n }\r\n\r\n // TODO? Special case asin(1/2) = pi/6 and asin(-1/2) = -pi/6\r\n\r\n Ctor.precision = pr + 6;\r\n Ctor.rounding = 1;\r\n\r\n x = x.div(new Ctor(1).minus(x.times(x)).sqrt().plus(1)).atan();\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.times(2);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arctangent (inverse tangent) in radians of the value\r\n * of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-pi/2, pi/2]\r\n *\r\n * atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ...\r\n *\r\n * atan(0) = 0\r\n * atan(-0) = -0\r\n * atan(1) = pi/4\r\n * atan(-1) = -pi/4\r\n * atan(Infinity) = pi/2\r\n * atan(-Infinity) = -pi/2\r\n * atan(NaN) = NaN\r\n *\r\n */\r\n P.inverseTangent = P.atan = function () {\r\n var i, j, k, n, px, t, r, wpr, x2,\r\n x = this,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision,\r\n rm = Ctor.rounding;\r\n\r\n if (!x.isFinite()) {\r\n if (!x.s) return new Ctor(NaN);\r\n if (pr + 4 <= PI_PRECISION) {\r\n r = getPi(Ctor, pr + 4, rm).times(0.5);\r\n r.s = x.s;\r\n return r;\r\n }\r\n } else if (x.isZero()) {\r\n return new Ctor(x);\r\n } else if (x.abs().eq(1) && pr + 4 <= PI_PRECISION) {\r\n r = getPi(Ctor, pr + 4, rm).times(0.25);\r\n r.s = x.s;\r\n return r;\r\n }\r\n\r\n Ctor.precision = wpr = pr + 10;\r\n Ctor.rounding = 1;\r\n\r\n // TODO? if (x >= 1 && pr <= PI_PRECISION) atan(x) = halfPi * x.s - atan(1 / x);\r\n\r\n // Argument reduction\r\n // Ensure |x| < 0.42\r\n // atan(x) = 2 * atan(x / (1 + sqrt(1 + x^2)))\r\n\r\n k = Math.min(28, wpr / LOG_BASE + 2 | 0);\r\n\r\n for (i = k; i; --i) x = x.div(x.times(x).plus(1).sqrt().plus(1));\r\n\r\n external = false;\r\n\r\n j = Math.ceil(wpr / LOG_BASE);\r\n n = 1;\r\n x2 = x.times(x);\r\n r = new Ctor(x);\r\n px = x;\r\n\r\n // atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ...\r\n for (; i !== -1;) {\r\n px = px.times(x2);\r\n t = r.minus(px.div(n += 2));\r\n\r\n px = px.times(x2);\r\n r = t.plus(px.div(n += 2));\r\n\r\n if (r.d[j] !== void 0) for (i = j; r.d[i] === t.d[i] && i--;);\r\n }\r\n\r\n if (k) r = r.times(2 << (k - 1));\r\n\r\n external = true;\r\n\r\n return finalise(r, Ctor.precision = pr, Ctor.rounding = rm, true);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is a finite number, otherwise return false.\r\n *\r\n */\r\n P.isFinite = function () {\r\n return !!this.d;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is an integer, otherwise return false.\r\n *\r\n */\r\n P.isInteger = P.isInt = function () {\r\n return !!this.d && mathfloor(this.e / LOG_BASE) > this.d.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is NaN, otherwise return false.\r\n *\r\n */\r\n P.isNaN = function () {\r\n return !this.s;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is negative, otherwise return false.\r\n *\r\n */\r\n P.isNegative = P.isNeg = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is positive, otherwise return false.\r\n *\r\n */\r\n P.isPositive = P.isPos = function () {\r\n return this.s > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is 0 or -0, otherwise return false.\r\n *\r\n */\r\n P.isZero = function () {\r\n return !!this.d && this.d[0] === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is less than `y`, otherwise return false.\r\n *\r\n */\r\n P.lessThan = P.lt = function (y) {\r\n return this.cmp(y) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is less than or equal to `y`, otherwise return false.\r\n *\r\n */\r\n P.lessThanOrEqualTo = P.lte = function (y) {\r\n return this.cmp(y) < 1;\r\n };\r\n\r\n\r\n /*\r\n * Return the logarithm of the value of this Decimal to the specified base, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * If no base is specified, return log[10](arg).\r\n *\r\n * log[base](arg) = ln(arg) / ln(base)\r\n *\r\n * The result will always be correctly rounded if the base of the log is 10, and 'almost always'\r\n * otherwise:\r\n *\r\n * Depending on the rounding mode, the result may be incorrectly rounded if the first fifteen\r\n * rounding digits are [49]99999999999999 or [50]00000000000000. In that case, the maximum error\r\n * between the result and the correctly rounded result will be one ulp (unit in the last place).\r\n *\r\n * log[-b](a) = NaN\r\n * log[0](a) = NaN\r\n * log[1](a) = NaN\r\n * log[NaN](a) = NaN\r\n * log[Infinity](a) = NaN\r\n * log[b](0) = -Infinity\r\n * log[b](-0) = -Infinity\r\n * log[b](-a) = NaN\r\n * log[b](1) = 0\r\n * log[b](Infinity) = Infinity\r\n * log[b](NaN) = NaN\r\n *\r\n * [base] {number|string|Decimal} The base of the logarithm.\r\n *\r\n */\r\n P.logarithm = P.log = function (base) {\r\n var isBase10, d, denominator, k, inf, num, sd, r,\r\n arg = this,\r\n Ctor = arg.constructor,\r\n pr = Ctor.precision,\r\n rm = Ctor.rounding,\r\n guard = 5;\r\n\r\n // Default base is 10.\r\n if (base == null) {\r\n base = new Ctor(10);\r\n isBase10 = true;\r\n } else {\r\n base = new Ctor(base);\r\n d = base.d;\r\n\r\n // Return NaN if base is negative, or non-finite, or is 0 or 1.\r\n if (base.s < 0 || !d || !d[0] || base.eq(1)) return new Ctor(NaN);\r\n\r\n isBase10 = base.eq(10);\r\n }\r\n\r\n d = arg.d;\r\n\r\n // Is arg negative, non-finite, 0 or 1?\r\n if (arg.s < 0 || !d || !d[0] || arg.eq(1)) {\r\n return new Ctor(d && !d[0] ? -1 / 0 : arg.s != 1 ? NaN : d ? 0 : 1 / 0);\r\n }\r\n\r\n // The result will have a non-terminating decimal expansion if base is 10 and arg is not an\r\n // integer power of 10.\r\n if (isBase10) {\r\n if (d.length > 1) {\r\n inf = true;\r\n } else {\r\n for (k = d[0]; k % 10 === 0;) k /= 10;\r\n inf = k !== 1;\r\n }\r\n }\r\n\r\n external = false;\r\n sd = pr + guard;\r\n num = naturalLogarithm(arg, sd);\r\n denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd);\r\n\r\n // The result will have 5 rounding digits.\r\n r = divide(num, denominator, sd, 1);\r\n\r\n // If at a rounding boundary, i.e. the result's rounding digits are [49]9999 or [50]0000,\r\n // calculate 10 further digits.\r\n //\r\n // If the result is known to have an infinite decimal expansion, repeat this until it is clear\r\n // that the result is above or below the boundary. Otherwise, if after calculating the 10\r\n // further digits, the last 14 are nines, round up and assume the result is exact.\r\n // Also assume the result is exact if the last 14 are zero.\r\n //\r\n // Example of a result that will be incorrectly rounded:\r\n // log[1048576](4503599627370502) = 2.60000000000000009610279511444746...\r\n // The above result correctly rounded using ROUND_CEIL to 1 decimal place should be 2.7, but it\r\n // will be given as 2.6 as there are 15 zeros immediately after the requested decimal place, so\r\n // the exact result would be assumed to be 2.6, which rounded using ROUND_CEIL to 1 decimal\r\n // place is still 2.6.\r\n if (checkRoundingDigits(r.d, k = pr, rm)) {\r\n\r\n do {\r\n sd += 10;\r\n num = naturalLogarithm(arg, sd);\r\n denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd);\r\n r = divide(num, denominator, sd, 1);\r\n\r\n if (!inf) {\r\n\r\n // Check for 14 nines from the 2nd rounding digit, as the first may be 4.\r\n if (+digitsToString(r.d).slice(k + 1, k + 15) + 1 == 1e14) {\r\n r = finalise(r, pr + 1, 0);\r\n }\r\n\r\n break;\r\n }\r\n } while (checkRoundingDigits(r.d, k += 10, rm));\r\n }\r\n\r\n external = true;\r\n\r\n return finalise(r, pr, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the maximum of the arguments and the value of this Decimal.\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n P.max = function () {\r\n Array.prototype.push.call(arguments, this);\r\n return maxOrMin(this.constructor, arguments, 'lt');\r\n };\r\n */\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the minimum of the arguments and the value of this Decimal.\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n P.min = function () {\r\n Array.prototype.push.call(arguments, this);\r\n return maxOrMin(this.constructor, arguments, 'gt');\r\n };\r\n */\r\n\r\n\r\n /*\r\n * n - 0 = n\r\n * n - N = N\r\n * n - I = -I\r\n * 0 - n = -n\r\n * 0 - 0 = 0\r\n * 0 - N = N\r\n * 0 - I = -I\r\n * N - n = N\r\n * N - 0 = N\r\n * N - N = N\r\n * N - I = N\r\n * I - n = I\r\n * I - 0 = I\r\n * I - N = N\r\n * I - I = N\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal minus `y`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.minus = P.sub = function (y) {\r\n var d, e, i, j, k, len, pr, rm, xd, xe, xLTy, yd,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n y = new Ctor(y);\r\n\r\n // If either is not finite...\r\n if (!x.d || !y.d) {\r\n\r\n // Return NaN if either is NaN.\r\n if (!x.s || !y.s) y = new Ctor(NaN);\r\n\r\n // Return y negated if x is finite and y is ±Infinity.\r\n else if (x.d) y.s = -y.s;\r\n\r\n // Return x if y is finite and x is ±Infinity.\r\n // Return x if both are ±Infinity with different signs.\r\n // Return NaN if both are ±Infinity with the same sign.\r\n else y = new Ctor(y.d || x.s !== y.s ? x : NaN);\r\n\r\n return y;\r\n }\r\n\r\n // If signs differ...\r\n if (x.s != y.s) {\r\n y.s = -y.s;\r\n return x.plus(y);\r\n }\r\n\r\n xd = x.d;\r\n yd = y.d;\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n // If either is zero...\r\n if (!xd[0] || !yd[0]) {\r\n\r\n // Return y negated if x is zero and y is non-zero.\r\n if (yd[0]) y.s = -y.s;\r\n\r\n // Return x if y is zero and x is non-zero.\r\n else if (xd[0]) y = new Ctor(x);\r\n\r\n // Return zero if both are zero.\r\n // From IEEE 754 (2008) 6.3: 0 - 0 = -0 - -0 = -0 when rounding to -Infinity.\r\n else return new Ctor(rm === 3 ? -0 : 0);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n }\r\n\r\n // x and y are finite, non-zero numbers with the same sign.\r\n\r\n // Calculate base 1e7 exponents.\r\n e = mathfloor(y.e / LOG_BASE);\r\n xe = mathfloor(x.e / LOG_BASE);\r\n\r\n xd = xd.slice();\r\n k = xe - e;\r\n\r\n // If base 1e7 exponents differ...\r\n if (k) {\r\n xLTy = k < 0;\r\n\r\n if (xLTy) {\r\n d = xd;\r\n k = -k;\r\n len = yd.length;\r\n } else {\r\n d = yd;\r\n e = xe;\r\n len = xd.length;\r\n }\r\n\r\n // Numbers with massively different exponents would result in a very high number of\r\n // zeros needing to be prepended, but this can be avoided while still ensuring correct\r\n // rounding by limiting the number of zeros to `Math.ceil(pr / LOG_BASE) + 2`.\r\n i = Math.max(Math.ceil(pr / LOG_BASE), len) + 2;\r\n\r\n if (k > i) {\r\n k = i;\r\n d.length = 1;\r\n }\r\n\r\n // Prepend zeros to equalise exponents.\r\n d.reverse();\r\n for (i = k; i--;) d.push(0);\r\n d.reverse();\r\n\r\n // Base 1e7 exponents equal.\r\n } else {\r\n\r\n // Check digits to determine which is the bigger number.\r\n\r\n i = xd.length;\r\n len = yd.length;\r\n xLTy = i < len;\r\n if (xLTy) len = i;\r\n\r\n for (i = 0; i < len; i++) {\r\n if (xd[i] != yd[i]) {\r\n xLTy = xd[i] < yd[i];\r\n break;\r\n }\r\n }\r\n\r\n k = 0;\r\n }\r\n\r\n if (xLTy) {\r\n d = xd;\r\n xd = yd;\r\n yd = d;\r\n y.s = -y.s;\r\n }\r\n\r\n len = xd.length;\r\n\r\n // Append zeros to `xd` if shorter.\r\n // Don't add zeros to `yd` if shorter as subtraction only needs to start at `yd` length.\r\n for (i = yd.length - len; i > 0; --i) xd[len++] = 0;\r\n\r\n // Subtract yd from xd.\r\n for (i = yd.length; i > k;) {\r\n\r\n if (xd[--i] < yd[i]) {\r\n for (j = i; j && xd[--j] === 0;) xd[j] = BASE - 1;\r\n --xd[j];\r\n xd[i] += BASE;\r\n }\r\n\r\n xd[i] -= yd[i];\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; xd[--len] === 0;) xd.pop();\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xd[0] === 0; xd.shift()) --e;\r\n\r\n // Zero?\r\n if (!xd[0]) return new Ctor(rm === 3 ? -0 : 0);\r\n\r\n y.d = xd;\r\n y.e = getBase10Exponent(xd, e);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n };\r\n\r\n\r\n /*\r\n * n % 0 = N\r\n * n % N = N\r\n * n % I = n\r\n * 0 % n = 0\r\n * -0 % n = -0\r\n * 0 % 0 = N\r\n * 0 % N = N\r\n * 0 % I = 0\r\n * N % n = N\r\n * N % 0 = N\r\n * N % N = N\r\n * N % I = N\r\n * I % n = N\r\n * I % 0 = N\r\n * I % N = N\r\n * I % I = N\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal modulo `y`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * The result depends on the modulo mode.\r\n *\r\n */\r\n P.modulo = P.mod = function (y) {\r\n var q,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n y = new Ctor(y);\r\n\r\n // Return NaN if x is ±Infinity or NaN, or y is NaN or ±0.\r\n if (!x.d || !y.s || y.d && !y.d[0]) return new Ctor(NaN);\r\n\r\n // Return x if y is ±Infinity or x is ±0.\r\n if (!y.d || x.d && !x.d[0]) {\r\n return finalise(new Ctor(x), Ctor.precision, Ctor.rounding);\r\n }\r\n\r\n // Prevent rounding of intermediate calculations.\r\n external = false;\r\n\r\n if (Ctor.modulo == 9) {\r\n\r\n // Euclidian division: q = sign(y) * floor(x / abs(y))\r\n // result = x - q * y where 0 <= result < abs(y)\r\n q = divide(x, y.abs(), 0, 3, 1);\r\n q.s *= y.s;\r\n } else {\r\n q = divide(x, y, 0, Ctor.modulo, 1);\r\n }\r\n\r\n q = q.times(y);\r\n\r\n external = true;\r\n\r\n return x.minus(q);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural exponential of the value of this Decimal,\r\n * i.e. the base e raised to the power the value of this Decimal, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.naturalExponential = P.exp = function () {\r\n return naturalExponential(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural logarithm of the value of this Decimal,\r\n * rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.naturalLogarithm = P.ln = function () {\r\n return naturalLogarithm(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal negated, i.e. as if multiplied by\r\n * -1.\r\n *\r\n */\r\n P.negated = P.neg = function () {\r\n var x = new this.constructor(this);\r\n x.s = -x.s;\r\n return finalise(x);\r\n };\r\n\r\n\r\n /*\r\n * n + 0 = n\r\n * n + N = N\r\n * n + I = I\r\n * 0 + n = n\r\n * 0 + 0 = 0\r\n * 0 + N = N\r\n * 0 + I = I\r\n * N + n = N\r\n * N + 0 = N\r\n * N + N = N\r\n * N + I = N\r\n * I + n = I\r\n * I + 0 = I\r\n * I + N = N\r\n * I + I = I\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal plus `y`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.plus = P.add = function (y) {\r\n var carry, d, e, i, k, len, pr, rm, xd, yd,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n y = new Ctor(y);\r\n\r\n // If either is not finite...\r\n if (!x.d || !y.d) {\r\n\r\n // Return NaN if either is NaN.\r\n if (!x.s || !y.s) y = new Ctor(NaN);\r\n\r\n // Return x if y is finite and x is ±Infinity.\r\n // Return x if both are ±Infinity with the same sign.\r\n // Return NaN if both are ±Infinity with different signs.\r\n // Return y if x is finite and y is ±Infinity.\r\n else if (!x.d) y = new Ctor(y.d || x.s === y.s ? x : NaN);\r\n\r\n return y;\r\n }\r\n\r\n // If signs differ...\r\n if (x.s != y.s) {\r\n y.s = -y.s;\r\n return x.minus(y);\r\n }\r\n\r\n xd = x.d;\r\n yd = y.d;\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n // If either is zero...\r\n if (!xd[0] || !yd[0]) {\r\n\r\n // Return x if y is zero.\r\n // Return y if y is non-zero.\r\n if (!yd[0]) y = new Ctor(x);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n }\r\n\r\n // x and y are finite, non-zero numbers with the same sign.\r\n\r\n // Calculate base 1e7 exponents.\r\n k = mathfloor(x.e / LOG_BASE);\r\n e = mathfloor(y.e / LOG_BASE);\r\n\r\n xd = xd.slice();\r\n i = k - e;\r\n\r\n // If base 1e7 exponents differ...\r\n if (i) {\r\n\r\n if (i < 0) {\r\n d = xd;\r\n i = -i;\r\n len = yd.length;\r\n } else {\r\n d = yd;\r\n e = k;\r\n len = xd.length;\r\n }\r\n\r\n // Limit number of zeros prepended to max(ceil(pr / LOG_BASE), len) + 1.\r\n k = Math.ceil(pr / LOG_BASE);\r\n len = k > len ? k + 1 : len + 1;\r\n\r\n if (i > len) {\r\n i = len;\r\n d.length = 1;\r\n }\r\n\r\n // Prepend zeros to equalise exponents. Note: Faster to use reverse then do unshifts.\r\n d.reverse();\r\n for (; i--;) d.push(0);\r\n d.reverse();\r\n }\r\n\r\n len = xd.length;\r\n i = yd.length;\r\n\r\n // If yd is longer than xd, swap xd and yd so xd points to the longer array.\r\n if (len - i < 0) {\r\n i = len;\r\n d = yd;\r\n yd = xd;\r\n xd = d;\r\n }\r\n\r\n // Only start adding at yd.length - 1 as the further digits of xd can be left as they are.\r\n for (carry = 0; i;) {\r\n carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE | 0;\r\n xd[i] %= BASE;\r\n }\r\n\r\n if (carry) {\r\n xd.unshift(carry);\r\n ++e;\r\n }\r\n\r\n // Remove trailing zeros.\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n for (len = xd.length; xd[--len] == 0;) xd.pop();\r\n\r\n y.d = xd;\r\n y.e = getBase10Exponent(xd, e);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return the number of significant digits of the value of this Decimal.\r\n *\r\n * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0.\r\n *\r\n */\r\n P.precision = P.sd = function (z) {\r\n var k,\r\n x = this;\r\n\r\n if (z !== void 0 && z !== !!z && z !== 1 && z !== 0) throw Error(invalidArgument + z);\r\n\r\n if (x.d) {\r\n k = getPrecision(x.d);\r\n if (z && x.e + 1 > k) k = x.e + 1;\r\n } else {\r\n k = NaN;\r\n }\r\n\r\n return k;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a whole number using\r\n * rounding mode `rounding`.\r\n *\r\n */\r\n P.round = function () {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n return finalise(new Ctor(x), x.e + 1, Ctor.rounding);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the sine of the value in radians of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-1, 1]\r\n *\r\n * sin(x) = x - x^3/3! + x^5/5! - ...\r\n *\r\n * sin(0) = 0\r\n * sin(-0) = -0\r\n * sin(Infinity) = NaN\r\n * sin(-Infinity) = NaN\r\n * sin(NaN) = NaN\r\n *\r\n */\r\n P.sine = P.sin = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(NaN);\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE;\r\n Ctor.rounding = 1;\r\n\r\n x = sine(Ctor, toLessThanHalfPi(Ctor, x));\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(quadrant > 2 ? x.neg() : x, pr, rm, true);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the square root of this Decimal, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * sqrt(-n) = N\r\n * sqrt(N) = N\r\n * sqrt(-I) = N\r\n * sqrt(I) = I\r\n * sqrt(0) = 0\r\n * sqrt(-0) = -0\r\n *\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var m, n, sd, r, rep, t,\r\n x = this,\r\n d = x.d,\r\n e = x.e,\r\n s = x.s,\r\n Ctor = x.constructor;\r\n\r\n // Negative/NaN/Infinity/zero?\r\n if (s !== 1 || !d || !d[0]) {\r\n return new Ctor(!s || s < 0 && (!d || d[0]) ? NaN : d ? x : 1 / 0);\r\n }\r\n\r\n external = false;\r\n\r\n // Initial estimate.\r\n s = Math.sqrt(+x);\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if (s == 0 || s == 1 / 0) {\r\n n = digitsToString(d);\r\n\r\n if ((n.length + e) % 2 == 0) n += '0';\r\n s = Math.sqrt(n);\r\n e = mathfloor((e + 1) / 2) - (e < 0 || e % 2);\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new Ctor(n);\r\n } else {\r\n r = new Ctor(s.toString());\r\n }\r\n\r\n sd = (e = Ctor.precision) + 3;\r\n\r\n // Newton-Raphson iteration.\r\n for (;;) {\r\n t = r;\r\n r = t.plus(divide(x, t, sd + 2, 1)).times(0.5);\r\n\r\n // TODO? Replace with for-loop and checkRoundingDigits.\r\n if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) {\r\n n = n.slice(sd - 3, sd + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or\r\n // 4999, i.e. approaching a rounding boundary, continue the iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the exact result as the\r\n // nines may infinitely repeat.\r\n if (!rep) {\r\n finalise(t, e + 1, 0);\r\n\r\n if (t.times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n sd += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result.\r\n // If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n finalise(r, e + 1, 1);\r\n m = !r.times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n external = true;\r\n\r\n return finalise(r, e, Ctor.rounding, m);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the tangent of the value in radians of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * tan(0) = 0\r\n * tan(-0) = -0\r\n * tan(Infinity) = NaN\r\n * tan(-Infinity) = NaN\r\n * tan(NaN) = NaN\r\n *\r\n */\r\n P.tangent = P.tan = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(NaN);\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + 10;\r\n Ctor.rounding = 1;\r\n\r\n x = x.sin();\r\n x.s = 1;\r\n x = divide(x, new Ctor(1).minus(x.times(x)).sqrt(), pr + 10, 0);\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(quadrant == 2 || quadrant == 4 ? x.neg() : x, pr, rm, true);\r\n };\r\n\r\n\r\n /*\r\n * n * 0 = 0\r\n * n * N = N\r\n * n * I = I\r\n * 0 * n = 0\r\n * 0 * 0 = 0\r\n * 0 * N = N\r\n * 0 * I = N\r\n * N * n = N\r\n * N * 0 = N\r\n * N * N = N\r\n * N * I = N\r\n * I * n = I\r\n * I * 0 = N\r\n * I * N = N\r\n * I * I = I\r\n *\r\n * Return a new Decimal whose value is this Decimal times `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.times = P.mul = function (y) {\r\n var carry, e, i, k, r, rL, t, xdL, ydL,\r\n x = this,\r\n Ctor = x.constructor,\r\n xd = x.d,\r\n yd = (y = new Ctor(y)).d;\r\n\r\n y.s *= x.s;\r\n\r\n // If either is NaN, ±Infinity or ±0...\r\n if (!xd || !xd[0] || !yd || !yd[0]) {\r\n\r\n return new Ctor(!y.s || xd && !xd[0] && !yd || yd && !yd[0] && !xd\r\n\r\n // Return NaN if either is NaN.\r\n // Return NaN if x is ±0 and y is ±Infinity, or y is ±0 and x is ±Infinity.\r\n ? NaN\r\n\r\n // Return ±Infinity if either is ±Infinity.\r\n // Return ±0 if either is ±0.\r\n : !xd || !yd ? y.s / 0 : y.s * 0);\r\n }\r\n\r\n e = mathfloor(x.e / LOG_BASE) + mathfloor(y.e / LOG_BASE);\r\n xdL = xd.length;\r\n ydL = yd.length;\r\n\r\n // Ensure xd points to the longer array.\r\n if (xdL < ydL) {\r\n r = xd;\r\n xd = yd;\r\n yd = r;\r\n rL = xdL;\r\n xdL = ydL;\r\n ydL = rL;\r\n }\r\n\r\n // Initialise the result array with zeros.\r\n r = [];\r\n rL = xdL + ydL;\r\n for (i = rL; i--;) r.push(0);\r\n\r\n // Multiply!\r\n for (i = ydL; --i >= 0;) {\r\n carry = 0;\r\n for (k = xdL + i; k > i;) {\r\n t = r[k] + yd[i] * xd[k - i - 1] + carry;\r\n r[k--] = t % BASE | 0;\r\n carry = t / BASE | 0;\r\n }\r\n\r\n r[k] = (r[k] + carry) % BASE | 0;\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; !r[--rL];) r.pop();\r\n\r\n if (carry) ++e;\r\n else r.shift();\r\n\r\n y.d = r;\r\n y.e = getBase10Exponent(r, e);\r\n\r\n return external ? finalise(y, Ctor.precision, Ctor.rounding) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in base 2, round to `sd` significant\r\n * digits using rounding mode `rm`.\r\n *\r\n * If the optional `sd` argument is present then return binary exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toBinary = function (sd, rm) {\r\n return toStringBinary(this, 2, sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `dp`\r\n * decimal places using rounding mode `rm` or `rounding` if `rm` is omitted.\r\n *\r\n * If `dp` is omitted, return a new Decimal whose value is the value of this Decimal.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toDecimalPlaces = P.toDP = function (dp, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n x = new Ctor(x);\r\n if (dp === void 0) return x;\r\n\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n return finalise(x, dp + x.e + 1, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in exponential notation rounded to\r\n * `dp` fixed decimal places using rounding mode `rounding`.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toExponential = function (dp, rm) {\r\n var str,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (dp === void 0) {\r\n str = finiteToString(x, true);\r\n } else {\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n x = finalise(new Ctor(x), dp + 1, rm);\r\n str = finiteToString(x, true, dp + 1);\r\n }\r\n\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in normal (fixed-point) notation to\r\n * `dp` fixed decimal places and rounded using rounding mode `rm` or `rounding` if `rm` is\r\n * omitted.\r\n *\r\n * As with JavaScript numbers, (-0).toFixed(0) is '0', but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\r\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\r\n * (-0).toFixed(3) is '0.000'.\r\n * (-0.5).toFixed(0) is '-0'.\r\n *\r\n */\r\n P.toFixed = function (dp, rm) {\r\n var str, y,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (dp === void 0) {\r\n str = finiteToString(x);\r\n } else {\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n y = finalise(new Ctor(x), dp + x.e + 1, rm);\r\n str = finiteToString(y, false, dp + y.e + 1);\r\n }\r\n\r\n // To determine whether to add the minus sign look at the value before it was rounded,\r\n // i.e. look at `x` rather than `y`.\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n * Return an array representing the value of this Decimal as a simple fraction with an integer\r\n * numerator and an integer denominator.\r\n *\r\n * The denominator will be a positive non-zero value less than or equal to the specified maximum\r\n * denominator. If a maximum denominator is not specified, the denominator will be the lowest\r\n * value necessary to represent the number exactly.\r\n *\r\n * [maxD] {number|string|Decimal} Maximum denominator. Integer >= 1 and < Infinity.\r\n *\r\n */\r\n P.toFraction = function (maxD) {\r\n var d, d0, d1, d2, e, k, n, n0, n1, pr, q, r,\r\n x = this,\r\n xd = x.d,\r\n Ctor = x.constructor;\r\n\r\n if (!xd) return new Ctor(x);\r\n\r\n n1 = d0 = new Ctor(1);\r\n d1 = n0 = new Ctor(0);\r\n\r\n d = new Ctor(d1);\r\n e = d.e = getPrecision(xd) - x.e - 1;\r\n k = e % LOG_BASE;\r\n d.d[0] = mathpow(10, k < 0 ? LOG_BASE + k : k);\r\n\r\n if (maxD == null) {\r\n\r\n // d is 10**e, the minimum max-denominator needed.\r\n maxD = e > 0 ? d : n1;\r\n } else {\r\n n = new Ctor(maxD);\r\n if (!n.isInt() || n.lt(n1)) throw Error(invalidArgument + n);\r\n maxD = n.gt(d) ? (e > 0 ? d : n1) : n;\r\n }\r\n\r\n external = false;\r\n n = new Ctor(digitsToString(xd));\r\n pr = Ctor.precision;\r\n Ctor.precision = e = xd.length * LOG_BASE * 2;\r\n\r\n for (;;) {\r\n q = divide(n, d, 0, 1, 1);\r\n d2 = d0.plus(q.times(d1));\r\n if (d2.cmp(maxD) == 1) break;\r\n d0 = d1;\r\n d1 = d2;\r\n d2 = n1;\r\n n1 = n0.plus(q.times(d2));\r\n n0 = d2;\r\n d2 = d;\r\n d = n.minus(q.times(d2));\r\n n = d2;\r\n }\r\n\r\n d2 = divide(maxD.minus(d0), d1, 0, 1, 1);\r\n n0 = n0.plus(d2.times(n1));\r\n d0 = d0.plus(d2.times(d1));\r\n n0.s = n1.s = x.s;\r\n\r\n // Determine which fraction is closer to x, n0/d0 or n1/d1?\r\n r = divide(n1, d1, e, 1).minus(x).abs().cmp(divide(n0, d0, e, 1).minus(x).abs()) < 1\r\n ? [n1, d1] : [n0, d0];\r\n\r\n Ctor.precision = pr;\r\n external = true;\r\n\r\n return r;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in base 16, round to `sd` significant\r\n * digits using rounding mode `rm`.\r\n *\r\n * If the optional `sd` argument is present then return binary exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toHexadecimal = P.toHex = function (sd, rm) {\r\n return toStringBinary(this, 16, sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Returns a new Decimal whose value is the nearest multiple of `y` in the direction of rounding\r\n * mode `rm`, or `Decimal.rounding` if `rm` is omitted, to the value of this Decimal.\r\n *\r\n * The return value will always have the same sign as this Decimal, unless either this Decimal\r\n * or `y` is NaN, in which case the return value will be also be NaN.\r\n *\r\n * The return value is not affected by the value of `precision`.\r\n *\r\n * y {number|string|Decimal} The magnitude to round to a multiple of.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toNearest() rounding mode not an integer: {rm}'\r\n * 'toNearest() rounding mode out of range: {rm}'\r\n *\r\n */\r\n P.toNearest = function (y, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n x = new Ctor(x);\r\n\r\n if (y == null) {\r\n\r\n // If x is not finite, return x.\r\n if (!x.d) return x;\r\n\r\n y = new Ctor(1);\r\n rm = Ctor.rounding;\r\n } else {\r\n y = new Ctor(y);\r\n if (rm === void 0) {\r\n rm = Ctor.rounding;\r\n } else {\r\n checkInt32(rm, 0, 8);\r\n }\r\n\r\n // If x is not finite, return x if y is not NaN, else NaN.\r\n if (!x.d) return y.s ? x : y;\r\n\r\n // If y is not finite, return Infinity with the sign of x if y is Infinity, else NaN.\r\n if (!y.d) {\r\n if (y.s) y.s = x.s;\r\n return y;\r\n }\r\n }\r\n\r\n // If y is not zero, calculate the nearest multiple of y to x.\r\n if (y.d[0]) {\r\n external = false;\r\n x = divide(x, y, 0, rm, 1).times(y);\r\n external = true;\r\n finalise(x);\r\n\r\n // If y is zero, return zero with the sign of x.\r\n } else {\r\n y.s = x.s;\r\n x = y;\r\n }\r\n\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this Decimal converted to a number primitive.\r\n * Zero keeps its sign.\r\n *\r\n */\r\n P.toNumber = function () {\r\n return +this;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in base 8, round to `sd` significant\r\n * digits using rounding mode `rm`.\r\n *\r\n * If the optional `sd` argument is present then return binary exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toOctal = function (sd, rm) {\r\n return toStringBinary(this, 8, sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal raised to the power `y`, rounded\r\n * to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * ECMAScript compliant.\r\n *\r\n * pow(x, NaN) = NaN\r\n * pow(x, ±0) = 1\r\n\r\n * pow(NaN, non-zero) = NaN\r\n * pow(abs(x) > 1, +Infinity) = +Infinity\r\n * pow(abs(x) > 1, -Infinity) = +0\r\n * pow(abs(x) == 1, ±Infinity) = NaN\r\n * pow(abs(x) < 1, +Infinity) = +0\r\n * pow(abs(x) < 1, -Infinity) = +Infinity\r\n * pow(+Infinity, y > 0) = +Infinity\r\n * pow(+Infinity, y < 0) = +0\r\n * pow(-Infinity, odd integer > 0) = -Infinity\r\n * pow(-Infinity, even integer > 0) = +Infinity\r\n * pow(-Infinity, odd integer < 0) = -0\r\n * pow(-Infinity, even integer < 0) = +0\r\n * pow(+0, y > 0) = +0\r\n * pow(+0, y < 0) = +Infinity\r\n * pow(-0, odd integer > 0) = -0\r\n * pow(-0, even integer > 0) = +0\r\n * pow(-0, odd integer < 0) = -Infinity\r\n * pow(-0, even integer < 0) = +Infinity\r\n * pow(finite x < 0, finite non-integer) = NaN\r\n *\r\n * For non-integer or very large exponents pow(x, y) is calculated using\r\n *\r\n * x^y = exp(y*ln(x))\r\n *\r\n * Assuming the first 15 rounding digits are each equally likely to be any digit 0-9, the\r\n * probability of an incorrectly rounded result\r\n * P([49]9{14} | [50]0{14}) = 2 * 0.2 * 10^-14 = 4e-15 = 1/2.5e+14\r\n * i.e. 1 in 250,000,000,000,000\r\n *\r\n * If a result is incorrectly rounded the maximum error will be 1 ulp (unit in last place).\r\n *\r\n * y {number|string|Decimal} The power to which to raise this Decimal.\r\n *\r\n */\r\n P.toPower = P.pow = function (y) {\r\n var e, k, pr, r, rm, s,\r\n x = this,\r\n Ctor = x.constructor,\r\n yn = +(y = new Ctor(y));\r\n\r\n // Either ±Infinity, NaN or ±0?\r\n if (!x.d || !y.d || !x.d[0] || !y.d[0]) return new Ctor(mathpow(+x, yn));\r\n\r\n x = new Ctor(x);\r\n\r\n if (x.eq(1)) return x;\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n if (y.eq(1)) return finalise(x, pr, rm);\r\n\r\n // y exponent\r\n e = mathfloor(y.e / LOG_BASE);\r\n\r\n // If y is a small integer use the 'exponentiation by squaring' algorithm.\r\n if (e >= y.d.length - 1 && (k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) {\r\n r = intPow(Ctor, x, k, pr);\r\n return y.s < 0 ? new Ctor(1).div(r) : finalise(r, pr, rm);\r\n }\r\n\r\n s = x.s;\r\n\r\n // if x is negative\r\n if (s < 0) {\r\n\r\n // if y is not an integer\r\n if (e < y.d.length - 1) return new Ctor(NaN);\r\n\r\n // Result is positive if x is negative and the last digit of integer y is even.\r\n if ((y.d[e] & 1) == 0) s = 1;\r\n\r\n // if x.eq(-1)\r\n if (x.e == 0 && x.d[0] == 1 && x.d.length == 1) {\r\n x.s = s;\r\n return x;\r\n }\r\n }\r\n\r\n // Estimate result exponent.\r\n // x^y = 10^e, where e = y * log10(x)\r\n // log10(x) = log10(x_significand) + x_exponent\r\n // log10(x_significand) = ln(x_significand) / ln(10)\r\n k = mathpow(+x, yn);\r\n e = k == 0 || !isFinite(k)\r\n ? mathfloor(yn * (Math.log('0.' + digitsToString(x.d)) / Math.LN10 + x.e + 1))\r\n : new Ctor(k + '').e;\r\n\r\n // Exponent estimate may be incorrect e.g. x: 0.999999999999999999, y: 2.29, e: 0, r.e: -1.\r\n\r\n // Overflow/underflow?\r\n if (e > Ctor.maxE + 1 || e < Ctor.minE - 1) return new Ctor(e > 0 ? s / 0 : 0);\r\n\r\n external = false;\r\n Ctor.rounding = x.s = 1;\r\n\r\n // Estimate the extra guard digits needed to ensure five correct rounding digits from\r\n // naturalLogarithm(x). Example of failure without these extra digits (precision: 10):\r\n // new Decimal(2.32456).pow('2087987436534566.46411')\r\n // should be 1.162377823e+764914905173815, but is 1.162355823e+764914905173815\r\n k = Math.min(12, (e + '').length);\r\n\r\n // r = x^y = exp(y*ln(x))\r\n r = naturalExponential(y.times(naturalLogarithm(x, pr + k)), pr);\r\n\r\n // r may be Infinity, e.g. (0.9999999999999999).pow(-1e+40)\r\n if (r.d) {\r\n\r\n // Truncate to the required precision plus five rounding digits.\r\n r = finalise(r, pr + 5, 1);\r\n\r\n // If the rounding digits are [49]9999 or [50]0000 increase the precision by 10 and recalculate\r\n // the result.\r\n if (checkRoundingDigits(r.d, pr, rm)) {\r\n e = pr + 10;\r\n\r\n // Truncate to the increased precision plus five rounding digits.\r\n r = finalise(naturalExponential(y.times(naturalLogarithm(x, e + k)), e), e + 5, 1);\r\n\r\n // Check for 14 nines from the 2nd rounding digit (the first rounding digit may be 4 or 9).\r\n if (+digitsToString(r.d).slice(pr + 1, pr + 15) + 1 == 1e14) {\r\n r = finalise(r, pr + 1, 0);\r\n }\r\n }\r\n }\r\n\r\n r.s = s;\r\n external = true;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(r, pr, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal rounded to `sd` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * Return exponential notation if `sd` is less than the number of digits necessary to represent\r\n * the integer part of the value in normal notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toPrecision = function (sd, rm) {\r\n var str,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (sd === void 0) {\r\n str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);\r\n } else {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n x = finalise(new Ctor(x), sd, rm);\r\n str = finiteToString(x, sd <= x.e || x.e <= Ctor.toExpNeg, sd);\r\n }\r\n\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `sd`\r\n * significant digits using rounding mode `rm`, or to `precision` and `rounding` respectively if\r\n * omitted.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toSD() digits out of range: {sd}'\r\n * 'toSD() digits not an integer: {sd}'\r\n * 'toSD() rounding mode not an integer: {rm}'\r\n * 'toSD() rounding mode out of range: {rm}'\r\n *\r\n */\r\n P.toSignificantDigits = P.toSD = function (sd, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n if (sd === void 0) {\r\n sd = Ctor.precision;\r\n rm = Ctor.rounding;\r\n } else {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n }\r\n\r\n return finalise(new Ctor(x), sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal.\r\n *\r\n * Return exponential notation if this Decimal has a positive exponent equal to or greater than\r\n * `toExpPos`, or a negative exponent equal to or less than `toExpNeg`.\r\n *\r\n */\r\n P.toString = function () {\r\n var x = this,\r\n Ctor = x.constructor,\r\n str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);\r\n\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal truncated to a whole number.\r\n *\r\n */\r\n P.truncated = P.trunc = function () {\r\n return finalise(new this.constructor(this), this.e + 1, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal.\r\n * Unlike `toString`, negative zero will include the minus sign.\r\n *\r\n */\r\n P.valueOf = P.toJSON = function () {\r\n var x = this,\r\n Ctor = x.constructor,\r\n str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);\r\n\r\n return x.isNeg() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n // Add aliases to match BigDecimal method names.\r\n // P.add = P.plus;\r\n P.subtract = P.minus;\r\n P.multiply = P.times;\r\n P.divide = P.div;\r\n P.remainder = P.mod;\r\n P.compareTo = P.cmp;\r\n P.negate = P.neg;\r\n */\r\n\r\n\r\n // Helper functions for Decimal.prototype (P) and/or Decimal methods, and their callers.\r\n\r\n\r\n /*\r\n * digitsToString P.cubeRoot, P.logarithm, P.squareRoot, P.toFraction, P.toPower,\r\n * finiteToString, naturalExponential, naturalLogarithm\r\n * checkInt32 P.toDecimalPlaces, P.toExponential, P.toFixed, P.toNearest,\r\n * P.toPrecision, P.toSignificantDigits, toStringBinary, random\r\n * checkRoundingDigits P.logarithm, P.toPower, naturalExponential, naturalLogarithm\r\n * convertBase toStringBinary, parseOther\r\n * cos P.cos\r\n * divide P.atanh, P.cubeRoot, P.dividedBy, P.dividedToIntegerBy,\r\n * P.logarithm, P.modulo, P.squareRoot, P.tan, P.tanh, P.toFraction,\r\n * P.toNearest, toStringBinary, naturalExponential, naturalLogarithm,\r\n * taylorSeries, atan2, parseOther\r\n * finalise P.absoluteValue, P.atan, P.atanh, P.ceil, P.cos, P.cosh,\r\n * P.cubeRoot, P.dividedToIntegerBy, P.floor, P.logarithm, P.minus,\r\n * P.modulo, P.negated, P.plus, P.round, P.sin, P.sinh, P.squareRoot,\r\n * P.tan, P.times, P.toDecimalPlaces, P.toExponential, P.toFixed,\r\n * P.toNearest, P.toPower, P.toPrecision, P.toSignificantDigits,\r\n * P.truncated, divide, getLn10, getPi, naturalExponential,\r\n * naturalLogarithm, ceil, floor, round, trunc\r\n * finiteToString P.toExponential, P.toFixed, P.toPrecision, P.toString, P.valueOf,\r\n * toStringBinary\r\n * getBase10Exponent P.minus, P.plus, P.times, parseOther\r\n * getLn10 P.logarithm, naturalLogarithm\r\n * getPi P.acos, P.asin, P.atan, toLessThanHalfPi, atan2\r\n * getPrecision P.precision, P.toFraction\r\n * getZeroString digitsToString, finiteToString\r\n * intPow P.toPower, parseOther\r\n * isOdd toLessThanHalfPi\r\n * maxOrMin max, min\r\n * naturalExponential P.naturalExponential, P.toPower\r\n * naturalLogarithm P.acosh, P.asinh, P.atanh, P.logarithm, P.naturalLogarithm,\r\n * P.toPower, naturalExponential\r\n * nonFiniteToString finiteToString, toStringBinary\r\n * parseDecimal Decimal\r\n * parseOther Decimal\r\n * sin P.sin\r\n * taylorSeries P.cosh, P.sinh, cos, sin\r\n * toLessThanHalfPi P.cos, P.sin\r\n * toStringBinary P.toBinary, P.toHexadecimal, P.toOctal\r\n * truncate intPow\r\n *\r\n * Throws: P.logarithm, P.precision, P.toFraction, checkInt32, getLn10, getPi,\r\n * naturalLogarithm, config, parseOther, random, Decimal\r\n */\r\n\r\n\r\n function digitsToString(d) {\r\n var i, k, ws,\r\n indexOfLastWord = d.length - 1,\r\n str = '',\r\n w = d[0];\r\n\r\n if (indexOfLastWord > 0) {\r\n str += w;\r\n for (i = 1; i < indexOfLastWord; i++) {\r\n ws = d[i] + '';\r\n k = LOG_BASE - ws.length;\r\n if (k) str += getZeroString(k);\r\n str += ws;\r\n }\r\n\r\n w = d[i];\r\n ws = w + '';\r\n k = LOG_BASE - ws.length;\r\n if (k) str += getZeroString(k);\r\n } else if (w === 0) {\r\n return '0';\r\n }\r\n\r\n // Remove trailing zeros of last w.\r\n for (; w % 10 === 0;) w /= 10;\r\n\r\n return str + w;\r\n }\r\n\r\n\r\n function checkInt32(i, min, max) {\r\n if (i !== ~~i || i < min || i > max) {\r\n throw Error(invalidArgument + i);\r\n }\r\n }\r\n\r\n\r\n /*\r\n * Check 5 rounding digits if `repeating` is null, 4 otherwise.\r\n * `repeating == null` if caller is `log` or `pow`,\r\n * `repeating != null` if caller is `naturalLogarithm` or `naturalExponential`.\r\n */\r\n function checkRoundingDigits(d, i, rm, repeating) {\r\n var di, k, r, rd;\r\n\r\n // Get the length of the first word of the array d.\r\n for (k = d[0]; k >= 10; k /= 10) --i;\r\n\r\n // Is the rounding digit in the first word of d?\r\n if (--i < 0) {\r\n i += LOG_BASE;\r\n di = 0;\r\n } else {\r\n di = Math.ceil((i + 1) / LOG_BASE);\r\n i %= LOG_BASE;\r\n }\r\n\r\n // i is the index (0 - 6) of the rounding digit.\r\n // E.g. if within the word 3487563 the first rounding digit is 5,\r\n // then i = 4, k = 1000, rd = 3487563 % 1000 = 563\r\n k = mathpow(10, LOG_BASE - i);\r\n rd = d[di] % k | 0;\r\n\r\n if (repeating == null) {\r\n if (i < 3) {\r\n if (i == 0) rd = rd / 100 | 0;\r\n else if (i == 1) rd = rd / 10 | 0;\r\n r = rm < 4 && rd == 99999 || rm > 3 && rd == 49999 || rd == 50000 || rd == 0;\r\n } else {\r\n r = (rm < 4 && rd + 1 == k || rm > 3 && rd + 1 == k / 2) &&\r\n (d[di + 1] / k / 100 | 0) == mathpow(10, i - 2) - 1 ||\r\n (rd == k / 2 || rd == 0) && (d[di + 1] / k / 100 | 0) == 0;\r\n }\r\n } else {\r\n if (i < 4) {\r\n if (i == 0) rd = rd / 1000 | 0;\r\n else if (i == 1) rd = rd / 100 | 0;\r\n else if (i == 2) rd = rd / 10 | 0;\r\n r = (repeating || rm < 4) && rd == 9999 || !repeating && rm > 3 && rd == 4999;\r\n } else {\r\n r = ((repeating || rm < 4) && rd + 1 == k ||\r\n (!repeating && rm > 3) && rd + 1 == k / 2) &&\r\n (d[di + 1] / k / 1000 | 0) == mathpow(10, i - 3) - 1;\r\n }\r\n }\r\n\r\n return r;\r\n }\r\n\r\n\r\n // Convert string of `baseIn` to an array of numbers of `baseOut`.\r\n // Eg. convertBase('255', 10, 16) returns [15, 15].\r\n // Eg. convertBase('ff', 16, 10) returns [2, 5, 5].\r\n function convertBase(str, baseIn, baseOut) {\r\n var j,\r\n arr = [0],\r\n arrL,\r\n i = 0,\r\n strL = str.length;\r\n\r\n for (; i < strL;) {\r\n for (arrL = arr.length; arrL--;) arr[arrL] *= baseIn;\r\n arr[0] += NUMERALS.indexOf(str.charAt(i++));\r\n for (j = 0; j < arr.length; j++) {\r\n if (arr[j] > baseOut - 1) {\r\n if (arr[j + 1] === void 0) arr[j + 1] = 0;\r\n arr[j + 1] += arr[j] / baseOut | 0;\r\n arr[j] %= baseOut;\r\n }\r\n }\r\n }\r\n\r\n return arr.reverse();\r\n }\r\n\r\n\r\n /*\r\n * cos(x) = 1 - x^2/2! + x^4/4! - ...\r\n * |x| < pi/2\r\n *\r\n */\r\n function cosine(Ctor, x) {\r\n var k, y,\r\n len = x.d.length;\r\n\r\n // Argument reduction: cos(4x) = 8*(cos^4(x) - cos^2(x)) + 1\r\n // i.e. cos(x) = 8*(cos^4(x/4) - cos^2(x/4)) + 1\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n if (len < 32) {\r\n k = Math.ceil(len / 3);\r\n y = (1 / tinyPow(4, k)).toString();\r\n } else {\r\n k = 16;\r\n y = '2.3283064365386962890625e-10';\r\n }\r\n\r\n Ctor.precision += k;\r\n\r\n x = taylorSeries(Ctor, 1, x.times(y), new Ctor(1));\r\n\r\n // Reverse argument reduction\r\n for (var i = k; i--;) {\r\n var cos2x = x.times(x);\r\n x = cos2x.times(cos2x).minus(cos2x).times(8).plus(1);\r\n }\r\n\r\n Ctor.precision -= k;\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Perform division in the specified base.\r\n */\r\n var divide = (function () {\r\n\r\n // Assumes non-zero x and k, and hence non-zero result.\r\n function multiplyInteger(x, k, base) {\r\n var temp,\r\n carry = 0,\r\n i = x.length;\r\n\r\n for (x = x.slice(); i--;) {\r\n temp = x[i] * k + carry;\r\n x[i] = temp % base | 0;\r\n carry = temp / base | 0;\r\n }\r\n\r\n if (carry) x.unshift(carry);\r\n\r\n return x;\r\n }\r\n\r\n function compare(a, b, aL, bL) {\r\n var i, r;\r\n\r\n if (aL != bL) {\r\n r = aL > bL ? 1 : -1;\r\n } else {\r\n for (i = r = 0; i < aL; i++) {\r\n if (a[i] != b[i]) {\r\n r = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return r;\r\n }\r\n\r\n function subtract(a, b, aL, base) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for (; aL--;) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * base + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for (; !a[0] && a.length > 1;) a.shift();\r\n }\r\n\r\n return function (x, y, pr, rm, dp, base) {\r\n var cmp, e, i, k, logBase, more, prod, prodL, q, qd, rem, remL, rem0, sd, t, xi, xL, yd0,\r\n yL, yz,\r\n Ctor = x.constructor,\r\n sign = x.s == y.s ? 1 : -1,\r\n xd = x.d,\r\n yd = y.d;\r\n\r\n // Either NaN, Infinity or 0?\r\n if (!xd || !xd[0] || !yd || !yd[0]) {\r\n\r\n return new Ctor(// Return NaN if either NaN, or both Infinity or 0.\r\n !x.s || !y.s || (xd ? yd && xd[0] == yd[0] : !yd) ? NaN :\r\n\r\n // Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.\r\n xd && xd[0] == 0 || !yd ? sign * 0 : sign / 0);\r\n }\r\n\r\n if (base) {\r\n logBase = 1;\r\n e = x.e - y.e;\r\n } else {\r\n base = BASE;\r\n logBase = LOG_BASE;\r\n e = mathfloor(x.e / logBase) - mathfloor(y.e / logBase);\r\n }\r\n\r\n yL = yd.length;\r\n xL = xd.length;\r\n q = new Ctor(sign);\r\n qd = q.d = [];\r\n\r\n // Result exponent may be one less than e.\r\n // The digit array of a Decimal from toStringBinary may have trailing zeros.\r\n for (i = 0; yd[i] == (xd[i] || 0); i++);\r\n\r\n if (yd[i] > (xd[i] || 0)) e--;\r\n\r\n if (pr == null) {\r\n sd = pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n } else if (dp) {\r\n sd = pr + (x.e - y.e) + 1;\r\n } else {\r\n sd = pr;\r\n }\r\n\r\n if (sd < 0) {\r\n qd.push(1);\r\n more = true;\r\n } else {\r\n\r\n // Convert precision in number of base 10 digits to base 1e7 digits.\r\n sd = sd / logBase + 2 | 0;\r\n i = 0;\r\n\r\n // divisor < 1e7\r\n if (yL == 1) {\r\n k = 0;\r\n yd = yd[0];\r\n sd++;\r\n\r\n // k is the carry.\r\n for (; (i < xL || k) && sd--; i++) {\r\n t = k * base + (xd[i] || 0);\r\n qd[i] = t / yd | 0;\r\n k = t % yd | 0;\r\n }\r\n\r\n more = k || i < xL;\r\n\r\n // divisor >= 1e7\r\n } else {\r\n\r\n // Normalise xd and yd so highest order digit of yd is >= base/2\r\n k = base / (yd[0] + 1) | 0;\r\n\r\n if (k > 1) {\r\n yd = multiplyInteger(yd, k, base);\r\n xd = multiplyInteger(xd, k, base);\r\n yL = yd.length;\r\n xL = xd.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xd.slice(0, yL);\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; remL < yL;) rem[remL++] = 0;\r\n\r\n yz = yd.slice();\r\n yz.unshift(0);\r\n yd0 = yd[0];\r\n\r\n if (yd[1] >= base / 2) ++yd0;\r\n\r\n do {\r\n k = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare(yd, rem, yL, remL);\r\n\r\n // If divisor < remainder.\r\n if (cmp < 0) {\r\n\r\n // Calculate trial digit, k.\r\n rem0 = rem[0];\r\n if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);\r\n\r\n // k will be how many times the divisor goes into the current remainder.\r\n k = rem0 / yd0 | 0;\r\n\r\n // Algorithm:\r\n // 1. product = divisor * trial digit (k)\r\n // 2. if product > remainder: product -= divisor, k--\r\n // 3. remainder -= product\r\n // 4. if product was < remainder at 2:\r\n // 5. compare new remainder and divisor\r\n // 6. If remainder > divisor: remainder -= divisor, k++\r\n\r\n if (k > 1) {\r\n if (k >= base) k = base - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiplyInteger(yd, k, base);\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n cmp = compare(prod, rem, prodL, remL);\r\n\r\n // product > remainder.\r\n if (cmp == 1) {\r\n k--;\r\n\r\n // Subtract divisor from product.\r\n subtract(prod, yL < prodL ? yz : yd, prodL, base);\r\n }\r\n } else {\r\n\r\n // cmp is -1.\r\n // If k is 0, there is no need to compare yd and rem again below, so change cmp to 1\r\n // to avoid it. If k is 1 there is a need to compare yd and rem again below.\r\n if (k == 0) cmp = k = 1;\r\n prod = yd.slice();\r\n }\r\n\r\n prodL = prod.length;\r\n if (prodL < remL) prod.unshift(0);\r\n\r\n // Subtract product from remainder.\r\n subtract(rem, prod, remL, base);\r\n\r\n // If product was < previous remainder.\r\n if (cmp == -1) {\r\n remL = rem.length;\r\n\r\n // Compare divisor and new remainder.\r\n cmp = compare(yd, rem, yL, remL);\r\n\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n if (cmp < 1) {\r\n k++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract(rem, yL < remL ? yz : yd, remL, base);\r\n }\r\n }\r\n\r\n remL = rem.length;\r\n } else if (cmp === 0) {\r\n k++;\r\n rem = [0];\r\n } // if cmp === 1, k will be 0\r\n\r\n // Add the next digit, k, to the result array.\r\n qd[i++] = k;\r\n\r\n // Update the remainder.\r\n if (cmp && rem[0]) {\r\n rem[remL++] = xd[xi] || 0;\r\n } else {\r\n rem = [xd[xi]];\r\n remL = 1;\r\n }\r\n\r\n } while ((xi++ < xL || rem[0] !== void 0) && sd--);\r\n\r\n more = rem[0] !== void 0;\r\n }\r\n\r\n // Leading zero?\r\n if (!qd[0]) qd.shift();\r\n }\r\n\r\n // logBase is 1 when divide is being used for base conversion.\r\n if (logBase == 1) {\r\n q.e = e;\r\n inexact = more;\r\n } else {\r\n\r\n // To calculate q.e, first get the number of digits of qd[0].\r\n for (i = 1, k = qd[0]; k >= 10; k /= 10) i++;\r\n q.e = i + e * logBase - 1;\r\n\r\n finalise(q, dp ? pr + q.e + 1 : pr, rm, more);\r\n }\r\n\r\n return q;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Round `x` to `sd` significant digits using rounding mode `rm`.\r\n * Check for over/under-flow.\r\n */\r\n function finalise(x, sd, rm, isTruncated) {\r\n var digits, i, j, k, rd, roundUp, w, xd, xdi,\r\n Ctor = x.constructor;\r\n\r\n // Don't round if sd is null or undefined.\r\n out: if (sd != null) {\r\n xd = x.d;\r\n\r\n // Infinity/NaN.\r\n if (!xd) return x;\r\n\r\n // rd: the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // w: the word of xd containing rd, a base 1e7 number.\r\n // xdi: the index of w within xd.\r\n // digits: the number of digits of w.\r\n // i: what would be the index of rd within w if all the numbers were 7 digits long (i.e. if\r\n // they had leading zeros)\r\n // j: if > 0, the actual index of rd within w (if < 0, rd is a leading zero).\r\n\r\n // Get the length of the first word of the digits array xd.\r\n for (digits = 1, k = xd[0]; k >= 10; k /= 10) digits++;\r\n i = sd - digits;\r\n\r\n // Is the rounding digit in the first word of xd?\r\n if (i < 0) {\r\n i += LOG_BASE;\r\n j = sd;\r\n w = xd[xdi = 0];\r\n\r\n // Get the rounding digit at index j of w.\r\n rd = w / mathpow(10, digits - j - 1) % 10 | 0;\r\n } else {\r\n xdi = Math.ceil((i + 1) / LOG_BASE);\r\n k = xd.length;\r\n if (xdi >= k) {\r\n if (isTruncated) {\r\n\r\n // Needed by `naturalExponential`, `naturalLogarithm` and `squareRoot`.\r\n for (; k++ <= xdi;) xd.push(0);\r\n w = rd = 0;\r\n digits = 1;\r\n i %= LOG_BASE;\r\n j = i - LOG_BASE + 1;\r\n } else {\r\n break out;\r\n }\r\n } else {\r\n w = k = xd[xdi];\r\n\r\n // Get the number of digits of w.\r\n for (digits = 1; k >= 10; k /= 10) digits++;\r\n\r\n // Get the index of rd within w.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within w, adjusted for leading zeros.\r\n // The number of leading zeros of w is given by LOG_BASE - digits.\r\n j = i - LOG_BASE + digits;\r\n\r\n // Get the rounding digit at index j of w.\r\n rd = j < 0 ? 0 : w / mathpow(10, digits - j - 1) % 10 | 0;\r\n }\r\n }\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n isTruncated = isTruncated || sd < 0 ||\r\n xd[xdi + 1] !== void 0 || (j < 0 ? w : w % mathpow(10, digits - j - 1));\r\n\r\n // The expression `w % mathpow(10, digits - j - 1)` returns all the digits of w to the right\r\n // of the digit at (left-to-right) index j, e.g. if w is 908714 and j is 2, the expression\r\n // will give 714.\r\n\r\n roundUp = rm < 4\r\n ? (rd || isTruncated) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : rd > 5 || rd == 5 && (rm == 4 || isTruncated || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ((i > 0 ? j > 0 ? w / mathpow(10, digits - j) : 0 : xd[xdi - 1]) % 10) & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n if (sd < 1 || !xd[0]) {\r\n xd.length = 0;\r\n if (roundUp) {\r\n\r\n // Convert sd to decimal places.\r\n sd -= x.e + 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xd[0] = mathpow(10, (LOG_BASE - sd % LOG_BASE) % LOG_BASE);\r\n x.e = -sd || 0;\r\n } else {\r\n\r\n // Zero.\r\n xd[0] = x.e = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if (i == 0) {\r\n xd.length = xdi;\r\n k = 1;\r\n xdi--;\r\n } else {\r\n xd.length = xdi + 1;\r\n k = mathpow(10, LOG_BASE - i);\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of w.\r\n xd[xdi] = j > 0 ? (w / mathpow(10, digits - j) % mathpow(10, j) | 0) * k : 0;\r\n }\r\n\r\n if (roundUp) {\r\n for (;;) {\r\n\r\n // Is the digit to be rounded up in the first word of xd?\r\n if (xdi == 0) {\r\n\r\n // i will be the length of xd[0] before k is added.\r\n for (i = 1, j = xd[0]; j >= 10; j /= 10) i++;\r\n j = xd[0] += k;\r\n for (k = 1; j >= 10; j /= 10) k++;\r\n\r\n // if i != k the length has increased.\r\n if (i != k) {\r\n x.e++;\r\n if (xd[0] == BASE) xd[0] = 1;\r\n }\r\n\r\n break;\r\n } else {\r\n xd[xdi] += k;\r\n if (xd[xdi] != BASE) break;\r\n xd[xdi--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xd.length; xd[--i] === 0;) xd.pop();\r\n }\r\n\r\n if (external) {\r\n\r\n // Overflow?\r\n if (x.e > Ctor.maxE) {\r\n\r\n // Infinity.\r\n x.d = null;\r\n x.e = NaN;\r\n\r\n // Underflow?\r\n } else if (x.e < Ctor.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n // Ctor.underflow = true;\r\n } // else Ctor.underflow = false;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n function finiteToString(x, isExp, sd) {\r\n if (!x.isFinite()) return nonFiniteToString(x);\r\n var k,\r\n e = x.e,\r\n str = digitsToString(x.d),\r\n len = str.length;\r\n\r\n if (isExp) {\r\n if (sd && (k = sd - len) > 0) {\r\n str = str.charAt(0) + '.' + str.slice(1) + getZeroString(k);\r\n } else if (len > 1) {\r\n str = str.charAt(0) + '.' + str.slice(1);\r\n }\r\n\r\n str = str + (x.e < 0 ? 'e' : 'e+') + x.e;\r\n } else if (e < 0) {\r\n str = '0.' + getZeroString(-e - 1) + str;\r\n if (sd && (k = sd - len) > 0) str += getZeroString(k);\r\n } else if (e >= len) {\r\n str += getZeroString(e + 1 - len);\r\n if (sd && (k = sd - e - 1) > 0) str = str + '.' + getZeroString(k);\r\n } else {\r\n if ((k = e + 1) < len) str = str.slice(0, k) + '.' + str.slice(k);\r\n if (sd && (k = sd - len) > 0) {\r\n if (e + 1 === len) str += '.';\r\n str += getZeroString(k);\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n\r\n // Calculate the base 10 exponent from the base 1e7 exponent.\r\n function getBase10Exponent(digits, e) {\r\n var w = digits[0];\r\n\r\n // Add the number of digits of the first word of the digits array.\r\n for ( e *= LOG_BASE; w >= 10; w /= 10) e++;\r\n return e;\r\n }\r\n\r\n\r\n function getLn10(Ctor, sd, pr) {\r\n if (sd > LN10_PRECISION) {\r\n\r\n // Reset global state in case the exception is caught.\r\n external = true;\r\n if (pr) Ctor.precision = pr;\r\n throw Error(precisionLimitExceeded);\r\n }\r\n return finalise(new Ctor(LN10), sd, 1, true);\r\n }\r\n\r\n\r\n function getPi(Ctor, sd, rm) {\r\n if (sd > PI_PRECISION) throw Error(precisionLimitExceeded);\r\n return finalise(new Ctor(PI), sd, rm, true);\r\n }\r\n\r\n\r\n function getPrecision(digits) {\r\n var w = digits.length - 1,\r\n len = w * LOG_BASE + 1;\r\n\r\n w = digits[w];\r\n\r\n // If non-zero...\r\n if (w) {\r\n\r\n // Subtract the number of trailing zeros of the last word.\r\n for (; w % 10 == 0; w /= 10) len--;\r\n\r\n // Add the number of digits of the first word.\r\n for (w = digits[0]; w >= 10; w /= 10) len++;\r\n }\r\n\r\n return len;\r\n }\r\n\r\n\r\n function getZeroString(k) {\r\n var zs = '';\r\n for (; k--;) zs += '0';\r\n return zs;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of Decimal `x` to the power `n`, where `n` is an\r\n * integer of type number.\r\n *\r\n * Implements 'exponentiation by squaring'. Called by `pow` and `parseOther`.\r\n *\r\n */\r\n function intPow(Ctor, x, n, pr) {\r\n var isTruncated,\r\n r = new Ctor(1),\r\n\r\n // Max n of 9007199254740991 takes 53 loop iterations.\r\n // Maximum digits array length; leaves [28, 34] guard digits.\r\n k = Math.ceil(pr / LOG_BASE + 4);\r\n\r\n external = false;\r\n\r\n for (;;) {\r\n if (n % 2) {\r\n r = r.times(x);\r\n if (truncate(r.d, k)) isTruncated = true;\r\n }\r\n\r\n n = mathfloor(n / 2);\r\n if (n === 0) {\r\n\r\n // To ensure correct rounding when r.d is truncated, increment the last word if it is zero.\r\n n = r.d.length - 1;\r\n if (isTruncated && r.d[n] === 0) ++r.d[n];\r\n break;\r\n }\r\n\r\n x = x.times(x);\r\n truncate(x.d, k);\r\n }\r\n\r\n external = true;\r\n\r\n return r;\r\n }\r\n\r\n\r\n function isOdd(n) {\r\n return n.d[n.d.length - 1] & 1;\r\n }\r\n\r\n\r\n /*\r\n * Handle `max` and `min`. `ltgt` is 'lt' or 'gt'.\r\n */\r\n function maxOrMin(Ctor, args, ltgt) {\r\n var y,\r\n x = new Ctor(args[0]),\r\n i = 0;\r\n\r\n for (; ++i < args.length;) {\r\n y = new Ctor(args[i]);\r\n if (!y.s) {\r\n x = y;\r\n break;\r\n } else if (x[ltgt](y)) {\r\n x = y;\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural exponential of `x` rounded to `sd` significant\r\n * digits.\r\n *\r\n * Taylor/Maclaurin series.\r\n *\r\n * exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! + ...\r\n *\r\n * Argument reduction:\r\n * Repeat x = x / 32, k += 5, until |x| < 0.1\r\n * exp(x) = exp(x / 2^k)^(2^k)\r\n *\r\n * Previously, the argument was initially reduced by\r\n * exp(x) = exp(r) * 10^k where r = x - k * ln10, k = floor(x / ln10)\r\n * to first put r in the range [0, ln10], before dividing by 32 until |x| < 0.1, but this was\r\n * found to be slower than just dividing repeatedly by 32 as above.\r\n *\r\n * Max integer argument: exp('20723265836946413') = 6.3e+9000000000000000\r\n * Min integer argument: exp('-20723265836946411') = 1.2e-9000000000000000\r\n * (Math object integer min/max: Math.exp(709) = 8.2e+307, Math.exp(-745) = 5e-324)\r\n *\r\n * exp(Infinity) = Infinity\r\n * exp(-Infinity) = 0\r\n * exp(NaN) = NaN\r\n * exp(±0) = 1\r\n *\r\n * exp(x) is non-terminating for any finite, non-zero x.\r\n *\r\n * The result will always be correctly rounded.\r\n *\r\n */\r\n function naturalExponential(x, sd) {\r\n var denominator, guard, j, pow, sum, t, wpr,\r\n rep = 0,\r\n i = 0,\r\n k = 0,\r\n Ctor = x.constructor,\r\n rm = Ctor.rounding,\r\n pr = Ctor.precision;\r\n\r\n // 0/NaN/Infinity?\r\n if (!x.d || !x.d[0] || x.e > 17) {\r\n\r\n return new Ctor(x.d\r\n ? !x.d[0] ? 1 : x.s < 0 ? 0 : 1 / 0\r\n : x.s ? x.s < 0 ? 0 : x : 0 / 0);\r\n }\r\n\r\n if (sd == null) {\r\n external = false;\r\n wpr = pr;\r\n } else {\r\n wpr = sd;\r\n }\r\n\r\n t = new Ctor(0.03125);\r\n\r\n // while abs(x) >= 0.1\r\n while (x.e > -2) {\r\n\r\n // x = x / 2^5\r\n x = x.times(t);\r\n k += 5;\r\n }\r\n\r\n // Use 2 * log10(2^k) + 5 (empirically derived) to estimate the increase in precision\r\n // necessary to ensure the first 4 rounding digits are correct.\r\n guard = Math.log(mathpow(2, k)) / Math.LN10 * 2 + 5 | 0;\r\n wpr += guard;\r\n denominator = pow = sum = new Ctor(1);\r\n Ctor.precision = wpr;\r\n\r\n for (;;) {\r\n pow = finalise(pow.times(x), wpr, 1);\r\n denominator = denominator.times(++i);\r\n t = sum.plus(divide(pow, denominator, wpr, 1));\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {\r\n j = k;\r\n while (j--) sum = finalise(sum.times(sum), wpr, 1);\r\n\r\n // Check to see if the first 4 rounding digits are [49]999.\r\n // If so, repeat the summation with a higher precision, otherwise\r\n // e.g. with precision: 18, rounding: 1\r\n // exp(18.404272462595034083567793919843761) = 98372560.1229999999 (should be 98372560.123)\r\n // `wpr - guard` is the index of first rounding digit.\r\n if (sd == null) {\r\n\r\n if (rep < 3 && checkRoundingDigits(sum.d, wpr - guard, rm, rep)) {\r\n Ctor.precision = wpr += 10;\r\n denominator = pow = t = new Ctor(1);\r\n i = 0;\r\n rep++;\r\n } else {\r\n return finalise(sum, Ctor.precision = pr, rm, external = true);\r\n }\r\n } else {\r\n Ctor.precision = pr;\r\n return sum;\r\n }\r\n }\r\n\r\n sum = t;\r\n }\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural logarithm of `x` rounded to `sd` significant\r\n * digits.\r\n *\r\n * ln(-n) = NaN\r\n * ln(0) = -Infinity\r\n * ln(-0) = -Infinity\r\n * ln(1) = 0\r\n * ln(Infinity) = Infinity\r\n * ln(-Infinity) = NaN\r\n * ln(NaN) = NaN\r\n *\r\n * ln(n) (n != 1) is non-terminating.\r\n *\r\n */\r\n function naturalLogarithm(y, sd) {\r\n var c, c0, denominator, e, numerator, rep, sum, t, wpr, x1, x2,\r\n n = 1,\r\n guard = 10,\r\n x = y,\r\n xd = x.d,\r\n Ctor = x.constructor,\r\n rm = Ctor.rounding,\r\n pr = Ctor.precision;\r\n\r\n // Is x negative or Infinity, NaN, 0 or 1?\r\n if (x.s < 0 || !xd || !xd[0] || !x.e && xd[0] == 1 && xd.length == 1) {\r\n return new Ctor(xd && !xd[0] ? -1 / 0 : x.s != 1 ? NaN : xd ? 0 : x);\r\n }\r\n\r\n if (sd == null) {\r\n external = false;\r\n wpr = pr;\r\n } else {\r\n wpr = sd;\r\n }\r\n\r\n Ctor.precision = wpr += guard;\r\n c = digitsToString(xd);\r\n c0 = c.charAt(0);\r\n\r\n if (Math.abs(e = x.e) < 1.5e15) {\r\n\r\n // Argument reduction.\r\n // The series converges faster the closer the argument is to 1, so using\r\n // ln(a^b) = b * ln(a), ln(a) = ln(a^b) / b\r\n // multiply the argument by itself until the leading digits of the significand are 7, 8, 9,\r\n // 10, 11, 12 or 13, recording the number of multiplications so the sum of the series can\r\n // later be divided by this number, then separate out the power of 10 using\r\n // ln(a*10^b) = ln(a) + b*ln(10).\r\n\r\n // max n is 21 (gives 0.9, 1.0 or 1.1) (9e15 / 21 = 4.2e14).\r\n //while (c0 < 9 && c0 != 1 || c0 == 1 && c.charAt(1) > 1) {\r\n // max n is 6 (gives 0.7 - 1.3)\r\n while (c0 < 7 && c0 != 1 || c0 == 1 && c.charAt(1) > 3) {\r\n x = x.times(y);\r\n c = digitsToString(x.d);\r\n c0 = c.charAt(0);\r\n n++;\r\n }\r\n\r\n e = x.e;\r\n\r\n if (c0 > 1) {\r\n x = new Ctor('0.' + c);\r\n e++;\r\n } else {\r\n x = new Ctor(c0 + '.' + c.slice(1));\r\n }\r\n } else {\r\n\r\n // The argument reduction method above may result in overflow if the argument y is a massive\r\n // number with exponent >= 1500000000000000 (9e15 / 6 = 1.5e15), so instead recall this\r\n // function using ln(x*10^e) = ln(x) + e*ln(10).\r\n t = getLn10(Ctor, wpr + 2, pr).times(e + '');\r\n x = naturalLogarithm(new Ctor(c0 + '.' + c.slice(1)), wpr - guard).plus(t);\r\n Ctor.precision = pr;\r\n\r\n return sd == null ? finalise(x, pr, rm, external = true) : x;\r\n }\r\n\r\n // x1 is x reduced to a value near 1.\r\n x1 = x;\r\n\r\n // Taylor series.\r\n // ln(y) = ln((1 + x)/(1 - x)) = 2(x + x^3/3 + x^5/5 + x^7/7 + ...)\r\n // where x = (y - 1)/(y + 1) (|x| < 1)\r\n sum = numerator = x = divide(x.minus(1), x.plus(1), wpr, 1);\r\n x2 = finalise(x.times(x), wpr, 1);\r\n denominator = 3;\r\n\r\n for (;;) {\r\n numerator = finalise(numerator.times(x2), wpr, 1);\r\n t = sum.plus(divide(numerator, new Ctor(denominator), wpr, 1));\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {\r\n sum = sum.times(2);\r\n\r\n // Reverse the argument reduction. Check that e is not 0 because, besides preventing an\r\n // unnecessary calculation, -0 + 0 = +0 and to ensure correct rounding -0 needs to stay -0.\r\n if (e !== 0) sum = sum.plus(getLn10(Ctor, wpr + 2, pr).times(e + ''));\r\n sum = divide(sum, new Ctor(n), wpr, 1);\r\n\r\n // Is rm > 3 and the first 4 rounding digits 4999, or rm < 4 (or the summation has\r\n // been repeated previously) and the first 4 rounding digits 9999?\r\n // If so, restart the summation with a higher precision, otherwise\r\n // e.g. with precision: 12, rounding: 1\r\n // ln(135520028.6126091714265381533) = 18.7246299999 when it should be 18.72463.\r\n // `wpr - guard` is the index of first rounding digit.\r\n if (sd == null) {\r\n if (checkRoundingDigits(sum.d, wpr - guard, rm, rep)) {\r\n Ctor.precision = wpr += guard;\r\n t = numerator = x = divide(x1.minus(1), x1.plus(1), wpr, 1);\r\n x2 = finalise(x.times(x), wpr, 1);\r\n denominator = rep = 1;\r\n } else {\r\n return finalise(sum, Ctor.precision = pr, rm, external = true);\r\n }\r\n } else {\r\n Ctor.precision = pr;\r\n return sum;\r\n }\r\n }\r\n\r\n sum = t;\r\n denominator += 2;\r\n }\r\n }\r\n\r\n\r\n // ±Infinity, NaN.\r\n function nonFiniteToString(x) {\r\n // Unsigned.\r\n return String(x.s * x.s / 0);\r\n }\r\n\r\n\r\n /*\r\n * Parse the value of a new Decimal `x` from string `str`.\r\n */\r\n function parseDecimal(x, str) {\r\n var e, i, len;\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(len - 1) === 48; --len);\r\n str = str.slice(i, len);\r\n\r\n if (str) {\r\n len -= i;\r\n x.e = e = e - i - 1;\r\n x.d = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first word of the digits array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE;\r\n\r\n if (i < len) {\r\n if (i) x.d.push(+str.slice(0, i));\r\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--;) str += '0';\r\n x.d.push(+str);\r\n\r\n if (external) {\r\n\r\n // Overflow?\r\n if (x.e > x.constructor.maxE) {\r\n\r\n // Infinity.\r\n x.d = null;\r\n x.e = NaN;\r\n\r\n // Underflow?\r\n } else if (x.e < x.constructor.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n // x.constructor.underflow = true;\r\n } // else x.constructor.underflow = false;\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Parse the value of a new Decimal `x` from a string `str`, which is not a decimal value.\r\n */\r\n function parseOther(x, str) {\r\n var base, Ctor, divisor, i, isFloat, len, p, xd, xe;\r\n\r\n if (str === 'Infinity' || str === 'NaN') {\r\n if (!+str) x.s = NaN;\r\n x.e = NaN;\r\n x.d = null;\r\n return x;\r\n }\r\n\r\n if (isHex.test(str)) {\r\n base = 16;\r\n str = str.toLowerCase();\r\n } else if (isBinary.test(str)) {\r\n base = 2;\r\n } else if (isOctal.test(str)) {\r\n base = 8;\r\n } else {\r\n throw Error(invalidArgument + str);\r\n }\r\n\r\n // Is there a binary exponent part?\r\n i = str.search(/p/i);\r\n\r\n if (i > 0) {\r\n p = +str.slice(i + 1);\r\n str = str.substring(2, i);\r\n } else {\r\n str = str.slice(2);\r\n }\r\n\r\n // Convert `str` as an integer then divide the result by `base` raised to a power such that the\r\n // fraction part will be restored.\r\n i = str.indexOf('.');\r\n isFloat = i >= 0;\r\n Ctor = x.constructor;\r\n\r\n if (isFloat) {\r\n str = str.replace('.', '');\r\n len = str.length;\r\n i = len - i;\r\n\r\n // log[10](16) = 1.2041... , log[10](88) = 1.9444....\r\n divisor = intPow(Ctor, new Ctor(base), i, i * 2);\r\n }\r\n\r\n xd = convertBase(str, base, BASE);\r\n xe = xd.length - 1;\r\n\r\n // Remove trailing zeros.\r\n for (i = xe; xd[i] === 0; --i) xd.pop();\r\n if (i < 0) return new Ctor(x.s * 0);\r\n x.e = getBase10Exponent(xd, xe);\r\n x.d = xd;\r\n external = false;\r\n\r\n // At what precision to perform the division to ensure exact conversion?\r\n // maxDecimalIntegerPartDigitCount = ceil(log[10](b) * otherBaseIntegerPartDigitCount)\r\n // log[10](2) = 0.30103, log[10](8) = 0.90309, log[10](16) = 1.20412\r\n // E.g. ceil(1.2 * 3) = 4, so up to 4 decimal digits are needed to represent 3 hex int digits.\r\n // maxDecimalFractionPartDigitCount = {Hex:4|Oct:3|Bin:1} * otherBaseFractionPartDigitCount\r\n // Therefore using 4 * the number of digits of str will always be enough.\r\n if (isFloat) x = divide(x, divisor, len * 4);\r\n\r\n // Multiply by the binary exponent part if present.\r\n if (p) x = x.times(Math.abs(p) < 54 ? mathpow(2, p) : Decimal.pow(2, p));\r\n external = true;\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * sin(x) = x - x^3/3! + x^5/5! - ...\r\n * |x| < pi/2\r\n *\r\n */\r\n function sine(Ctor, x) {\r\n var k,\r\n len = x.d.length;\r\n\r\n if (len < 3) return taylorSeries(Ctor, 2, x, x);\r\n\r\n // Argument reduction: sin(5x) = 16*sin^5(x) - 20*sin^3(x) + 5*sin(x)\r\n // i.e. sin(x) = 16*sin^5(x/5) - 20*sin^3(x/5) + 5*sin(x/5)\r\n // and sin(x) = sin(x/5)(5 + sin^2(x/5)(16sin^2(x/5) - 20))\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n k = 1.4 * Math.sqrt(len);\r\n k = k > 16 ? 16 : k | 0;\r\n\r\n x = x.times(1 / tinyPow(5, k));\r\n x = taylorSeries(Ctor, 2, x, x);\r\n\r\n // Reverse argument reduction\r\n var sin2_x,\r\n d5 = new Ctor(5),\r\n d16 = new Ctor(16),\r\n d20 = new Ctor(20);\r\n for (; k--;) {\r\n sin2_x = x.times(x);\r\n x = x.times(d5.plus(sin2_x.times(d16.times(sin2_x).minus(d20))));\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n // Calculate Taylor series for `cos`, `cosh`, `sin` and `sinh`.\r\n function taylorSeries(Ctor, n, x, y, isHyperbolic) {\r\n var j, t, u, x2,\r\n i = 1,\r\n pr = Ctor.precision,\r\n k = Math.ceil(pr / LOG_BASE);\r\n\r\n external = false;\r\n x2 = x.times(x);\r\n u = new Ctor(y);\r\n\r\n for (;;) {\r\n t = divide(u.times(x2), new Ctor(n++ * n++), pr, 1);\r\n u = isHyperbolic ? y.plus(t) : y.minus(t);\r\n y = divide(t.times(x2), new Ctor(n++ * n++), pr, 1);\r\n t = u.plus(y);\r\n\r\n if (t.d[k] !== void 0) {\r\n for (j = k; t.d[j] === u.d[j] && j--;);\r\n if (j == -1) break;\r\n }\r\n\r\n j = u;\r\n u = y;\r\n y = t;\r\n t = j;\r\n i++;\r\n }\r\n\r\n external = true;\r\n t.d.length = k + 1;\r\n\r\n return t;\r\n }\r\n\r\n\r\n // Exponent e must be positive and non-zero.\r\n function tinyPow(b, e) {\r\n var n = b;\r\n while (--e) n *= b;\r\n return n;\r\n }\r\n\r\n\r\n // Return the absolute value of `x` reduced to less than or equal to half pi.\r\n function toLessThanHalfPi(Ctor, x) {\r\n var t,\r\n isNeg = x.s < 0,\r\n pi = getPi(Ctor, Ctor.precision, 1),\r\n halfPi = pi.times(0.5);\r\n\r\n x = x.abs();\r\n\r\n if (x.lte(halfPi)) {\r\n quadrant = isNeg ? 4 : 1;\r\n return x;\r\n }\r\n\r\n t = x.divToInt(pi);\r\n\r\n if (t.isZero()) {\r\n quadrant = isNeg ? 3 : 2;\r\n } else {\r\n x = x.minus(t.times(pi));\r\n\r\n // 0 <= x < pi\r\n if (x.lte(halfPi)) {\r\n quadrant = isOdd(t) ? (isNeg ? 2 : 3) : (isNeg ? 4 : 1);\r\n return x;\r\n }\r\n\r\n quadrant = isOdd(t) ? (isNeg ? 1 : 4) : (isNeg ? 3 : 2);\r\n }\r\n\r\n return x.minus(pi).abs();\r\n }\r\n\r\n\r\n /*\r\n * Return the value of Decimal `x` as a string in base `baseOut`.\r\n *\r\n * If the optional `sd` argument is present include a binary exponent suffix.\r\n */\r\n function toStringBinary(x, baseOut, sd, rm) {\r\n var base, e, i, k, len, roundUp, str, xd, y,\r\n Ctor = x.constructor,\r\n isExp = sd !== void 0;\r\n\r\n if (isExp) {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n } else {\r\n sd = Ctor.precision;\r\n rm = Ctor.rounding;\r\n }\r\n\r\n if (!x.isFinite()) {\r\n str = nonFiniteToString(x);\r\n } else {\r\n str = finiteToString(x);\r\n i = str.indexOf('.');\r\n\r\n // Use exponential notation according to `toExpPos` and `toExpNeg`? No, but if required:\r\n // maxBinaryExponent = floor((decimalExponent + 1) * log[2](10))\r\n // minBinaryExponent = floor(decimalExponent * log[2](10))\r\n // log[2](10) = 3.321928094887362347870319429489390175864\r\n\r\n if (isExp) {\r\n base = 2;\r\n if (baseOut == 16) {\r\n sd = sd * 4 - 3;\r\n } else if (baseOut == 8) {\r\n sd = sd * 3 - 2;\r\n }\r\n } else {\r\n base = baseOut;\r\n }\r\n\r\n // Convert the number as an integer then divide the result by its base raised to a power such\r\n // that the fraction part will be restored.\r\n\r\n // Non-integer.\r\n if (i >= 0) {\r\n str = str.replace('.', '');\r\n y = new Ctor(1);\r\n y.e = str.length - i;\r\n y.d = convertBase(finiteToString(y), 10, base);\r\n y.e = y.d.length;\r\n }\r\n\r\n xd = convertBase(str, 10, base);\r\n e = len = xd.length;\r\n\r\n // Remove trailing zeros.\r\n for (; xd[--len] == 0;) xd.pop();\r\n\r\n if (!xd[0]) {\r\n str = isExp ? '0p+0' : '0';\r\n } else {\r\n if (i < 0) {\r\n e--;\r\n } else {\r\n x = new Ctor(x);\r\n x.d = xd;\r\n x.e = e;\r\n x = divide(x, y, sd, rm, 0, base);\r\n xd = x.d;\r\n e = x.e;\r\n roundUp = inexact;\r\n }\r\n\r\n // The rounding digit, i.e. the digit after the digit that may be rounded up.\r\n i = xd[sd];\r\n k = base / 2;\r\n roundUp = roundUp || xd[sd + 1] !== void 0;\r\n\r\n roundUp = rm < 4\r\n ? (i !== void 0 || roundUp) && (rm === 0 || rm === (x.s < 0 ? 3 : 2))\r\n : i > k || i === k && (rm === 4 || roundUp || rm === 6 && xd[sd - 1] & 1 ||\r\n rm === (x.s < 0 ? 8 : 7));\r\n\r\n xd.length = sd;\r\n\r\n if (roundUp) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up and so on.\r\n for (; ++xd[--sd] > base - 1;) {\r\n xd[sd] = 0;\r\n if (!sd) {\r\n ++e;\r\n xd.unshift(1);\r\n }\r\n }\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (len = xd.length; !xd[len - 1]; --len);\r\n\r\n // E.g. [4, 11, 15] becomes 4bf.\r\n for (i = 0, str = ''; i < len; i++) str += NUMERALS.charAt(xd[i]);\r\n\r\n // Add binary exponent suffix?\r\n if (isExp) {\r\n if (len > 1) {\r\n if (baseOut == 16 || baseOut == 8) {\r\n i = baseOut == 16 ? 4 : 3;\r\n for (--len; len % i; len++) str += '0';\r\n xd = convertBase(str, base, baseOut);\r\n for (len = xd.length; !xd[len - 1]; --len);\r\n\r\n // xd[0] will always be be 1\r\n for (i = 1, str = '1.'; i < len; i++) str += NUMERALS.charAt(xd[i]);\r\n } else {\r\n str = str.charAt(0) + '.' + str.slice(1);\r\n }\r\n }\r\n\r\n str = str + (e < 0 ? 'p' : 'p+') + e;\r\n } else if (e < 0) {\r\n for (; ++e;) str = '0' + str;\r\n str = '0.' + str;\r\n } else {\r\n if (++e > len) for (e -= len; e-- ;) str += '0';\r\n else if (e < len) str = str.slice(0, e) + '.' + str.slice(e);\r\n }\r\n }\r\n\r\n str = (baseOut == 16 ? '0x' : baseOut == 2 ? '0b' : baseOut == 8 ? '0o' : '') + str;\r\n }\r\n\r\n return x.s < 0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Does not strip trailing zeros.\r\n function truncate(arr, len) {\r\n if (arr.length > len) {\r\n arr.length = len;\r\n return true;\r\n }\r\n }\r\n\r\n\r\n // Decimal methods\r\n\r\n\r\n /*\r\n * abs\r\n * acos\r\n * acosh\r\n * add\r\n * asin\r\n * asinh\r\n * atan\r\n * atanh\r\n * atan2\r\n * cbrt\r\n * ceil\r\n * clone\r\n * config\r\n * cos\r\n * cosh\r\n * div\r\n * exp\r\n * floor\r\n * hypot\r\n * ln\r\n * log\r\n * log2\r\n * log10\r\n * max\r\n * min\r\n * mod\r\n * mul\r\n * pow\r\n * random\r\n * round\r\n * set\r\n * sign\r\n * sin\r\n * sinh\r\n * sqrt\r\n * sub\r\n * tan\r\n * tanh\r\n * trunc\r\n */\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the absolute value of `x`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function abs(x) {\r\n return new this(x).abs();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arccosine in radians of `x`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function acos(x) {\r\n return new this(x).acos();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic cosine of `x`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function acosh(x) {\r\n return new this(x).acosh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the sum of `x` and `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function add(x, y) {\r\n return new this(x).plus(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arcsine in radians of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function asin(x) {\r\n return new this(x).asin();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic sine of `x`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function asinh(x) {\r\n return new this(x).asinh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arctangent in radians of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function atan(x) {\r\n return new this(x).atan();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic tangent of `x`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function atanh(x) {\r\n return new this(x).atanh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arctangent in radians of `y/x` in the range -pi to pi\r\n * (inclusive), rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-pi, pi]\r\n *\r\n * y {number|string|Decimal} The y-coordinate.\r\n * x {number|string|Decimal} The x-coordinate.\r\n *\r\n * atan2(±0, -0) = ±pi\r\n * atan2(±0, +0) = ±0\r\n * atan2(±0, -x) = ±pi for x > 0\r\n * atan2(±0, x) = ±0 for x > 0\r\n * atan2(-y, ±0) = -pi/2 for y > 0\r\n * atan2(y, ±0) = pi/2 for y > 0\r\n * atan2(±y, -Infinity) = ±pi for finite y > 0\r\n * atan2(±y, +Infinity) = ±0 for finite y > 0\r\n * atan2(±Infinity, x) = ±pi/2 for finite x\r\n * atan2(±Infinity, -Infinity) = ±3*pi/4\r\n * atan2(±Infinity, +Infinity) = ±pi/4\r\n * atan2(NaN, x) = NaN\r\n * atan2(y, NaN) = NaN\r\n *\r\n */\r\n function atan2(y, x) {\r\n y = new this(y);\r\n x = new this(x);\r\n var r,\r\n pr = this.precision,\r\n rm = this.rounding,\r\n wpr = pr + 4;\r\n\r\n // Either NaN\r\n if (!y.s || !x.s) {\r\n r = new this(NaN);\r\n\r\n // Both ±Infinity\r\n } else if (!y.d && !x.d) {\r\n r = getPi(this, wpr, 1).times(x.s > 0 ? 0.25 : 0.75);\r\n r.s = y.s;\r\n\r\n // x is ±Infinity or y is ±0\r\n } else if (!x.d || y.isZero()) {\r\n r = x.s < 0 ? getPi(this, pr, rm) : new this(0);\r\n r.s = y.s;\r\n\r\n // y is ±Infinity or x is ±0\r\n } else if (!y.d || x.isZero()) {\r\n r = getPi(this, wpr, 1).times(0.5);\r\n r.s = y.s;\r\n\r\n // Both non-zero and finite\r\n } else if (x.s < 0) {\r\n this.precision = wpr;\r\n this.rounding = 1;\r\n r = this.atan(divide(y, x, wpr, 1));\r\n x = getPi(this, wpr, 1);\r\n this.precision = pr;\r\n this.rounding = rm;\r\n r = y.s < 0 ? r.minus(x) : r.plus(x);\r\n } else {\r\n r = this.atan(divide(y, x, wpr, 1));\r\n }\r\n\r\n return r;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the cube root of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function cbrt(x) {\r\n return new this(x).cbrt();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` rounded to an integer using `ROUND_CEIL`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function ceil(x) {\r\n return finalise(x = new this(x), x.e + 1, 2);\r\n }\r\n\r\n\r\n /*\r\n * Configure global settings for a Decimal constructor.\r\n *\r\n * `obj` is an object with one or more of the following properties,\r\n *\r\n * precision {number}\r\n * rounding {number}\r\n * toExpNeg {number}\r\n * toExpPos {number}\r\n * maxE {number}\r\n * minE {number}\r\n * modulo {number}\r\n * crypto {boolean|number}\r\n * defaults {true}\r\n *\r\n * E.g. Decimal.config({ precision: 20, rounding: 4 })\r\n *\r\n */\r\n function config(obj) {\r\n if (!obj || typeof obj !== 'object') throw Error(decimalError + 'Object expected');\r\n var i, p, v,\r\n useDefaults = obj.defaults === true,\r\n ps = [\r\n 'precision', 1, MAX_DIGITS,\r\n 'rounding', 0, 8,\r\n 'toExpNeg', -EXP_LIMIT, 0,\r\n 'toExpPos', 0, EXP_LIMIT,\r\n 'maxE', 0, EXP_LIMIT,\r\n 'minE', -EXP_LIMIT, 0,\r\n 'modulo', 0, 9\r\n ];\r\n\r\n for (i = 0; i < ps.length; i += 3) {\r\n if (p = ps[i], useDefaults) this[p] = DEFAULTS[p];\r\n if ((v = obj[p]) !== void 0) {\r\n if (mathfloor(v) === v && v >= ps[i + 1] && v <= ps[i + 2]) this[p] = v;\r\n else throw Error(invalidArgument + p + ': ' + v);\r\n }\r\n }\r\n\r\n if (p = 'crypto', useDefaults) this[p] = DEFAULTS[p];\r\n if ((v = obj[p]) !== void 0) {\r\n if (v === true || v === false || v === 0 || v === 1) {\r\n if (v) {\r\n if (typeof crypto != 'undefined' && crypto &&\r\n (crypto.getRandomValues || crypto.randomBytes)) {\r\n this[p] = true;\r\n } else {\r\n throw Error(cryptoUnavailable);\r\n }\r\n } else {\r\n this[p] = false;\r\n }\r\n } else {\r\n throw Error(invalidArgument + p + ': ' + v);\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the cosine of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function cos(x) {\r\n return new this(x).cos();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic cosine of `x`, rounded to precision\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function cosh(x) {\r\n return new this(x).cosh();\r\n }\r\n\r\n\r\n /*\r\n * Create and return a Decimal constructor with the same configuration properties as this Decimal\r\n * constructor.\r\n *\r\n */\r\n function clone(obj) {\r\n var i, p, ps;\r\n\r\n /*\r\n * The Decimal constructor and exported function.\r\n * Return a new Decimal instance.\r\n *\r\n * v {number|string|Decimal} A numeric value.\r\n *\r\n */\r\n function Decimal(v) {\r\n var e, i, t,\r\n x = this;\r\n\r\n // Decimal called without new.\r\n if (!(x instanceof Decimal)) return new Decimal(v);\r\n\r\n // Retain a reference to this Decimal constructor, and shadow Decimal.prototype.constructor\r\n // which points to Object.\r\n x.constructor = Decimal;\r\n\r\n // Duplicate.\r\n if (v instanceof Decimal) {\r\n x.s = v.s;\r\n\r\n if (external) {\r\n if (!v.d || v.e > Decimal.maxE) {\r\n\r\n // Infinity.\r\n x.e = NaN;\r\n x.d = null;\r\n } else if (v.e < Decimal.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n } else {\r\n x.e = v.e;\r\n x.d = v.d.slice();\r\n }\r\n } else {\r\n x.e = v.e;\r\n x.d = v.d ? v.d.slice() : v.d;\r\n }\r\n\r\n return;\r\n }\r\n\r\n t = typeof v;\r\n\r\n if (t === 'number') {\r\n if (v === 0) {\r\n x.s = 1 / v < 0 ? -1 : 1;\r\n x.e = 0;\r\n x.d = [0];\r\n return;\r\n }\r\n\r\n if (v < 0) {\r\n v = -v;\r\n x.s = -1;\r\n } else {\r\n x.s = 1;\r\n }\r\n\r\n // Fast path for small integers.\r\n if (v === ~~v && v < 1e7) {\r\n for (e = 0, i = v; i >= 10; i /= 10) e++;\r\n\r\n if (external) {\r\n if (e > Decimal.maxE) {\r\n x.e = NaN;\r\n x.d = null;\r\n } else if (e < Decimal.minE) {\r\n x.e = 0;\r\n x.d = [0];\r\n } else {\r\n x.e = e;\r\n x.d = [v];\r\n }\r\n } else {\r\n x.e = e;\r\n x.d = [v];\r\n }\r\n\r\n return;\r\n\r\n // Infinity, NaN.\r\n } else if (v * 0 !== 0) {\r\n if (!v) x.s = NaN;\r\n x.e = NaN;\r\n x.d = null;\r\n return;\r\n }\r\n\r\n return parseDecimal(x, v.toString());\r\n\r\n } else if (t !== 'string') {\r\n throw Error(invalidArgument + v);\r\n }\r\n\r\n // Minus sign?\r\n if ((i = v.charCodeAt(0)) === 45) {\r\n v = v.slice(1);\r\n x.s = -1;\r\n } else {\r\n // Plus sign?\r\n if (i === 43) v = v.slice(1);\r\n x.s = 1;\r\n }\r\n\r\n return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v);\r\n }\r\n\r\n Decimal.prototype = P;\r\n\r\n Decimal.ROUND_UP = 0;\r\n Decimal.ROUND_DOWN = 1;\r\n Decimal.ROUND_CEIL = 2;\r\n Decimal.ROUND_FLOOR = 3;\r\n Decimal.ROUND_HALF_UP = 4;\r\n Decimal.ROUND_HALF_DOWN = 5;\r\n Decimal.ROUND_HALF_EVEN = 6;\r\n Decimal.ROUND_HALF_CEIL = 7;\r\n Decimal.ROUND_HALF_FLOOR = 8;\r\n Decimal.EUCLID = 9;\r\n\r\n Decimal.config = Decimal.set = config;\r\n Decimal.clone = clone;\r\n Decimal.isDecimal = isDecimalInstance;\r\n\r\n Decimal.abs = abs;\r\n Decimal.acos = acos;\r\n Decimal.acosh = acosh; // ES6\r\n Decimal.add = add;\r\n Decimal.asin = asin;\r\n Decimal.asinh = asinh; // ES6\r\n Decimal.atan = atan;\r\n Decimal.atanh = atanh; // ES6\r\n Decimal.atan2 = atan2;\r\n Decimal.cbrt = cbrt; // ES6\r\n Decimal.ceil = ceil;\r\n Decimal.cos = cos;\r\n Decimal.cosh = cosh; // ES6\r\n Decimal.div = div;\r\n Decimal.exp = exp;\r\n Decimal.floor = floor;\r\n Decimal.hypot = hypot; // ES6\r\n Decimal.ln = ln;\r\n Decimal.log = log;\r\n Decimal.log10 = log10; // ES6\r\n Decimal.log2 = log2; // ES6\r\n Decimal.max = max;\r\n Decimal.min = min;\r\n Decimal.mod = mod;\r\n Decimal.mul = mul;\r\n Decimal.pow = pow;\r\n Decimal.random = random;\r\n Decimal.round = round;\r\n Decimal.sign = sign; // ES6\r\n Decimal.sin = sin;\r\n Decimal.sinh = sinh; // ES6\r\n Decimal.sqrt = sqrt;\r\n Decimal.sub = sub;\r\n Decimal.tan = tan;\r\n Decimal.tanh = tanh; // ES6\r\n Decimal.trunc = trunc; // ES6\r\n\r\n if (obj === void 0) obj = {};\r\n if (obj) {\r\n if (obj.defaults !== true) {\r\n ps = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'maxE', 'minE', 'modulo', 'crypto'];\r\n for (i = 0; i < ps.length;) if (!obj.hasOwnProperty(p = ps[i++])) obj[p] = this[p];\r\n }\r\n }\r\n\r\n Decimal.config(obj);\r\n\r\n return Decimal;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` divided by `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function div(x, y) {\r\n return new this(x).div(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural exponential of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} The power to which to raise the base of the natural log.\r\n *\r\n */\r\n function exp(x) {\r\n return new this(x).exp();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` round to an integer using `ROUND_FLOOR`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function floor(x) {\r\n return finalise(x = new this(x), x.e + 1, 3);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the square root of the sum of the squares of the arguments,\r\n * rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * hypot(a, b, ...) = sqrt(a^2 + b^2 + ...)\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n */\r\n function hypot() {\r\n var i, n,\r\n t = new this(0);\r\n\r\n external = false;\r\n\r\n for (i = 0; i < arguments.length;) {\r\n n = new this(arguments[i++]);\r\n if (!n.d) {\r\n if (n.s) {\r\n external = true;\r\n return new this(1 / 0);\r\n }\r\n t = n;\r\n } else if (t.d) {\r\n t = t.plus(n.times(n));\r\n }\r\n }\r\n\r\n external = true;\r\n\r\n return t.sqrt();\r\n }\r\n\r\n\r\n /*\r\n * Return true if object is a Decimal instance (where Decimal is any Decimal constructor),\r\n * otherwise return false.\r\n *\r\n */\r\n function isDecimalInstance(obj) {\r\n return obj instanceof Decimal || obj && obj.name === '[object Decimal]' || false;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural logarithm of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function ln(x) {\r\n return new this(x).ln();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the log of `x` to the base `y`, or to base 10 if no base\r\n * is specified, rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * log[y](x)\r\n *\r\n * x {number|string|Decimal} The argument of the logarithm.\r\n * y {number|string|Decimal} The base of the logarithm.\r\n *\r\n */\r\n function log(x, y) {\r\n return new this(x).log(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the base 2 logarithm of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function log2(x) {\r\n return new this(x).log(2);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the base 10 logarithm of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function log10(x) {\r\n return new this(x).log(10);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the maximum of the arguments.\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n */\r\n function max() {\r\n return maxOrMin(this, arguments, 'lt');\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the minimum of the arguments.\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n */\r\n function min() {\r\n return maxOrMin(this, arguments, 'gt');\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` modulo `y`, rounded to `precision` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function mod(x, y) {\r\n return new this(x).mod(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` multiplied by `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function mul(x, y) {\r\n return new this(x).mul(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` raised to the power `y`, rounded to precision\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} The base.\r\n * y {number|string|Decimal} The exponent.\r\n *\r\n */\r\n function pow(x, y) {\r\n return new this(x).pow(y);\r\n }\r\n\r\n\r\n /*\r\n * Returns a new Decimal with a random value equal to or greater than 0 and less than 1, and with\r\n * `sd`, or `Decimal.precision` if `sd` is omitted, significant digits (or less if trailing zeros\r\n * are produced).\r\n *\r\n * [sd] {number} Significant digits. Integer, 0 to MAX_DIGITS inclusive.\r\n *\r\n */\r\n function random(sd) {\r\n var d, e, k, n,\r\n i = 0,\r\n r = new this(1),\r\n rd = [];\r\n\r\n if (sd === void 0) sd = this.precision;\r\n else checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n k = Math.ceil(sd / LOG_BASE);\r\n\r\n if (!this.crypto) {\r\n for (; i < k;) rd[i++] = Math.random() * 1e7 | 0;\r\n\r\n // Browsers supporting crypto.getRandomValues.\r\n } else if (crypto.getRandomValues) {\r\n d = crypto.getRandomValues(new Uint32Array(k));\r\n\r\n for (; i < k;) {\r\n n = d[i];\r\n\r\n // 0 <= n < 4294967296\r\n // Probability n >= 4.29e9, is 4967296 / 4294967296 = 0.00116 (1 in 865).\r\n if (n >= 4.29e9) {\r\n d[i] = crypto.getRandomValues(new Uint32Array(1))[0];\r\n } else {\r\n\r\n // 0 <= n <= 4289999999\r\n // 0 <= (n % 1e7) <= 9999999\r\n rd[i++] = n % 1e7;\r\n }\r\n }\r\n\r\n // Node.js supporting crypto.randomBytes.\r\n } else if (crypto.randomBytes) {\r\n\r\n // buffer\r\n d = crypto.randomBytes(k *= 4);\r\n\r\n for (; i < k;) {\r\n\r\n // 0 <= n < 2147483648\r\n n = d[i] + (d[i + 1] << 8) + (d[i + 2] << 16) + ((d[i + 3] & 0x7f) << 24);\r\n\r\n // Probability n >= 2.14e9, is 7483648 / 2147483648 = 0.0035 (1 in 286).\r\n if (n >= 2.14e9) {\r\n crypto.randomBytes(4).copy(d, i);\r\n } else {\r\n\r\n // 0 <= n <= 2139999999\r\n // 0 <= (n % 1e7) <= 9999999\r\n rd.push(n % 1e7);\r\n i += 4;\r\n }\r\n }\r\n\r\n i = k / 4;\r\n } else {\r\n throw Error(cryptoUnavailable);\r\n }\r\n\r\n k = rd[--i];\r\n sd %= LOG_BASE;\r\n\r\n // Convert trailing digits to zeros according to sd.\r\n if (k && sd) {\r\n n = mathpow(10, LOG_BASE - sd);\r\n rd[i] = (k / n | 0) * n;\r\n }\r\n\r\n // Remove trailing words which are zero.\r\n for (; rd[i] === 0; i--) rd.pop();\r\n\r\n // Zero?\r\n if (i < 0) {\r\n e = 0;\r\n rd = [0];\r\n } else {\r\n e = -1;\r\n\r\n // Remove leading words which are zero and adjust exponent accordingly.\r\n for (; rd[0] === 0; e -= LOG_BASE) rd.shift();\r\n\r\n // Count the digits of the first word of rd to determine leading zeros.\r\n for (k = 1, n = rd[0]; n >= 10; n /= 10) k++;\r\n\r\n // Adjust the exponent for leading zeros of the first word of rd.\r\n if (k < LOG_BASE) e -= LOG_BASE - k;\r\n }\r\n\r\n r.e = e;\r\n r.d = rd;\r\n\r\n return r;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` rounded to an integer using rounding mode `rounding`.\r\n *\r\n * To emulate `Math.round`, set rounding to 7 (ROUND_HALF_CEIL).\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function round(x) {\r\n return finalise(x = new this(x), x.e + 1, this.rounding);\r\n }\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if x > 0,\r\n * -1 if x < 0,\r\n * 0 if x is 0,\r\n * -0 if x is -0,\r\n * NaN otherwise\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function sign(x) {\r\n x = new this(x);\r\n return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the sine of `x`, rounded to `precision` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function sin(x) {\r\n return new this(x).sin();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic sine of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function sinh(x) {\r\n return new this(x).sinh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the square root of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function sqrt(x) {\r\n return new this(x).sqrt();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` minus `y`, rounded to `precision` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function sub(x, y) {\r\n return new this(x).sub(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the tangent of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function tan(x) {\r\n return new this(x).tan();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic tangent of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function tanh(x) {\r\n return new this(x).tanh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` truncated to an integer.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function trunc(x) {\r\n return finalise(x = new this(x), x.e + 1, 1);\r\n }\r\n\r\n\r\n // Create and configure initial Decimal constructor.\r\n Decimal = clone(DEFAULTS);\r\n\r\n Decimal['default'] = Decimal.Decimal = Decimal;\r\n\r\n // Create the internal constants from their string values.\r\n LN10 = new Decimal(LN10);\r\n PI = new Decimal(PI);\r\n\r\n\r\n // Export.\r\n\r\n\r\n // AMD.\r\n if (typeof define == 'function' && define.amd) {\r\n define(function () {\r\n return Decimal;\r\n });\r\n\r\n // Node and other environments that support module.exports.\r\n } else if (typeof module != 'undefined' && module.exports) {\r\n if (typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol') {\r\n P[Symbol.for('nodejs.util.inspect.custom')] = P.toString;\r\n P[Symbol.toStringTag] = 'Decimal';\r\n }\r\n\r\n module.exports = Decimal;\r\n\r\n // Browser.\r\n } else {\r\n if (!globalScope) {\r\n globalScope = typeof self != 'undefined' && self && self.self == self ? self : window;\r\n }\r\n\r\n noConflict = globalScope.Decimal;\r\n Decimal.noConflict = function () {\r\n globalScope.Decimal = noConflict;\r\n return Decimal;\r\n };\r\n\r\n globalScope.Decimal = Decimal;\r\n }\r\n})(this);\r\n","'use strict';\nconst PassThrough = require('stream').PassThrough;\nconst zlib = require('zlib');\nconst mimicResponse = require('mimic-response');\n\nmodule.exports = response => {\n\t// TODO: Use Array#includes when targeting Node.js 6\n\tif (['gzip', 'deflate'].indexOf(response.headers['content-encoding']) === -1) {\n\t\treturn response;\n\t}\n\n\tconst unzip = zlib.createUnzip();\n\tconst stream = new PassThrough();\n\n\tmimicResponse(response, stream);\n\n\tunzip.on('error', err => {\n\t\tif (err.code === 'Z_BUF_ERROR') {\n\t\t\tstream.end();\n\t\t\treturn;\n\t\t}\n\n\t\tstream.emit('error', err);\n\t});\n\n\tresponse.pipe(unzip).pipe(stream);\n\n\treturn stream;\n};\n","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn target.propertyIsEnumerable(symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tls_1 = require(\"tls\");\nconst deferToConnect = (socket, fn) => {\n let listeners;\n if (typeof fn === 'function') {\n const connect = fn;\n listeners = { connect };\n }\n else {\n listeners = fn;\n }\n const hasConnectListener = typeof listeners.connect === 'function';\n const hasSecureConnectListener = typeof listeners.secureConnect === 'function';\n const hasCloseListener = typeof listeners.close === 'function';\n const onConnect = () => {\n if (hasConnectListener) {\n listeners.connect();\n }\n if (socket instanceof tls_1.TLSSocket && hasSecureConnectListener) {\n if (socket.authorized) {\n listeners.secureConnect();\n }\n else if (!socket.authorizationError) {\n socket.once('secureConnect', listeners.secureConnect);\n }\n }\n if (hasCloseListener) {\n socket.once('close', listeners.close);\n }\n };\n if (socket.writable && !socket.connecting) {\n onConnect();\n }\n else if (socket.connecting) {\n socket.once('connect', onConnect);\n }\n else if (socket.destroyed && hasCloseListener) {\n listeners.close(socket._hadError);\n }\n};\nexports.default = deferToConnect;\n// For CommonJS default export support\nmodule.exports = deferToConnect;\nmodule.exports.default = deferToConnect;\n","var Stream = require('stream').Stream;\nvar util = require('util');\n\nmodule.exports = DelayedStream;\nfunction DelayedStream() {\n this.source = null;\n this.dataSize = 0;\n this.maxDataSize = 1024 * 1024;\n this.pauseStream = true;\n\n this._maxDataSizeExceeded = false;\n this._released = false;\n this._bufferedEvents = [];\n}\nutil.inherits(DelayedStream, Stream);\n\nDelayedStream.create = function(source, options) {\n var delayedStream = new this();\n\n options = options || {};\n for (var option in options) {\n delayedStream[option] = options[option];\n }\n\n delayedStream.source = source;\n\n var realEmit = source.emit;\n source.emit = function() {\n delayedStream._handleEmit(arguments);\n return realEmit.apply(source, arguments);\n };\n\n source.on('error', function() {});\n if (delayedStream.pauseStream) {\n source.pause();\n }\n\n return delayedStream;\n};\n\nObject.defineProperty(DelayedStream.prototype, 'readable', {\n configurable: true,\n enumerable: true,\n get: function() {\n return this.source.readable;\n }\n});\n\nDelayedStream.prototype.setEncoding = function() {\n return this.source.setEncoding.apply(this.source, arguments);\n};\n\nDelayedStream.prototype.resume = function() {\n if (!this._released) {\n this.release();\n }\n\n this.source.resume();\n};\n\nDelayedStream.prototype.pause = function() {\n this.source.pause();\n};\n\nDelayedStream.prototype.release = function() {\n this._released = true;\n\n this._bufferedEvents.forEach(function(args) {\n this.emit.apply(this, args);\n }.bind(this));\n this._bufferedEvents = [];\n};\n\nDelayedStream.prototype.pipe = function() {\n var r = Stream.prototype.pipe.apply(this, arguments);\n this.resume();\n return r;\n};\n\nDelayedStream.prototype._handleEmit = function(args) {\n if (this._released) {\n this.emit.apply(this, args);\n return;\n }\n\n if (args[0] === 'data') {\n this.dataSize += args[1].length;\n this._checkIfMaxDataSizeExceeded();\n }\n\n this._bufferedEvents.push(args);\n};\n\nDelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {\n if (this._maxDataSizeExceeded) {\n return;\n }\n\n if (this.dataSize <= this.maxDataSize) {\n return;\n }\n\n this._maxDataSizeExceeded = true;\n var message =\n 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'\n this.emit('error', new Error(message));\n};\n","/*!\n * depd\n * Copyright(c) 2014-2018 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\n\nvar relative = require('path').relative\n\n/**\n * Module exports.\n */\n\nmodule.exports = depd\n\n/**\n * Get the path to base files on.\n */\n\nvar basePath = process.cwd()\n\n/**\n * Determine if namespace is contained in the string.\n */\n\nfunction containsNamespace (str, namespace) {\n var vals = str.split(/[ ,]+/)\n var ns = String(namespace).toLowerCase()\n\n for (var i = 0; i < vals.length; i++) {\n var val = vals[i]\n\n // namespace contained\n if (val && (val === '*' || val.toLowerCase() === ns)) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * Convert a data descriptor to accessor descriptor.\n */\n\nfunction convertDataDescriptorToAccessor (obj, prop, message) {\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n var value = descriptor.value\n\n descriptor.get = function getter () { return value }\n\n if (descriptor.writable) {\n descriptor.set = function setter (val) { return (value = val) }\n }\n\n delete descriptor.value\n delete descriptor.writable\n\n Object.defineProperty(obj, prop, descriptor)\n\n return descriptor\n}\n\n/**\n * Create arguments string to keep arity.\n */\n\nfunction createArgumentsString (arity) {\n var str = ''\n\n for (var i = 0; i < arity; i++) {\n str += ', arg' + i\n }\n\n return str.substr(2)\n}\n\n/**\n * Create stack string from stack.\n */\n\nfunction createStackString (stack) {\n var str = this.name + ': ' + this.namespace\n\n if (this.message) {\n str += ' deprecated ' + this.message\n }\n\n for (var i = 0; i < stack.length; i++) {\n str += '\\n at ' + stack[i].toString()\n }\n\n return str\n}\n\n/**\n * Create deprecate for namespace in caller.\n */\n\nfunction depd (namespace) {\n if (!namespace) {\n throw new TypeError('argument namespace is required')\n }\n\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n var file = site[0]\n\n function deprecate (message) {\n // call to self as log\n log.call(deprecate, message)\n }\n\n deprecate._file = file\n deprecate._ignored = isignored(namespace)\n deprecate._namespace = namespace\n deprecate._traced = istraced(namespace)\n deprecate._warned = Object.create(null)\n\n deprecate.function = wrapfunction\n deprecate.property = wrapproperty\n\n return deprecate\n}\n\n/**\n * Determine if event emitter has listeners of a given type.\n *\n * The way to do this check is done three different ways in Node.js >= 0.8\n * so this consolidates them into a minimal set using instance methods.\n *\n * @param {EventEmitter} emitter\n * @param {string} type\n * @returns {boolean}\n * @private\n */\n\nfunction eehaslisteners (emitter, type) {\n var count = typeof emitter.listenerCount !== 'function'\n ? emitter.listeners(type).length\n : emitter.listenerCount(type)\n\n return count > 0\n}\n\n/**\n * Determine if namespace is ignored.\n */\n\nfunction isignored (namespace) {\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}\n\n/**\n * Determine if namespace is traced.\n */\n\nfunction istraced (namespace) {\n if (process.traceDeprecation) {\n // --trace-deprecation support\n return true\n }\n\n var str = process.env.TRACE_DEPRECATION || ''\n\n // namespace traced\n return containsNamespace(str, namespace)\n}\n\n/**\n * Display deprecation message.\n */\n\nfunction log (message, site) {\n var haslisteners = eehaslisteners(process, 'deprecation')\n\n // abort early if no destination\n if (!haslisteners && this._ignored) {\n return\n }\n\n var caller\n var callFile\n var callSite\n var depSite\n var i = 0\n var seen = false\n var stack = getStack()\n var file = this._file\n\n if (site) {\n // provided site\n depSite = site\n callSite = callSiteLocation(stack[1])\n callSite.name = depSite.name\n file = callSite[0]\n } else {\n // get call site\n i = 2\n depSite = callSiteLocation(stack[i])\n callSite = depSite\n }\n\n // get caller of deprecated thing in relation to file\n for (; i < stack.length; i++) {\n caller = callSiteLocation(stack[i])\n callFile = caller[0]\n\n if (callFile === file) {\n seen = true\n } else if (callFile === this._file) {\n file = this._file\n } else if (seen) {\n break\n }\n }\n\n var key = caller\n ? depSite.join(':') + '__' + caller.join(':')\n : undefined\n\n if (key !== undefined && key in this._warned) {\n // already warned\n return\n }\n\n this._warned[key] = true\n\n // generate automatic message from call site\n var msg = message\n if (!msg) {\n msg = callSite === depSite || !callSite.name\n ? defaultMessage(depSite)\n : defaultMessage(callSite)\n }\n\n // emit deprecation if listeners exist\n if (haslisteners) {\n var err = DeprecationError(this._namespace, msg, stack.slice(i))\n process.emit('deprecation', err)\n return\n }\n\n // format and write message\n var format = process.stderr.isTTY\n ? formatColor\n : formatPlain\n var output = format.call(this, msg, caller, stack.slice(i))\n process.stderr.write(output + '\\n', 'utf8')\n}\n\n/**\n * Get call site location as array.\n */\n\nfunction callSiteLocation (callSite) {\n var file = callSite.getFileName() || ''\n var line = callSite.getLineNumber()\n var colm = callSite.getColumnNumber()\n\n if (callSite.isEval()) {\n file = callSite.getEvalOrigin() + ', ' + file\n }\n\n var site = [file, line, colm]\n\n site.callSite = callSite\n site.name = callSite.getFunctionName()\n\n return site\n}\n\n/**\n * Generate a default message from the site.\n */\n\nfunction defaultMessage (site) {\n var callSite = site.callSite\n var funcName = site.name\n\n // make useful anonymous name\n if (!funcName) {\n funcName = ''\n }\n\n var context = callSite.getThis()\n var typeName = context && callSite.getTypeName()\n\n // ignore useless type name\n if (typeName === 'Object') {\n typeName = undefined\n }\n\n // make useful type name\n if (typeName === 'Function') {\n typeName = context.name || typeName\n }\n\n return typeName && callSite.getMethodName()\n ? typeName + '.' + funcName\n : funcName\n}\n\n/**\n * Format deprecation message without color.\n */\n\nfunction formatPlain (msg, caller, stack) {\n var timestamp = new Date().toUTCString()\n\n var formatted = timestamp +\n ' ' + this._namespace +\n ' deprecated ' + msg\n\n // add stack trace\n if (this._traced) {\n for (var i = 0; i < stack.length; i++) {\n formatted += '\\n at ' + stack[i].toString()\n }\n\n return formatted\n }\n\n if (caller) {\n formatted += ' at ' + formatLocation(caller)\n }\n\n return formatted\n}\n\n/**\n * Format deprecation message with color.\n */\n\nfunction formatColor (msg, caller, stack) {\n var formatted = '\\x1b[36;1m' + this._namespace + '\\x1b[22;39m' + // bold cyan\n ' \\x1b[33;1mdeprecated\\x1b[22;39m' + // bold yellow\n ' \\x1b[0m' + msg + '\\x1b[39m' // reset\n\n // add stack trace\n if (this._traced) {\n for (var i = 0; i < stack.length; i++) {\n formatted += '\\n \\x1b[36mat ' + stack[i].toString() + '\\x1b[39m' // cyan\n }\n\n return formatted\n }\n\n if (caller) {\n formatted += ' \\x1b[36m' + formatLocation(caller) + '\\x1b[39m' // cyan\n }\n\n return formatted\n}\n\n/**\n * Format call site location.\n */\n\nfunction formatLocation (callSite) {\n return relative(basePath, callSite[0]) +\n ':' + callSite[1] +\n ':' + callSite[2]\n}\n\n/**\n * Get the stack as array of call sites.\n */\n\nfunction getStack () {\n var limit = Error.stackTraceLimit\n var obj = {}\n var prep = Error.prepareStackTrace\n\n Error.prepareStackTrace = prepareObjectStackTrace\n Error.stackTraceLimit = Math.max(10, limit)\n\n // capture the stack\n Error.captureStackTrace(obj)\n\n // slice this function off the top\n var stack = obj.stack.slice(1)\n\n Error.prepareStackTrace = prep\n Error.stackTraceLimit = limit\n\n return stack\n}\n\n/**\n * Capture call site stack from v8.\n */\n\nfunction prepareObjectStackTrace (obj, stack) {\n return stack\n}\n\n/**\n * Return a wrapped function in a deprecation message.\n */\n\nfunction wrapfunction (fn, message) {\n if (typeof fn !== 'function') {\n throw new TypeError('argument fn must be a function')\n }\n\n var args = createArgumentsString(fn.length)\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n site.name = fn.name\n\n // eslint-disable-next-line no-new-func\n var deprecatedfn = new Function('fn', 'log', 'deprecate', 'message', 'site',\n '\"use strict\"\\n' +\n 'return function (' + args + ') {' +\n 'log.call(deprecate, message, site)\\n' +\n 'return fn.apply(this, arguments)\\n' +\n '}')(fn, log, this, message, site)\n\n return deprecatedfn\n}\n\n/**\n * Wrap property in a deprecation message.\n */\n\nfunction wrapproperty (obj, prop, message) {\n if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n throw new TypeError('argument obj must be object')\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop)\n\n if (!descriptor) {\n throw new TypeError('must call property on owner object')\n }\n\n if (!descriptor.configurable) {\n throw new TypeError('property must be configurable')\n }\n\n var deprecate = this\n var stack = getStack()\n var site = callSiteLocation(stack[1])\n\n // set site name\n site.name = prop\n\n // convert data descriptor\n if ('value' in descriptor) {\n descriptor = convertDataDescriptorToAccessor(obj, prop, message)\n }\n\n var get = descriptor.get\n var set = descriptor.set\n\n // wrap getter\n if (typeof get === 'function') {\n descriptor.get = function getter () {\n log.call(deprecate, message, site)\n return get.apply(this, arguments)\n }\n }\n\n // wrap setter\n if (typeof set === 'function') {\n descriptor.set = function setter () {\n log.call(deprecate, message, site)\n return set.apply(this, arguments)\n }\n }\n\n Object.defineProperty(obj, prop, descriptor)\n}\n\n/**\n * Create DeprecationError for deprecation\n */\n\nfunction DeprecationError (namespace, message, stack) {\n var error = new Error()\n var stackString\n\n Object.defineProperty(error, 'constructor', {\n value: DeprecationError\n })\n\n Object.defineProperty(error, 'message', {\n configurable: true,\n enumerable: false,\n value: message,\n writable: true\n })\n\n Object.defineProperty(error, 'name', {\n enumerable: false,\n configurable: true,\n value: 'DeprecationError',\n writable: true\n })\n\n Object.defineProperty(error, 'namespace', {\n configurable: true,\n enumerable: false,\n value: namespace,\n writable: true\n })\n\n Object.defineProperty(error, 'stack', {\n configurable: true,\n enumerable: false,\n get: function () {\n if (stackString !== undefined) {\n return stackString\n }\n\n // prepare stack trace\n return (stackString = createStackString.call(this, stack))\n },\n set: function setter (val) {\n stackString = val\n }\n })\n\n return error\n}\n","\"use strict\";\nconst legacyErrorCodes = require(\"./legacy-error-codes.json\");\nconst idlUtils = require(\"./utils.js\");\n\nexports.implementation = class DOMExceptionImpl {\n constructor(globalObject, [message, name]) {\n this.name = name;\n this.message = message;\n }\n\n get code() {\n return legacyErrorCodes[this.name] || 0;\n }\n};\n\n// A proprietary V8 extension that causes the stack property to appear.\nexports.init = impl => {\n if (Error.captureStackTrace) {\n const wrapper = idlUtils.wrapperForImpl(impl);\n Error.captureStackTrace(wrapper, wrapper.constructor);\n }\n};\n","\"use strict\";\n\nconst conversions = require(\"webidl-conversions\");\nconst utils = require(\"./utils.js\");\n\nconst impl = utils.implSymbol;\nconst ctorRegistry = utils.ctorRegistrySymbol;\n\nconst iface = {\n // When an interface-module that implements this interface as a mixin is loaded, it will append its own `.is()`\n // method into this array. It allows objects that directly implements *those* interfaces to be recognized as\n // implementing this mixin interface.\n _mixedIntoPredicates: [],\n is(obj) {\n if (obj) {\n if (utils.hasOwn(obj, impl) && obj[impl] instanceof Impl.implementation) {\n return true;\n }\n for (const isMixedInto of module.exports._mixedIntoPredicates) {\n if (isMixedInto(obj)) {\n return true;\n }\n }\n }\n return false;\n },\n isImpl(obj) {\n if (obj) {\n if (obj instanceof Impl.implementation) {\n return true;\n }\n\n const wrapper = utils.wrapperForImpl(obj);\n for (const isMixedInto of module.exports._mixedIntoPredicates) {\n if (isMixedInto(wrapper)) {\n return true;\n }\n }\n }\n return false;\n },\n convert(obj, { context = \"The provided value\" } = {}) {\n if (module.exports.is(obj)) {\n return utils.implForWrapper(obj);\n }\n throw new TypeError(`${context} is not of type 'DOMException'.`);\n },\n\n create(globalObject, constructorArgs, privateData) {\n if (globalObject[ctorRegistry] === undefined) {\n throw new Error(\"Internal error: invalid global object\");\n }\n\n const ctor = globalObject[ctorRegistry][\"DOMException\"];\n if (ctor === undefined) {\n throw new Error(\"Internal error: constructor DOMException is not installed on the passed global object\");\n }\n\n let obj = Object.create(ctor.prototype);\n obj = iface.setup(obj, globalObject, constructorArgs, privateData);\n return obj;\n },\n createImpl(globalObject, constructorArgs, privateData) {\n const obj = iface.create(globalObject, constructorArgs, privateData);\n return utils.implForWrapper(obj);\n },\n _internalSetup(obj) {},\n setup(obj, globalObject, constructorArgs = [], privateData = {}) {\n privateData.wrapper = obj;\n\n iface._internalSetup(obj);\n Object.defineProperty(obj, impl, {\n value: new Impl.implementation(globalObject, constructorArgs, privateData),\n configurable: true\n });\n\n obj[impl][utils.wrapperSymbol] = obj;\n if (Impl.init) {\n Impl.init(obj[impl], privateData);\n }\n return obj;\n },\n\n install(globalObject) {\n class DOMException {\n constructor() {\n const args = [];\n {\n let curArg = arguments[0];\n if (curArg !== undefined) {\n curArg = conversions[\"DOMString\"](curArg, { context: \"Failed to construct 'DOMException': parameter 1\" });\n } else {\n curArg = \"\";\n }\n args.push(curArg);\n }\n {\n let curArg = arguments[1];\n if (curArg !== undefined) {\n curArg = conversions[\"DOMString\"](curArg, { context: \"Failed to construct 'DOMException': parameter 2\" });\n } else {\n curArg = \"Error\";\n }\n args.push(curArg);\n }\n return iface.setup(Object.create(new.target.prototype), globalObject, args);\n }\n\n get name() {\n if (!this || !module.exports.is(this)) {\n throw new TypeError(\"Illegal invocation\");\n }\n\n return this[impl][\"name\"];\n }\n\n get message() {\n if (!this || !module.exports.is(this)) {\n throw new TypeError(\"Illegal invocation\");\n }\n\n return this[impl][\"message\"];\n }\n\n get code() {\n if (!this || !module.exports.is(this)) {\n throw new TypeError(\"Illegal invocation\");\n }\n\n return this[impl][\"code\"];\n }\n }\n Object.defineProperties(DOMException.prototype, {\n name: { enumerable: true },\n message: { enumerable: true },\n code: { enumerable: true },\n [Symbol.toStringTag]: { value: \"DOMException\", configurable: true },\n INDEX_SIZE_ERR: { value: 1, enumerable: true },\n DOMSTRING_SIZE_ERR: { value: 2, enumerable: true },\n HIERARCHY_REQUEST_ERR: { value: 3, enumerable: true },\n WRONG_DOCUMENT_ERR: { value: 4, enumerable: true },\n INVALID_CHARACTER_ERR: { value: 5, enumerable: true },\n NO_DATA_ALLOWED_ERR: { value: 6, enumerable: true },\n NO_MODIFICATION_ALLOWED_ERR: { value: 7, enumerable: true },\n NOT_FOUND_ERR: { value: 8, enumerable: true },\n NOT_SUPPORTED_ERR: { value: 9, enumerable: true },\n INUSE_ATTRIBUTE_ERR: { value: 10, enumerable: true },\n INVALID_STATE_ERR: { value: 11, enumerable: true },\n SYNTAX_ERR: { value: 12, enumerable: true },\n INVALID_MODIFICATION_ERR: { value: 13, enumerable: true },\n NAMESPACE_ERR: { value: 14, enumerable: true },\n INVALID_ACCESS_ERR: { value: 15, enumerable: true },\n VALIDATION_ERR: { value: 16, enumerable: true },\n TYPE_MISMATCH_ERR: { value: 17, enumerable: true },\n SECURITY_ERR: { value: 18, enumerable: true },\n NETWORK_ERR: { value: 19, enumerable: true },\n ABORT_ERR: { value: 20, enumerable: true },\n URL_MISMATCH_ERR: { value: 21, enumerable: true },\n QUOTA_EXCEEDED_ERR: { value: 22, enumerable: true },\n TIMEOUT_ERR: { value: 23, enumerable: true },\n INVALID_NODE_TYPE_ERR: { value: 24, enumerable: true },\n DATA_CLONE_ERR: { value: 25, enumerable: true }\n });\n Object.defineProperties(DOMException, {\n INDEX_SIZE_ERR: { value: 1, enumerable: true },\n DOMSTRING_SIZE_ERR: { value: 2, enumerable: true },\n HIERARCHY_REQUEST_ERR: { value: 3, enumerable: true },\n WRONG_DOCUMENT_ERR: { value: 4, enumerable: true },\n INVALID_CHARACTER_ERR: { value: 5, enumerable: true },\n NO_DATA_ALLOWED_ERR: { value: 6, enumerable: true },\n NO_MODIFICATION_ALLOWED_ERR: { value: 7, enumerable: true },\n NOT_FOUND_ERR: { value: 8, enumerable: true },\n NOT_SUPPORTED_ERR: { value: 9, enumerable: true },\n INUSE_ATTRIBUTE_ERR: { value: 10, enumerable: true },\n INVALID_STATE_ERR: { value: 11, enumerable: true },\n SYNTAX_ERR: { value: 12, enumerable: true },\n INVALID_MODIFICATION_ERR: { value: 13, enumerable: true },\n NAMESPACE_ERR: { value: 14, enumerable: true },\n INVALID_ACCESS_ERR: { value: 15, enumerable: true },\n VALIDATION_ERR: { value: 16, enumerable: true },\n TYPE_MISMATCH_ERR: { value: 17, enumerable: true },\n SECURITY_ERR: { value: 18, enumerable: true },\n NETWORK_ERR: { value: 19, enumerable: true },\n ABORT_ERR: { value: 20, enumerable: true },\n URL_MISMATCH_ERR: { value: 21, enumerable: true },\n QUOTA_EXCEEDED_ERR: { value: 22, enumerable: true },\n TIMEOUT_ERR: { value: 23, enumerable: true },\n INVALID_NODE_TYPE_ERR: { value: 24, enumerable: true },\n DATA_CLONE_ERR: { value: 25, enumerable: true }\n });\n if (globalObject[ctorRegistry] === undefined) {\n globalObject[ctorRegistry] = Object.create(null);\n }\n globalObject[ctorRegistry][\"DOMException\"] = DOMException;\n\n Object.defineProperty(globalObject, \"DOMException\", {\n configurable: true,\n writable: true,\n value: DOMException\n });\n }\n}; // iface\nmodule.exports = iface;\n\nconst Impl = require(\"./DOMException-impl.js\");\n","\"use strict\";\n\n// Returns \"Type(value) is Object\" in ES terminology.\nfunction isObject(value) {\n return typeof value === \"object\" && value !== null || typeof value === \"function\";\n}\n\nfunction hasOwn(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nconst wrapperSymbol = Symbol(\"wrapper\");\nconst implSymbol = Symbol(\"impl\");\nconst sameObjectCaches = Symbol(\"SameObject caches\");\nconst ctorRegistrySymbol = Symbol.for(\"[webidl2js] constructor registry\");\n\nfunction getSameObject(wrapper, prop, creator) {\n if (!wrapper[sameObjectCaches]) {\n wrapper[sameObjectCaches] = Object.create(null);\n }\n\n if (prop in wrapper[sameObjectCaches]) {\n return wrapper[sameObjectCaches][prop];\n }\n\n wrapper[sameObjectCaches][prop] = creator();\n return wrapper[sameObjectCaches][prop];\n}\n\nfunction wrapperForImpl(impl) {\n return impl ? impl[wrapperSymbol] : null;\n}\n\nfunction implForWrapper(wrapper) {\n return wrapper ? wrapper[implSymbol] : null;\n}\n\nfunction tryWrapperForImpl(impl) {\n const wrapper = wrapperForImpl(impl);\n return wrapper ? wrapper : impl;\n}\n\nfunction tryImplForWrapper(wrapper) {\n const impl = implForWrapper(wrapper);\n return impl ? impl : wrapper;\n}\n\nconst iterInternalSymbol = Symbol(\"internal\");\nconst IteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));\n\nfunction isArrayIndexPropName(P) {\n if (typeof P !== \"string\") {\n return false;\n }\n const i = P >>> 0;\n if (i === Math.pow(2, 32) - 1) {\n return false;\n }\n const s = `${i}`;\n if (P !== s) {\n return false;\n }\n return true;\n}\n\nconst byteLengthGetter =\n Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, \"byteLength\").get;\nfunction isArrayBuffer(value) {\n try {\n byteLengthGetter.call(value);\n return true;\n } catch (e) {\n return false;\n }\n}\n\nconst supportsPropertyIndex = Symbol(\"supports property index\");\nconst supportedPropertyIndices = Symbol(\"supported property indices\");\nconst supportsPropertyName = Symbol(\"supports property name\");\nconst supportedPropertyNames = Symbol(\"supported property names\");\nconst indexedGet = Symbol(\"indexed property get\");\nconst indexedSetNew = Symbol(\"indexed property set new\");\nconst indexedSetExisting = Symbol(\"indexed property set existing\");\nconst namedGet = Symbol(\"named property get\");\nconst namedSetNew = Symbol(\"named property set new\");\nconst namedSetExisting = Symbol(\"named property set existing\");\nconst namedDelete = Symbol(\"named property delete\");\n\nmodule.exports = exports = {\n isObject,\n hasOwn,\n wrapperSymbol,\n implSymbol,\n getSameObject,\n ctorRegistrySymbol,\n wrapperForImpl,\n implForWrapper,\n tryWrapperForImpl,\n tryImplForWrapper,\n iterInternalSymbol,\n IteratorPrototype,\n isArrayBuffer,\n isArrayIndexPropName,\n supportsPropertyIndex,\n supportedPropertyIndices,\n supportsPropertyName,\n supportedPropertyNames,\n indexedGet,\n indexedSetNew,\n indexedSetExisting,\n namedGet,\n namedSetNew,\n namedSetExisting,\n namedDelete\n};\n","\"use strict\";\n\nfunction _(message, opts) {\n return `${opts && opts.context ? opts.context : \"Value\"} ${message}.`;\n}\n\nfunction type(V) {\n if (V === null) {\n return \"Null\";\n }\n switch (typeof V) {\n case \"undefined\":\n return \"Undefined\";\n case \"boolean\":\n return \"Boolean\";\n case \"number\":\n return \"Number\";\n case \"string\":\n return \"String\";\n case \"symbol\":\n return \"Symbol\";\n case \"object\":\n // Falls through\n case \"function\":\n // Falls through\n default:\n // Per ES spec, typeof returns an implemention-defined value that is not any of the existing ones for\n // uncallable non-standard exotic objects. Yet Type() which the Web IDL spec depends on returns Object for\n // such cases. So treat the default case as an object.\n return \"Object\";\n }\n}\n\n// Round x to the nearest integer, choosing the even integer if it lies halfway between two.\nfunction evenRound(x) {\n // There are four cases for numbers with fractional part being .5:\n //\n // case | x | floor(x) | round(x) | expected | x <> 0 | x % 1 | x & 1 | example\n // 1 | 2n + 0.5 | 2n | 2n + 1 | 2n | > | 0.5 | 0 | 0.5 -> 0\n // 2 | 2n + 1.5 | 2n + 1 | 2n + 2 | 2n + 2 | > | 0.5 | 1 | 1.5 -> 2\n // 3 | -2n - 0.5 | -2n - 1 | -2n | -2n | < | -0.5 | 0 | -0.5 -> 0\n // 4 | -2n - 1.5 | -2n - 2 | -2n - 1 | -2n - 2 | < | -0.5 | 1 | -1.5 -> -2\n // (where n is a non-negative integer)\n //\n // Branch here for cases 1 and 4\n if ((x > 0 && (x % 1) === +0.5 && (x & 1) === 0) ||\n (x < 0 && (x % 1) === -0.5 && (x & 1) === 1)) {\n return censorNegativeZero(Math.floor(x));\n }\n\n return censorNegativeZero(Math.round(x));\n}\n\nfunction integerPart(n) {\n return censorNegativeZero(Math.trunc(n));\n}\n\nfunction sign(x) {\n return x < 0 ? -1 : 1;\n}\n\nfunction modulo(x, y) {\n // https://tc39.github.io/ecma262/#eqn-modulo\n // Note that http://stackoverflow.com/a/4467559/3191 does NOT work for large modulos\n const signMightNotMatch = x % y;\n if (sign(y) !== sign(signMightNotMatch)) {\n return signMightNotMatch + y;\n }\n return signMightNotMatch;\n}\n\nfunction censorNegativeZero(x) {\n return x === 0 ? 0 : x;\n}\n\nfunction createIntegerConversion(bitLength, typeOpts) {\n const isSigned = !typeOpts.unsigned;\n\n let lowerBound;\n let upperBound;\n if (bitLength === 64) {\n upperBound = Math.pow(2, 53) - 1;\n lowerBound = !isSigned ? 0 : -Math.pow(2, 53) + 1;\n } else if (!isSigned) {\n lowerBound = 0;\n upperBound = Math.pow(2, bitLength) - 1;\n } else {\n lowerBound = -Math.pow(2, bitLength - 1);\n upperBound = Math.pow(2, bitLength - 1) - 1;\n }\n\n const twoToTheBitLength = Math.pow(2, bitLength);\n const twoToOneLessThanTheBitLength = Math.pow(2, bitLength - 1);\n\n return (V, opts) => {\n if (opts === undefined) {\n opts = {};\n }\n\n let x = +V;\n x = censorNegativeZero(x); // Spec discussion ongoing: https://github.com/heycam/webidl/issues/306\n\n if (opts.enforceRange) {\n if (!Number.isFinite(x)) {\n throw new TypeError(_(\"is not a finite number\", opts));\n }\n\n x = integerPart(x);\n\n if (x < lowerBound || x > upperBound) {\n throw new TypeError(_(\n `is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`, opts));\n }\n\n return x;\n }\n\n if (!Number.isNaN(x) && opts.clamp) {\n x = Math.min(Math.max(x, lowerBound), upperBound);\n x = evenRound(x);\n return x;\n }\n\n if (!Number.isFinite(x) || x === 0) {\n return 0;\n }\n x = integerPart(x);\n\n // Math.pow(2, 64) is not accurately representable in JavaScript, so try to avoid these per-spec operations if\n // possible. Hopefully it's an optimization for the non-64-bitLength cases too.\n if (x >= lowerBound && x <= upperBound) {\n return x;\n }\n\n // These will not work great for bitLength of 64, but oh well. See the README for more details.\n x = modulo(x, twoToTheBitLength);\n if (isSigned && x >= twoToOneLessThanTheBitLength) {\n return x - twoToTheBitLength;\n }\n return x;\n };\n}\n\nexports.any = V => {\n return V;\n};\n\nexports.void = function () {\n return undefined;\n};\n\nexports.boolean = function (val) {\n return !!val;\n};\n\nexports.byte = createIntegerConversion(8, { unsigned: false });\nexports.octet = createIntegerConversion(8, { unsigned: true });\n\nexports.short = createIntegerConversion(16, { unsigned: false });\nexports[\"unsigned short\"] = createIntegerConversion(16, { unsigned: true });\n\nexports.long = createIntegerConversion(32, { unsigned: false });\nexports[\"unsigned long\"] = createIntegerConversion(32, { unsigned: true });\n\nexports[\"long long\"] = createIntegerConversion(64, { unsigned: false });\nexports[\"unsigned long long\"] = createIntegerConversion(64, { unsigned: true });\n\nexports.double = (V, opts) => {\n const x = +V;\n\n if (!Number.isFinite(x)) {\n throw new TypeError(_(\"is not a finite floating-point value\", opts));\n }\n\n return x;\n};\n\nexports[\"unrestricted double\"] = V => {\n const x = +V;\n\n return x;\n};\n\nexports.float = (V, opts) => {\n const x = +V;\n\n if (!Number.isFinite(x)) {\n throw new TypeError(_(\"is not a finite floating-point value\", opts));\n }\n\n if (Object.is(x, -0)) {\n return x;\n }\n\n const y = Math.fround(x);\n\n if (!Number.isFinite(y)) {\n throw new TypeError(_(\"is outside the range of a single-precision floating-point value\", opts));\n }\n\n return y;\n};\n\nexports[\"unrestricted float\"] = V => {\n const x = +V;\n\n if (isNaN(x)) {\n return x;\n }\n\n if (Object.is(x, -0)) {\n return x;\n }\n\n return Math.fround(x);\n};\n\nexports.DOMString = function (V, opts) {\n if (opts === undefined) {\n opts = {};\n }\n\n if (opts.treatNullAsEmptyString && V === null) {\n return \"\";\n }\n\n if (typeof V === \"symbol\") {\n throw new TypeError(_(\"is a symbol, which cannot be converted to a string\", opts));\n }\n\n return String(V);\n};\n\nexports.ByteString = (V, opts) => {\n const x = exports.DOMString(V, opts);\n let c;\n for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) {\n if (c > 255) {\n throw new TypeError(_(\"is not a valid ByteString\", opts));\n }\n }\n\n return x;\n};\n\nexports.USVString = (V, opts) => {\n const S = exports.DOMString(V, opts);\n const n = S.length;\n const U = [];\n for (let i = 0; i < n; ++i) {\n const c = S.charCodeAt(i);\n if (c < 0xD800 || c > 0xDFFF) {\n U.push(String.fromCodePoint(c));\n } else if (0xDC00 <= c && c <= 0xDFFF) {\n U.push(String.fromCodePoint(0xFFFD));\n } else if (i === n - 1) {\n U.push(String.fromCodePoint(0xFFFD));\n } else {\n const d = S.charCodeAt(i + 1);\n if (0xDC00 <= d && d <= 0xDFFF) {\n const a = c & 0x3FF;\n const b = d & 0x3FF;\n U.push(String.fromCodePoint((2 << 15) + ((2 << 9) * a) + b));\n ++i;\n } else {\n U.push(String.fromCodePoint(0xFFFD));\n }\n }\n }\n\n return U.join(\"\");\n};\n\nexports.object = (V, opts) => {\n if (type(V) !== \"Object\") {\n throw new TypeError(_(\"is not an object\", opts));\n }\n\n return V;\n};\n\n// Not exported, but used in Function and VoidFunction.\n\n// Neither Function nor VoidFunction is defined with [TreatNonObjectAsNull], so\n// handling for that is omitted.\nfunction convertCallbackFunction(V, opts) {\n if (typeof V !== \"function\") {\n throw new TypeError(_(\"is not a function\", opts));\n }\n return V;\n}\n\nconst abByteLengthGetter =\n Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, \"byteLength\").get;\n\nfunction isArrayBuffer(V) {\n try {\n abByteLengthGetter.call(V);\n return true;\n } catch (e) {\n return false;\n }\n}\n\n// I don't think we can reliably detect detached ArrayBuffers.\nexports.ArrayBuffer = (V, opts) => {\n if (!isArrayBuffer(V)) {\n throw new TypeError(_(\"is not a view on an ArrayBuffer object\", opts));\n }\n return V;\n};\n\nconst dvByteLengthGetter =\n Object.getOwnPropertyDescriptor(DataView.prototype, \"byteLength\").get;\nexports.DataView = (V, opts) => {\n try {\n dvByteLengthGetter.call(V);\n return V;\n } catch (e) {\n throw new TypeError(_(\"is not a view on an DataView object\", opts));\n }\n};\n\n[\n Int8Array, Int16Array, Int32Array, Uint8Array,\n Uint16Array, Uint32Array, Uint8ClampedArray, Float32Array, Float64Array\n].forEach(func => {\n const name = func.name;\n const article = /^[AEIOU]/.test(name) ? \"an\" : \"a\";\n exports[name] = (V, opts) => {\n if (!ArrayBuffer.isView(V) || V.constructor.name !== name) {\n throw new TypeError(_(`is not ${article} ${name} object`, opts));\n }\n\n return V;\n };\n});\n\n// Common definitions\n\nexports.ArrayBufferView = (V, opts) => {\n if (!ArrayBuffer.isView(V)) {\n throw new TypeError(_(\"is not a view on an ArrayBuffer object\", opts));\n }\n\n return V;\n};\n\nexports.BufferSource = (V, opts) => {\n if (!ArrayBuffer.isView(V) && !isArrayBuffer(V)) {\n throw new TypeError(_(\"is not an ArrayBuffer object or a view on one\", opts));\n }\n\n return V;\n};\n\nexports.DOMTimeStamp = exports[\"unsigned long long\"];\n\nexports.Function = convertCallbackFunction;\n\nexports.VoidFunction = convertCallbackFunction;\n","\"use strict\";\nconst DOMException = require(\"./lib/DOMException.js\");\n\n// Special install function to make the DOMException inherit from Error.\n// https://heycam.github.io/webidl/#es-DOMException-specialness\nfunction installOverride(globalObject) {\n if (typeof globalObject.Error !== \"function\") {\n throw new Error(\"Internal error: Error constructor is not present on the given global object.\");\n }\n\n DOMException.install(globalObject);\n Object.setPrototypeOf(globalObject.DOMException.prototype, globalObject.Error.prototype);\n}\n\nmodule.exports = {...DOMException, install: installOverride };\n","\"use strict\";\n\nvar stream = require(\"stream\");\n\nfunction DuplexWrapper(options, writable, readable) {\n if (typeof readable === \"undefined\") {\n readable = writable;\n writable = options;\n options = null;\n }\n\n stream.Duplex.call(this, options);\n\n if (typeof readable.read !== \"function\") {\n readable = (new stream.Readable(options)).wrap(readable);\n }\n\n this._writable = writable;\n this._readable = readable;\n this._waiting = false;\n\n var self = this;\n\n writable.once(\"finish\", function() {\n self.end();\n });\n\n this.once(\"finish\", function() {\n writable.end();\n });\n\n readable.on(\"readable\", function() {\n if (self._waiting) {\n self._waiting = false;\n self._read();\n }\n });\n\n readable.once(\"end\", function() {\n self.push(null);\n });\n\n if (!options || typeof options.bubbleErrors === \"undefined\" || options.bubbleErrors) {\n writable.on(\"error\", function(err) {\n self.emit(\"error\", err);\n });\n\n readable.on(\"error\", function(err) {\n self.emit(\"error\", err);\n });\n }\n}\n\nDuplexWrapper.prototype = Object.create(stream.Duplex.prototype, {constructor: {value: DuplexWrapper}});\n\nDuplexWrapper.prototype._write = function _write(input, encoding, done) {\n this._writable.write(input, encoding, done);\n};\n\nDuplexWrapper.prototype._read = function _read() {\n var buf;\n var reads = 0;\n while ((buf = this._readable.read()) !== null) {\n this.push(buf);\n reads++;\n }\n if (reads === 0) {\n this._waiting = true;\n }\n};\n\nmodule.exports = function duplex2(options, writable, readable) {\n return new DuplexWrapper(options, writable, readable);\n};\n\nmodule.exports.DuplexWrapper = DuplexWrapper;\n","var crypto = require(\"crypto\");\nvar BigInteger = require(\"jsbn\").BigInteger;\nvar ECPointFp = require(\"./lib/ec.js\").ECPointFp;\nvar Buffer = require(\"safer-buffer\").Buffer;\nexports.ECCurves = require(\"./lib/sec.js\");\n\n// zero prepad\nfunction unstupid(hex,len)\n{\n\treturn (hex.length >= len) ? hex : unstupid(\"0\"+hex,len);\n}\n\nexports.ECKey = function(curve, key, isPublic)\n{\n var priv;\n\tvar c = curve();\n\tvar n = c.getN();\n var bytes = Math.floor(n.bitLength()/8);\n\n if(key)\n {\n if(isPublic)\n {\n var curve = c.getCurve();\n// var x = key.slice(1,bytes+1); // skip the 04 for uncompressed format\n// var y = key.slice(bytes+1);\n// this.P = new ECPointFp(curve,\n// curve.fromBigInteger(new BigInteger(x.toString(\"hex\"), 16)),\n// curve.fromBigInteger(new BigInteger(y.toString(\"hex\"), 16))); \n this.P = curve.decodePointHex(key.toString(\"hex\"));\n }else{\n if(key.length != bytes) return false;\n priv = new BigInteger(key.toString(\"hex\"), 16); \n }\n }else{\n var n1 = n.subtract(BigInteger.ONE);\n var r = new BigInteger(crypto.randomBytes(n.bitLength()));\n priv = r.mod(n1).add(BigInteger.ONE);\n this.P = c.getG().multiply(priv);\n }\n if(this.P)\n {\n// var pubhex = unstupid(this.P.getX().toBigInteger().toString(16),bytes*2)+unstupid(this.P.getY().toBigInteger().toString(16),bytes*2);\n// this.PublicKey = Buffer.from(\"04\"+pubhex,\"hex\");\n this.PublicKey = Buffer.from(c.getCurve().encodeCompressedPointHex(this.P),\"hex\");\n }\n if(priv)\n {\n this.PrivateKey = Buffer.from(unstupid(priv.toString(16),bytes*2),\"hex\");\n this.deriveSharedSecret = function(key)\n {\n if(!key || !key.P) return false;\n var S = key.P.multiply(priv);\n return Buffer.from(unstupid(S.getX().toBigInteger().toString(16),bytes*2),\"hex\");\n } \n }\n}\n\n","// Basic Javascript Elliptic Curve implementation\n// Ported loosely from BouncyCastle's Java EC code\n// Only Fp curves implemented for now\n\n// Requires jsbn.js and jsbn2.js\nvar BigInteger = require('jsbn').BigInteger\nvar Barrett = BigInteger.prototype.Barrett\n\n// ----------------\n// ECFieldElementFp\n\n// constructor\nfunction ECFieldElementFp(q,x) {\n this.x = x;\n // TODO if(x.compareTo(q) >= 0) error\n this.q = q;\n}\n\nfunction feFpEquals(other) {\n if(other == this) return true;\n return (this.q.equals(other.q) && this.x.equals(other.x));\n}\n\nfunction feFpToBigInteger() {\n return this.x;\n}\n\nfunction feFpNegate() {\n return new ECFieldElementFp(this.q, this.x.negate().mod(this.q));\n}\n\nfunction feFpAdd(b) {\n return new ECFieldElementFp(this.q, this.x.add(b.toBigInteger()).mod(this.q));\n}\n\nfunction feFpSubtract(b) {\n return new ECFieldElementFp(this.q, this.x.subtract(b.toBigInteger()).mod(this.q));\n}\n\nfunction feFpMultiply(b) {\n return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger()).mod(this.q));\n}\n\nfunction feFpSquare() {\n return new ECFieldElementFp(this.q, this.x.square().mod(this.q));\n}\n\nfunction feFpDivide(b) {\n return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger().modInverse(this.q)).mod(this.q));\n}\n\nECFieldElementFp.prototype.equals = feFpEquals;\nECFieldElementFp.prototype.toBigInteger = feFpToBigInteger;\nECFieldElementFp.prototype.negate = feFpNegate;\nECFieldElementFp.prototype.add = feFpAdd;\nECFieldElementFp.prototype.subtract = feFpSubtract;\nECFieldElementFp.prototype.multiply = feFpMultiply;\nECFieldElementFp.prototype.square = feFpSquare;\nECFieldElementFp.prototype.divide = feFpDivide;\n\n// ----------------\n// ECPointFp\n\n// constructor\nfunction ECPointFp(curve,x,y,z) {\n this.curve = curve;\n this.x = x;\n this.y = y;\n // Projective coordinates: either zinv == null or z * zinv == 1\n // z and zinv are just BigIntegers, not fieldElements\n if(z == null) {\n this.z = BigInteger.ONE;\n }\n else {\n this.z = z;\n }\n this.zinv = null;\n //TODO: compression flag\n}\n\nfunction pointFpGetX() {\n if(this.zinv == null) {\n this.zinv = this.z.modInverse(this.curve.q);\n }\n var r = this.x.toBigInteger().multiply(this.zinv);\n this.curve.reduce(r);\n return this.curve.fromBigInteger(r);\n}\n\nfunction pointFpGetY() {\n if(this.zinv == null) {\n this.zinv = this.z.modInverse(this.curve.q);\n }\n var r = this.y.toBigInteger().multiply(this.zinv);\n this.curve.reduce(r);\n return this.curve.fromBigInteger(r);\n}\n\nfunction pointFpEquals(other) {\n if(other == this) return true;\n if(this.isInfinity()) return other.isInfinity();\n if(other.isInfinity()) return this.isInfinity();\n var u, v;\n // u = Y2 * Z1 - Y1 * Z2\n u = other.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(other.z)).mod(this.curve.q);\n if(!u.equals(BigInteger.ZERO)) return false;\n // v = X2 * Z1 - X1 * Z2\n v = other.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(other.z)).mod(this.curve.q);\n return v.equals(BigInteger.ZERO);\n}\n\nfunction pointFpIsInfinity() {\n if((this.x == null) && (this.y == null)) return true;\n return this.z.equals(BigInteger.ZERO) && !this.y.toBigInteger().equals(BigInteger.ZERO);\n}\n\nfunction pointFpNegate() {\n return new ECPointFp(this.curve, this.x, this.y.negate(), this.z);\n}\n\nfunction pointFpAdd(b) {\n if(this.isInfinity()) return b;\n if(b.isInfinity()) return this;\n\n // u = Y2 * Z1 - Y1 * Z2\n var u = b.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(b.z)).mod(this.curve.q);\n // v = X2 * Z1 - X1 * Z2\n var v = b.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(b.z)).mod(this.curve.q);\n\n if(BigInteger.ZERO.equals(v)) {\n if(BigInteger.ZERO.equals(u)) {\n return this.twice(); // this == b, so double\n }\n\treturn this.curve.getInfinity(); // this = -b, so infinity\n }\n\n var THREE = new BigInteger(\"3\");\n var x1 = this.x.toBigInteger();\n var y1 = this.y.toBigInteger();\n var x2 = b.x.toBigInteger();\n var y2 = b.y.toBigInteger();\n\n var v2 = v.square();\n var v3 = v2.multiply(v);\n var x1v2 = x1.multiply(v2);\n var zu2 = u.square().multiply(this.z);\n\n // x3 = v * (z2 * (z1 * u^2 - 2 * x1 * v^2) - v^3)\n var x3 = zu2.subtract(x1v2.shiftLeft(1)).multiply(b.z).subtract(v3).multiply(v).mod(this.curve.q);\n // y3 = z2 * (3 * x1 * u * v^2 - y1 * v^3 - z1 * u^3) + u * v^3\n var y3 = x1v2.multiply(THREE).multiply(u).subtract(y1.multiply(v3)).subtract(zu2.multiply(u)).multiply(b.z).add(u.multiply(v3)).mod(this.curve.q);\n // z3 = v^3 * z1 * z2\n var z3 = v3.multiply(this.z).multiply(b.z).mod(this.curve.q);\n\n return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3);\n}\n\nfunction pointFpTwice() {\n if(this.isInfinity()) return this;\n if(this.y.toBigInteger().signum() == 0) return this.curve.getInfinity();\n\n // TODO: optimized handling of constants\n var THREE = new BigInteger(\"3\");\n var x1 = this.x.toBigInteger();\n var y1 = this.y.toBigInteger();\n\n var y1z1 = y1.multiply(this.z);\n var y1sqz1 = y1z1.multiply(y1).mod(this.curve.q);\n var a = this.curve.a.toBigInteger();\n\n // w = 3 * x1^2 + a * z1^2\n var w = x1.square().multiply(THREE);\n if(!BigInteger.ZERO.equals(a)) {\n w = w.add(this.z.square().multiply(a));\n }\n w = w.mod(this.curve.q);\n //this.curve.reduce(w);\n // x3 = 2 * y1 * z1 * (w^2 - 8 * x1 * y1^2 * z1)\n var x3 = w.square().subtract(x1.shiftLeft(3).multiply(y1sqz1)).shiftLeft(1).multiply(y1z1).mod(this.curve.q);\n // y3 = 4 * y1^2 * z1 * (3 * w * x1 - 2 * y1^2 * z1) - w^3\n var y3 = w.multiply(THREE).multiply(x1).subtract(y1sqz1.shiftLeft(1)).shiftLeft(2).multiply(y1sqz1).subtract(w.square().multiply(w)).mod(this.curve.q);\n // z3 = 8 * (y1 * z1)^3\n var z3 = y1z1.square().multiply(y1z1).shiftLeft(3).mod(this.curve.q);\n\n return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3);\n}\n\n// Simple NAF (Non-Adjacent Form) multiplication algorithm\n// TODO: modularize the multiplication algorithm\nfunction pointFpMultiply(k) {\n if(this.isInfinity()) return this;\n if(k.signum() == 0) return this.curve.getInfinity();\n\n var e = k;\n var h = e.multiply(new BigInteger(\"3\"));\n\n var neg = this.negate();\n var R = this;\n\n var i;\n for(i = h.bitLength() - 2; i > 0; --i) {\n\tR = R.twice();\n\n\tvar hBit = h.testBit(i);\n\tvar eBit = e.testBit(i);\n\n\tif (hBit != eBit) {\n\t R = R.add(hBit ? this : neg);\n\t}\n }\n\n return R;\n}\n\n// Compute this*j + x*k (simultaneous multiplication)\nfunction pointFpMultiplyTwo(j,x,k) {\n var i;\n if(j.bitLength() > k.bitLength())\n i = j.bitLength() - 1;\n else\n i = k.bitLength() - 1;\n\n var R = this.curve.getInfinity();\n var both = this.add(x);\n while(i >= 0) {\n R = R.twice();\n if(j.testBit(i)) {\n if(k.testBit(i)) {\n R = R.add(both);\n }\n else {\n R = R.add(this);\n }\n }\n else {\n if(k.testBit(i)) {\n R = R.add(x);\n }\n }\n --i;\n }\n\n return R;\n}\n\nECPointFp.prototype.getX = pointFpGetX;\nECPointFp.prototype.getY = pointFpGetY;\nECPointFp.prototype.equals = pointFpEquals;\nECPointFp.prototype.isInfinity = pointFpIsInfinity;\nECPointFp.prototype.negate = pointFpNegate;\nECPointFp.prototype.add = pointFpAdd;\nECPointFp.prototype.twice = pointFpTwice;\nECPointFp.prototype.multiply = pointFpMultiply;\nECPointFp.prototype.multiplyTwo = pointFpMultiplyTwo;\n\n// ----------------\n// ECCurveFp\n\n// constructor\nfunction ECCurveFp(q,a,b) {\n this.q = q;\n this.a = this.fromBigInteger(a);\n this.b = this.fromBigInteger(b);\n this.infinity = new ECPointFp(this, null, null);\n this.reducer = new Barrett(this.q);\n}\n\nfunction curveFpGetQ() {\n return this.q;\n}\n\nfunction curveFpGetA() {\n return this.a;\n}\n\nfunction curveFpGetB() {\n return this.b;\n}\n\nfunction curveFpEquals(other) {\n if(other == this) return true;\n return(this.q.equals(other.q) && this.a.equals(other.a) && this.b.equals(other.b));\n}\n\nfunction curveFpGetInfinity() {\n return this.infinity;\n}\n\nfunction curveFpFromBigInteger(x) {\n return new ECFieldElementFp(this.q, x);\n}\n\nfunction curveReduce(x) {\n this.reducer.reduce(x);\n}\n\n// for now, work with hex strings because they're easier in JS\nfunction curveFpDecodePointHex(s) {\n switch(parseInt(s.substr(0,2), 16)) { // first byte\n case 0:\n\treturn this.infinity;\n case 2:\n case 3:\n\t// point compression not supported yet\n\treturn null;\n case 4:\n case 6:\n case 7:\n\tvar len = (s.length - 2) / 2;\n\tvar xHex = s.substr(2, len);\n\tvar yHex = s.substr(len+2, len);\n\n\treturn new ECPointFp(this,\n\t\t\t this.fromBigInteger(new BigInteger(xHex, 16)),\n\t\t\t this.fromBigInteger(new BigInteger(yHex, 16)));\n\n default: // unsupported\n\treturn null;\n }\n}\n\nfunction curveFpEncodePointHex(p) {\n\tif (p.isInfinity()) return \"00\";\n\tvar xHex = p.getX().toBigInteger().toString(16);\n\tvar yHex = p.getY().toBigInteger().toString(16);\n\tvar oLen = this.getQ().toString(16).length;\n\tif ((oLen % 2) != 0) oLen++;\n\twhile (xHex.length < oLen) {\n\t\txHex = \"0\" + xHex;\n\t}\n\twhile (yHex.length < oLen) {\n\t\tyHex = \"0\" + yHex;\n\t}\n\treturn \"04\" + xHex + yHex;\n}\n\nECCurveFp.prototype.getQ = curveFpGetQ;\nECCurveFp.prototype.getA = curveFpGetA;\nECCurveFp.prototype.getB = curveFpGetB;\nECCurveFp.prototype.equals = curveFpEquals;\nECCurveFp.prototype.getInfinity = curveFpGetInfinity;\nECCurveFp.prototype.fromBigInteger = curveFpFromBigInteger;\nECCurveFp.prototype.reduce = curveReduce;\n//ECCurveFp.prototype.decodePointHex = curveFpDecodePointHex;\nECCurveFp.prototype.encodePointHex = curveFpEncodePointHex;\n\n// from: https://github.com/kaielvin/jsbn-ec-point-compression\nECCurveFp.prototype.decodePointHex = function(s)\n{\n\tvar yIsEven;\n switch(parseInt(s.substr(0,2), 16)) { // first byte\n case 0:\n\treturn this.infinity;\n case 2:\n\tyIsEven = false;\n case 3:\n\tif(yIsEven == undefined) yIsEven = true;\n\tvar len = s.length - 2;\n\tvar xHex = s.substr(2, len);\n\tvar x = this.fromBigInteger(new BigInteger(xHex,16));\n\tvar alpha = x.multiply(x.square().add(this.getA())).add(this.getB());\n\tvar beta = alpha.sqrt();\n\n if (beta == null) throw \"Invalid point compression\";\n\n var betaValue = beta.toBigInteger();\n if (betaValue.testBit(0) != yIsEven)\n {\n // Use the other root\n beta = this.fromBigInteger(this.getQ().subtract(betaValue));\n }\n return new ECPointFp(this,x,beta);\n case 4:\n case 6:\n case 7:\n\tvar len = (s.length - 2) / 2;\n\tvar xHex = s.substr(2, len);\n\tvar yHex = s.substr(len+2, len);\n\n\treturn new ECPointFp(this,\n\t\t\t this.fromBigInteger(new BigInteger(xHex, 16)),\n\t\t\t this.fromBigInteger(new BigInteger(yHex, 16)));\n\n default: // unsupported\n\treturn null;\n }\n}\nECCurveFp.prototype.encodeCompressedPointHex = function(p)\n{\n\tif (p.isInfinity()) return \"00\";\n\tvar xHex = p.getX().toBigInteger().toString(16);\n\tvar oLen = this.getQ().toString(16).length;\n\tif ((oLen % 2) != 0) oLen++;\n\twhile (xHex.length < oLen)\n\t\txHex = \"0\" + xHex;\n\tvar yPrefix;\n\tif(p.getY().toBigInteger().isEven()) yPrefix = \"02\";\n\telse yPrefix = \"03\";\n\n\treturn yPrefix + xHex;\n}\n\n\nECFieldElementFp.prototype.getR = function()\n{\n\tif(this.r != undefined) return this.r;\n\n this.r = null;\n var bitLength = this.q.bitLength();\n if (bitLength > 128)\n {\n var firstWord = this.q.shiftRight(bitLength - 64);\n if (firstWord.intValue() == -1)\n {\n this.r = BigInteger.ONE.shiftLeft(bitLength).subtract(this.q);\n }\n }\n return this.r;\n}\nECFieldElementFp.prototype.modMult = function(x1,x2)\n{\n return this.modReduce(x1.multiply(x2));\n}\nECFieldElementFp.prototype.modReduce = function(x)\n{\n if (this.getR() != null)\n {\n var qLen = q.bitLength();\n while (x.bitLength() > (qLen + 1))\n {\n var u = x.shiftRight(qLen);\n var v = x.subtract(u.shiftLeft(qLen));\n if (!this.getR().equals(BigInteger.ONE))\n {\n u = u.multiply(this.getR());\n }\n x = u.add(v); \n }\n while (x.compareTo(q) >= 0)\n {\n x = x.subtract(q);\n }\n }\n else\n {\n x = x.mod(q);\n }\n return x;\n}\nECFieldElementFp.prototype.sqrt = function()\n{\n if (!this.q.testBit(0)) throw \"unsupported\";\n\n // p mod 4 == 3\n if (this.q.testBit(1))\n {\n \tvar z = new ECFieldElementFp(this.q,this.x.modPow(this.q.shiftRight(2).add(BigInteger.ONE),this.q));\n \treturn z.square().equals(this) ? z : null;\n }\n\n // p mod 4 == 1\n var qMinusOne = this.q.subtract(BigInteger.ONE);\n\n var legendreExponent = qMinusOne.shiftRight(1);\n if (!(this.x.modPow(legendreExponent, this.q).equals(BigInteger.ONE)))\n {\n return null;\n }\n\n var u = qMinusOne.shiftRight(2);\n var k = u.shiftLeft(1).add(BigInteger.ONE);\n\n var Q = this.x;\n var fourQ = modDouble(modDouble(Q));\n\n var U, V;\n do\n {\n var P;\n do\n {\n P = new BigInteger(this.q.bitLength(), new SecureRandom());\n }\n while (P.compareTo(this.q) >= 0\n || !(P.multiply(P).subtract(fourQ).modPow(legendreExponent, this.q).equals(qMinusOne)));\n\n var result = this.lucasSequence(P, Q, k);\n U = result[0];\n V = result[1];\n\n if (this.modMult(V, V).equals(fourQ))\n {\n // Integer division by 2, mod q\n if (V.testBit(0))\n {\n V = V.add(q);\n }\n\n V = V.shiftRight(1);\n\n return new ECFieldElementFp(q,V);\n }\n }\n while (U.equals(BigInteger.ONE) || U.equals(qMinusOne));\n\n return null;\n}\nECFieldElementFp.prototype.lucasSequence = function(P,Q,k)\n{\n var n = k.bitLength();\n var s = k.getLowestSetBit();\n\n var Uh = BigInteger.ONE;\n var Vl = BigInteger.TWO;\n var Vh = P;\n var Ql = BigInteger.ONE;\n var Qh = BigInteger.ONE;\n\n for (var j = n - 1; j >= s + 1; --j)\n {\n Ql = this.modMult(Ql, Qh);\n\n if (k.testBit(j))\n {\n Qh = this.modMult(Ql, Q);\n Uh = this.modMult(Uh, Vh);\n Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));\n Vh = this.modReduce(Vh.multiply(Vh).subtract(Qh.shiftLeft(1)));\n }\n else\n {\n Qh = Ql;\n Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql));\n Vh = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));\n Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1)));\n }\n }\n\n Ql = this.modMult(Ql, Qh);\n Qh = this.modMult(Ql, Q);\n Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql));\n Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));\n Ql = this.modMult(Ql, Qh);\n\n for (var j = 1; j <= s; ++j)\n {\n Uh = this.modMult(Uh, Vl);\n Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1)));\n Ql = this.modMult(Ql, Ql);\n }\n\n return [ Uh, Vl ];\n}\n\nvar exports = {\n ECCurveFp: ECCurveFp,\n ECPointFp: ECPointFp,\n ECFieldElementFp: ECFieldElementFp\n}\n\nmodule.exports = exports\n","// Named EC curves\n\n// Requires ec.js, jsbn.js, and jsbn2.js\nvar BigInteger = require('jsbn').BigInteger\nvar ECCurveFp = require('./ec.js').ECCurveFp\n\n\n// ----------------\n// X9ECParameters\n\n// constructor\nfunction X9ECParameters(curve,g,n,h) {\n this.curve = curve;\n this.g = g;\n this.n = n;\n this.h = h;\n}\n\nfunction x9getCurve() {\n return this.curve;\n}\n\nfunction x9getG() {\n return this.g;\n}\n\nfunction x9getN() {\n return this.n;\n}\n\nfunction x9getH() {\n return this.h;\n}\n\nX9ECParameters.prototype.getCurve = x9getCurve;\nX9ECParameters.prototype.getG = x9getG;\nX9ECParameters.prototype.getN = x9getN;\nX9ECParameters.prototype.getH = x9getH;\n\n// ----------------\n// SECNamedCurves\n\nfunction fromHex(s) { return new BigInteger(s, 16); }\n\nfunction secp128r1() {\n // p = 2^128 - 2^97 - 1\n var p = fromHex(\"FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF\");\n var a = fromHex(\"FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC\");\n var b = fromHex(\"E87579C11079F43DD824993C2CEE5ED3\");\n //byte[] S = Hex.decode(\"000E0D4D696E6768756151750CC03A4473D03679\");\n var n = fromHex(\"FFFFFFFE0000000075A30D1B9038A115\");\n var h = BigInteger.ONE;\n var curve = new ECCurveFp(p, a, b);\n var G = curve.decodePointHex(\"04\"\n + \"161FF7528B899B2D0C28607CA52C5B86\"\n\t\t+ \"CF5AC8395BAFEB13C02DA292DDED7A83\");\n return new X9ECParameters(curve, G, n, h);\n}\n\nfunction secp160k1() {\n // p = 2^160 - 2^32 - 2^14 - 2^12 - 2^9 - 2^8 - 2^7 - 2^3 - 2^2 - 1\n var p = fromHex(\"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73\");\n var a = BigInteger.ZERO;\n var b = fromHex(\"7\");\n //byte[] S = null;\n var n = fromHex(\"0100000000000000000001B8FA16DFAB9ACA16B6B3\");\n var h = BigInteger.ONE;\n var curve = new ECCurveFp(p, a, b);\n var G = curve.decodePointHex(\"04\"\n + \"3B4C382CE37AA192A4019E763036F4F5DD4D7EBB\"\n + \"938CF935318FDCED6BC28286531733C3F03C4FEE\");\n return new X9ECParameters(curve, G, n, h);\n}\n\nfunction secp160r1() {\n // p = 2^160 - 2^31 - 1\n var p = fromHex(\"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF\");\n var a = fromHex(\"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC\");\n var b = fromHex(\"1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45\");\n //byte[] S = Hex.decode(\"1053CDE42C14D696E67687561517533BF3F83345\");\n var n = fromHex(\"0100000000000000000001F4C8F927AED3CA752257\");\n var h = BigInteger.ONE;\n var curve = new ECCurveFp(p, a, b);\n var G = curve.decodePointHex(\"04\"\n\t\t+ \"4A96B5688EF573284664698968C38BB913CBFC82\"\n\t\t+ \"23A628553168947D59DCC912042351377AC5FB32\");\n return new X9ECParameters(curve, G, n, h);\n}\n\nfunction secp192k1() {\n // p = 2^192 - 2^32 - 2^12 - 2^8 - 2^7 - 2^6 - 2^3 - 1\n var p = fromHex(\"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37\");\n var a = BigInteger.ZERO;\n var b = fromHex(\"3\");\n //byte[] S = null;\n var n = fromHex(\"FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D\");\n var h = BigInteger.ONE;\n var curve = new ECCurveFp(p, a, b);\n var G = curve.decodePointHex(\"04\"\n + \"DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D\"\n + \"9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D\");\n return new X9ECParameters(curve, G, n, h);\n}\n\nfunction secp192r1() {\n // p = 2^192 - 2^64 - 1\n var p = fromHex(\"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF\");\n var a = fromHex(\"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC\");\n var b = fromHex(\"64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1\");\n //byte[] S = Hex.decode(\"3045AE6FC8422F64ED579528D38120EAE12196D5\");\n var n = fromHex(\"FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831\");\n var h = BigInteger.ONE;\n var curve = new ECCurveFp(p, a, b);\n var G = curve.decodePointHex(\"04\"\n + \"188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012\"\n + \"07192B95FFC8DA78631011ED6B24CDD573F977A11E794811\");\n return new X9ECParameters(curve, G, n, h);\n}\n\nfunction secp224r1() {\n // p = 2^224 - 2^96 + 1\n var p = fromHex(\"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001\");\n var a = fromHex(\"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE\");\n var b = fromHex(\"B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4\");\n //byte[] S = Hex.decode(\"BD71344799D5C7FCDC45B59FA3B9AB8F6A948BC5\");\n var n = fromHex(\"FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D\");\n var h = BigInteger.ONE;\n var curve = new ECCurveFp(p, a, b);\n var G = curve.decodePointHex(\"04\"\n + \"B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21\"\n + \"BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34\");\n return new X9ECParameters(curve, G, n, h);\n}\n\nfunction secp256r1() {\n // p = 2^224 (2^32 - 1) + 2^192 + 2^96 - 1\n var p = fromHex(\"FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF\");\n var a = fromHex(\"FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC\");\n var b = fromHex(\"5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B\");\n //byte[] S = Hex.decode(\"C49D360886E704936A6678E1139D26B7819F7E90\");\n var n = fromHex(\"FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551\");\n var h = BigInteger.ONE;\n var curve = new ECCurveFp(p, a, b);\n var G = curve.decodePointHex(\"04\"\n + \"6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296\"\n\t\t+ \"4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5\");\n return new X9ECParameters(curve, G, n, h);\n}\n\n// TODO: make this into a proper hashtable\nfunction getSECCurveByName(name) {\n if(name == \"secp128r1\") return secp128r1();\n if(name == \"secp160k1\") return secp160k1();\n if(name == \"secp160r1\") return secp160r1();\n if(name == \"secp192k1\") return secp192k1();\n if(name == \"secp192r1\") return secp192r1();\n if(name == \"secp224r1\") return secp224r1();\n if(name == \"secp256r1\") return secp256r1();\n return null;\n}\n\nmodule.exports = {\n \"secp128r1\":secp128r1,\n \"secp160k1\":secp160k1,\n \"secp160r1\":secp160r1,\n \"secp192k1\":secp192k1,\n \"secp192r1\":secp192r1,\n \"secp224r1\":secp224r1,\n \"secp256r1\":secp256r1\n}\n","var once = require('once');\n\nvar noop = function() {};\n\nvar isRequest = function(stream) {\n\treturn stream.setHeader && typeof stream.abort === 'function';\n};\n\nvar isChildProcess = function(stream) {\n\treturn stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3\n};\n\nvar eos = function(stream, opts, callback) {\n\tif (typeof opts === 'function') return eos(stream, null, opts);\n\tif (!opts) opts = {};\n\n\tcallback = once(callback || noop);\n\n\tvar ws = stream._writableState;\n\tvar rs = stream._readableState;\n\tvar readable = opts.readable || (opts.readable !== false && stream.readable);\n\tvar writable = opts.writable || (opts.writable !== false && stream.writable);\n\tvar cancelled = false;\n\n\tvar onlegacyfinish = function() {\n\t\tif (!stream.writable) onfinish();\n\t};\n\n\tvar onfinish = function() {\n\t\twritable = false;\n\t\tif (!readable) callback.call(stream);\n\t};\n\n\tvar onend = function() {\n\t\treadable = false;\n\t\tif (!writable) callback.call(stream);\n\t};\n\n\tvar onexit = function(exitCode) {\n\t\tcallback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);\n\t};\n\n\tvar onerror = function(err) {\n\t\tcallback.call(stream, err);\n\t};\n\n\tvar onclose = function() {\n\t\tprocess.nextTick(onclosenexttick);\n\t};\n\n\tvar onclosenexttick = function() {\n\t\tif (cancelled) return;\n\t\tif (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close'));\n\t\tif (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close'));\n\t};\n\n\tvar onrequest = function() {\n\t\tstream.req.on('finish', onfinish);\n\t};\n\n\tif (isRequest(stream)) {\n\t\tstream.on('complete', onfinish);\n\t\tstream.on('abort', onclose);\n\t\tif (stream.req) onrequest();\n\t\telse stream.on('request', onrequest);\n\t} else if (writable && !ws) { // legacy streams\n\t\tstream.on('end', onlegacyfinish);\n\t\tstream.on('close', onlegacyfinish);\n\t}\n\n\tif (isChildProcess(stream)) stream.on('exit', onexit);\n\n\tstream.on('end', onend);\n\tstream.on('finish', onfinish);\n\tif (opts.error !== false) stream.on('error', onerror);\n\tstream.on('close', onclose);\n\n\treturn function() {\n\t\tcancelled = true;\n\t\tstream.removeListener('complete', onfinish);\n\t\tstream.removeListener('abort', onclose);\n\t\tstream.removeListener('request', onrequest);\n\t\tif (stream.req) stream.req.removeListener('finish', onfinish);\n\t\tstream.removeListener('end', onlegacyfinish);\n\t\tstream.removeListener('close', onlegacyfinish);\n\t\tstream.removeListener('finish', onfinish);\n\t\tstream.removeListener('exit', onexit);\n\t\tstream.removeListener('end', onend);\n\t\tstream.removeListener('error', onerror);\n\t\tstream.removeListener('close', onclose);\n\t};\n};\n\nmodule.exports = eos;\n","'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar defineProperty = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) { /**/ }\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\n// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target\nvar setProperty = function setProperty(target, options) {\n\tif (defineProperty && options.name === '__proto__') {\n\t\tdefineProperty(target, options.name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\tvalue: options.newValue,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\ttarget[options.name] = options.newValue;\n\t}\n};\n\n// Return undefined instead of __proto__ if '__proto__' is not an own property\nvar getProperty = function getProperty(obj, name) {\n\tif (name === '__proto__') {\n\t\tif (!hasOwn.call(obj, name)) {\n\t\t\treturn void 0;\n\t\t} else if (gOPD) {\n\t\t\t// In early versions of node, obj['__proto__'] is buggy when obj has\n\t\t\t// __proto__ as an own property. Object.getOwnPropertyDescriptor() works.\n\t\t\treturn gOPD(obj, name).value;\n\t\t}\n\t}\n\n\treturn obj[name];\n};\n\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone;\n\tvar target = arguments[0];\n\tvar i = 1;\n\tvar length = arguments.length;\n\tvar deep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\tif (target == null || (typeof target !== 'object' && typeof target !== 'function')) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = getProperty(target, name);\n\t\t\t\tcopy = getProperty(options, name);\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: extend(deep, clone, copy) });\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: copy });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n","/*\n * extsprintf.js: extended POSIX-style sprintf\n */\n\nvar mod_assert = require('assert');\nvar mod_util = require('util');\n\n/*\n * Public interface\n */\nexports.sprintf = jsSprintf;\nexports.printf = jsPrintf;\nexports.fprintf = jsFprintf;\n\n/*\n * Stripped down version of s[n]printf(3c). We make a best effort to throw an\n * exception when given a format string we don't understand, rather than\n * ignoring it, so that we won't break existing programs if/when we go implement\n * the rest of this.\n *\n * This implementation currently supports specifying\n *\t- field alignment ('-' flag),\n * \t- zero-pad ('0' flag)\n *\t- always show numeric sign ('+' flag),\n *\t- field width\n *\t- conversions for strings, decimal integers, and floats (numbers).\n *\t- argument size specifiers. These are all accepted but ignored, since\n *\t Javascript has no notion of the physical size of an argument.\n *\n * Everything else is currently unsupported, most notably precision, unsigned\n * numbers, non-decimal numbers, and characters.\n */\nfunction jsSprintf(fmt)\n{\n\tvar regex = [\n\t '([^%]*)',\t\t\t\t/* normal text */\n\t '%',\t\t\t\t/* start of format */\n\t '([\\'\\\\-+ #0]*?)',\t\t\t/* flags (optional) */\n\t '([1-9]\\\\d*)?',\t\t\t/* width (optional) */\n\t '(\\\\.([1-9]\\\\d*))?',\t\t/* precision (optional) */\n\t '[lhjztL]*?',\t\t\t/* length mods (ignored) */\n\t '([diouxXfFeEgGaAcCsSp%jr])'\t/* conversion */\n\t].join('');\n\n\tvar re = new RegExp(regex);\n\tvar args = Array.prototype.slice.call(arguments, 1);\n\tvar flags, width, precision, conversion;\n\tvar left, pad, sign, arg, match;\n\tvar ret = '';\n\tvar argn = 1;\n\n\tmod_assert.equal('string', typeof (fmt));\n\n\twhile ((match = re.exec(fmt)) !== null) {\n\t\tret += match[1];\n\t\tfmt = fmt.substring(match[0].length);\n\n\t\tflags = match[2] || '';\n\t\twidth = match[3] || 0;\n\t\tprecision = match[4] || '';\n\t\tconversion = match[6];\n\t\tleft = false;\n\t\tsign = false;\n\t\tpad = ' ';\n\n\t\tif (conversion == '%') {\n\t\t\tret += '%';\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (args.length === 0)\n\t\t\tthrow (new Error('too few args to sprintf'));\n\n\t\targ = args.shift();\n\t\targn++;\n\n\t\tif (flags.match(/[\\' #]/))\n\t\t\tthrow (new Error(\n\t\t\t 'unsupported flags: ' + flags));\n\n\t\tif (precision.length > 0)\n\t\t\tthrow (new Error(\n\t\t\t 'non-zero precision not supported'));\n\n\t\tif (flags.match(/-/))\n\t\t\tleft = true;\n\n\t\tif (flags.match(/0/))\n\t\t\tpad = '0';\n\n\t\tif (flags.match(/\\+/))\n\t\t\tsign = true;\n\n\t\tswitch (conversion) {\n\t\tcase 's':\n\t\t\tif (arg === undefined || arg === null)\n\t\t\t\tthrow (new Error('argument ' + argn +\n\t\t\t\t ': attempted to print undefined or null ' +\n\t\t\t\t 'as a string'));\n\t\t\tret += doPad(pad, width, left, arg.toString());\n\t\t\tbreak;\n\n\t\tcase 'd':\n\t\t\targ = Math.floor(arg);\n\t\t\t/*jsl:fallthru*/\n\t\tcase 'f':\n\t\t\tsign = sign && arg > 0 ? '+' : '';\n\t\t\tret += sign + doPad(pad, width, left,\n\t\t\t arg.toString());\n\t\t\tbreak;\n\n\t\tcase 'x':\n\t\t\tret += doPad(pad, width, left, arg.toString(16));\n\t\t\tbreak;\n\n\t\tcase 'j': /* non-standard */\n\t\t\tif (width === 0)\n\t\t\t\twidth = 10;\n\t\t\tret += mod_util.inspect(arg, false, width);\n\t\t\tbreak;\n\n\t\tcase 'r': /* non-standard */\n\t\t\tret += dumpException(arg);\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tthrow (new Error('unsupported conversion: ' +\n\t\t\t conversion));\n\t\t}\n\t}\n\n\tret += fmt;\n\treturn (ret);\n}\n\nfunction jsPrintf() {\n\tvar args = Array.prototype.slice.call(arguments);\n\targs.unshift(process.stdout);\n\tjsFprintf.apply(null, args);\n}\n\nfunction jsFprintf(stream) {\n\tvar args = Array.prototype.slice.call(arguments, 1);\n\treturn (stream.write(jsSprintf.apply(this, args)));\n}\n\nfunction doPad(chr, width, left, str)\n{\n\tvar ret = str;\n\n\twhile (ret.length < width) {\n\t\tif (left)\n\t\t\tret += chr;\n\t\telse\n\t\t\tret = chr + ret;\n\t}\n\n\treturn (ret);\n}\n\n/*\n * This function dumps long stack traces for exceptions having a cause() method.\n * See node-verror for an example.\n */\nfunction dumpException(ex)\n{\n\tvar ret;\n\n\tif (!(ex instanceof Error))\n\t\tthrow (new Error(jsSprintf('invalid type for %%r: %j', ex)));\n\n\t/* Note that V8 prepends \"ex.stack\" with ex.toString(). */\n\tret = 'EXCEPTION: ' + ex.constructor.name + ': ' + ex.stack;\n\n\tif (ex.cause && typeof (ex.cause) === 'function') {\n\t\tvar cex = ex.cause();\n\t\tif (cex) {\n\t\t\tret += '\\nCaused by: ' + dumpException(cex);\n\t\t}\n\t}\n\n\treturn (ret);\n}\n","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","'use strict';\n\nmodule.exports = function (data, opts) {\n if (!opts) opts = {};\n if (typeof opts === 'function') opts = { cmp: opts };\n var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;\n\n var cmp = opts.cmp && (function (f) {\n return function (node) {\n return function (a, b) {\n var aobj = { key: a, value: node[a] };\n var bobj = { key: b, value: node[b] };\n return f(aobj, bobj);\n };\n };\n })(opts.cmp);\n\n var seen = [];\n return (function stringify (node) {\n if (node && node.toJSON && typeof node.toJSON === 'function') {\n node = node.toJSON();\n }\n\n if (node === undefined) return;\n if (typeof node == 'number') return isFinite(node) ? '' + node : 'null';\n if (typeof node !== 'object') return JSON.stringify(node);\n\n var i, out;\n if (Array.isArray(node)) {\n out = '[';\n for (i = 0; i < node.length; i++) {\n if (i) out += ',';\n out += stringify(node[i]) || 'null';\n }\n return out + ']';\n }\n\n if (node === null) return 'null';\n\n if (seen.indexOf(node) !== -1) {\n if (cycles) return JSON.stringify('__cycle__');\n throw new TypeError('Converting circular structure to JSON');\n }\n\n var seenIndex = seen.push(node) - 1;\n var keys = Object.keys(node).sort(cmp && cmp(node));\n out = '';\n for (i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = stringify(node[key]);\n\n if (!value) continue;\n if (out) out += ',';\n out += JSON.stringify(key) + ':' + value;\n }\n seen.splice(seenIndex, 1);\n return '{' + out + '}';\n })(data);\n};\n","module.exports = ForeverAgent\nForeverAgent.SSL = ForeverAgentSSL\n\nvar util = require('util')\n , Agent = require('http').Agent\n , net = require('net')\n , tls = require('tls')\n , AgentSSL = require('https').Agent\n \nfunction getConnectionName(host, port) { \n var name = ''\n if (typeof host === 'string') {\n name = host + ':' + port\n } else {\n // For node.js v012.0 and iojs-v1.5.1, host is an object. And any existing localAddress is part of the connection name.\n name = host.host + ':' + host.port + ':' + (host.localAddress ? (host.localAddress + ':') : ':')\n }\n return name\n} \n\nfunction ForeverAgent(options) {\n var self = this\n self.options = options || {}\n self.requests = {}\n self.sockets = {}\n self.freeSockets = {}\n self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets\n self.minSockets = self.options.minSockets || ForeverAgent.defaultMinSockets\n self.on('free', function(socket, host, port) {\n var name = getConnectionName(host, port)\n\n if (self.requests[name] && self.requests[name].length) {\n self.requests[name].shift().onSocket(socket)\n } else if (self.sockets[name].length < self.minSockets) {\n if (!self.freeSockets[name]) self.freeSockets[name] = []\n self.freeSockets[name].push(socket)\n \n // if an error happens while we don't use the socket anyway, meh, throw the socket away\n var onIdleError = function() {\n socket.destroy()\n }\n socket._onIdleError = onIdleError\n socket.on('error', onIdleError)\n } else {\n // If there are no pending requests just destroy the\n // socket and it will get removed from the pool. This\n // gets us out of timeout issues and allows us to\n // default to Connection:keep-alive.\n socket.destroy()\n }\n })\n\n}\nutil.inherits(ForeverAgent, Agent)\n\nForeverAgent.defaultMinSockets = 5\n\n\nForeverAgent.prototype.createConnection = net.createConnection\nForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest\nForeverAgent.prototype.addRequest = function(req, host, port) {\n var name = getConnectionName(host, port)\n \n if (typeof host !== 'string') {\n var options = host\n port = options.port\n host = options.host\n }\n\n if (this.freeSockets[name] && this.freeSockets[name].length > 0 && !req.useChunkedEncodingByDefault) {\n var idleSocket = this.freeSockets[name].pop()\n idleSocket.removeListener('error', idleSocket._onIdleError)\n delete idleSocket._onIdleError\n req._reusedSocket = true\n req.onSocket(idleSocket)\n } else {\n this.addRequestNoreuse(req, host, port)\n }\n}\n\nForeverAgent.prototype.removeSocket = function(s, name, host, port) {\n if (this.sockets[name]) {\n var index = this.sockets[name].indexOf(s)\n if (index !== -1) {\n this.sockets[name].splice(index, 1)\n }\n } else if (this.sockets[name] && this.sockets[name].length === 0) {\n // don't leak\n delete this.sockets[name]\n delete this.requests[name]\n }\n \n if (this.freeSockets[name]) {\n var index = this.freeSockets[name].indexOf(s)\n if (index !== -1) {\n this.freeSockets[name].splice(index, 1)\n if (this.freeSockets[name].length === 0) {\n delete this.freeSockets[name]\n }\n }\n }\n\n if (this.requests[name] && this.requests[name].length) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(name, host, port).emit('free')\n }\n}\n\nfunction ForeverAgentSSL (options) {\n ForeverAgent.call(this, options)\n}\nutil.inherits(ForeverAgentSSL, ForeverAgent)\n\nForeverAgentSSL.prototype.createConnection = createConnectionSSL\nForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest\n\nfunction createConnectionSSL (port, host, options) {\n if (typeof port === 'object') {\n options = port;\n } else if (typeof host === 'object') {\n options = host;\n } else if (typeof options === 'object') {\n options = options;\n } else {\n options = {};\n }\n\n if (typeof port === 'number') {\n options.port = port;\n }\n\n if (typeof host === 'string') {\n options.host = host;\n }\n\n return tls.connect(options);\n}\n","module.exports = realpath\nrealpath.realpath = realpath\nrealpath.sync = realpathSync\nrealpath.realpathSync = realpathSync\nrealpath.monkeypatch = monkeypatch\nrealpath.unmonkeypatch = unmonkeypatch\n\nvar fs = require('fs')\nvar origRealpath = fs.realpath\nvar origRealpathSync = fs.realpathSync\n\nvar version = process.version\nvar ok = /^v[0-5]\\./.test(version)\nvar old = require('./old.js')\n\nfunction newError (er) {\n return er && er.syscall === 'realpath' && (\n er.code === 'ELOOP' ||\n er.code === 'ENOMEM' ||\n er.code === 'ENAMETOOLONG'\n )\n}\n\nfunction realpath (p, cache, cb) {\n if (ok) {\n return origRealpath(p, cache, cb)\n }\n\n if (typeof cache === 'function') {\n cb = cache\n cache = null\n }\n origRealpath(p, cache, function (er, result) {\n if (newError(er)) {\n old.realpath(p, cache, cb)\n } else {\n cb(er, result)\n }\n })\n}\n\nfunction realpathSync (p, cache) {\n if (ok) {\n return origRealpathSync(p, cache)\n }\n\n try {\n return origRealpathSync(p, cache)\n } catch (er) {\n if (newError(er)) {\n return old.realpathSync(p, cache)\n } else {\n throw er\n }\n }\n}\n\nfunction monkeypatch () {\n fs.realpath = realpath\n fs.realpathSync = realpathSync\n}\n\nfunction unmonkeypatch () {\n fs.realpath = origRealpath\n fs.realpathSync = origRealpathSync\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar pathModule = require('path');\nvar isWindows = process.platform === 'win32';\nvar fs = require('fs');\n\n// JavaScript implementation of realpath, ported from node pre-v6\n\nvar DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);\n\nfunction rethrow() {\n // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and\n // is fairly slow to generate.\n var callback;\n if (DEBUG) {\n var backtrace = new Error;\n callback = debugCallback;\n } else\n callback = missingCallback;\n\n return callback;\n\n function debugCallback(err) {\n if (err) {\n backtrace.message = err.message;\n err = backtrace;\n missingCallback(err);\n }\n }\n\n function missingCallback(err) {\n if (err) {\n if (process.throwDeprecation)\n throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs\n else if (!process.noDeprecation) {\n var msg = 'fs: missing callback ' + (err.stack || err.message);\n if (process.traceDeprecation)\n console.trace(msg);\n else\n console.error(msg);\n }\n }\n }\n}\n\nfunction maybeCallback(cb) {\n return typeof cb === 'function' ? cb : rethrow();\n}\n\nvar normalize = pathModule.normalize;\n\n// Regexp that finds the next partion of a (partial) path\n// result is [base_with_slash, base], e.g. ['somedir/', 'somedir']\nif (isWindows) {\n var nextPartRe = /(.*?)(?:[\\/\\\\]+|$)/g;\n} else {\n var nextPartRe = /(.*?)(?:[\\/]+|$)/g;\n}\n\n// Regex to find the device root, including trailing slash. E.g. 'c:\\\\'.\nif (isWindows) {\n var splitRootRe = /^(?:[a-zA-Z]:|[\\\\\\/]{2}[^\\\\\\/]+[\\\\\\/][^\\\\\\/]+)?[\\\\\\/]*/;\n} else {\n var splitRootRe = /^[\\/]*/;\n}\n\nexports.realpathSync = function realpathSync(p, cache) {\n // make p is absolute\n p = pathModule.resolve(p);\n\n if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {\n return cache[p];\n }\n\n var original = p,\n seenLinks = {},\n knownHard = {};\n\n // current character position in p\n var pos;\n // the partial path so far, including a trailing slash if any\n var current;\n // the partial path without a trailing slash (except when pointing at a root)\n var base;\n // the partial path scanned in the previous round, with slash\n var previous;\n\n start();\n\n function start() {\n // Skip over roots\n var m = splitRootRe.exec(p);\n pos = m[0].length;\n current = m[0];\n base = m[0];\n previous = '';\n\n // On windows, check that the root exists. On unix there is no need.\n if (isWindows && !knownHard[base]) {\n fs.lstatSync(base);\n knownHard[base] = true;\n }\n }\n\n // walk down the path, swapping out linked pathparts for their real\n // values\n // NB: p.length changes.\n while (pos < p.length) {\n // find the next part\n nextPartRe.lastIndex = pos;\n var result = nextPartRe.exec(p);\n previous = current;\n current += result[0];\n base = previous + result[1];\n pos = nextPartRe.lastIndex;\n\n // continue if not a symlink\n if (knownHard[base] || (cache && cache[base] === base)) {\n continue;\n }\n\n var resolvedLink;\n if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {\n // some known symbolic link. no need to stat again.\n resolvedLink = cache[base];\n } else {\n var stat = fs.lstatSync(base);\n if (!stat.isSymbolicLink()) {\n knownHard[base] = true;\n if (cache) cache[base] = base;\n continue;\n }\n\n // read the link if it wasn't read before\n // dev/ino always return 0 on windows, so skip the check.\n var linkTarget = null;\n if (!isWindows) {\n var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);\n if (seenLinks.hasOwnProperty(id)) {\n linkTarget = seenLinks[id];\n }\n }\n if (linkTarget === null) {\n fs.statSync(base);\n linkTarget = fs.readlinkSync(base);\n }\n resolvedLink = pathModule.resolve(previous, linkTarget);\n // track this, if given a cache.\n if (cache) cache[base] = resolvedLink;\n if (!isWindows) seenLinks[id] = linkTarget;\n }\n\n // resolve the link, then start over\n p = pathModule.resolve(resolvedLink, p.slice(pos));\n start();\n }\n\n if (cache) cache[original] = p;\n\n return p;\n};\n\n\nexports.realpath = function realpath(p, cache, cb) {\n if (typeof cb !== 'function') {\n cb = maybeCallback(cache);\n cache = null;\n }\n\n // make p is absolute\n p = pathModule.resolve(p);\n\n if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {\n return process.nextTick(cb.bind(null, null, cache[p]));\n }\n\n var original = p,\n seenLinks = {},\n knownHard = {};\n\n // current character position in p\n var pos;\n // the partial path so far, including a trailing slash if any\n var current;\n // the partial path without a trailing slash (except when pointing at a root)\n var base;\n // the partial path scanned in the previous round, with slash\n var previous;\n\n start();\n\n function start() {\n // Skip over roots\n var m = splitRootRe.exec(p);\n pos = m[0].length;\n current = m[0];\n base = m[0];\n previous = '';\n\n // On windows, check that the root exists. On unix there is no need.\n if (isWindows && !knownHard[base]) {\n fs.lstat(base, function(err) {\n if (err) return cb(err);\n knownHard[base] = true;\n LOOP();\n });\n } else {\n process.nextTick(LOOP);\n }\n }\n\n // walk down the path, swapping out linked pathparts for their real\n // values\n function LOOP() {\n // stop if scanned past end of path\n if (pos >= p.length) {\n if (cache) cache[original] = p;\n return cb(null, p);\n }\n\n // find the next part\n nextPartRe.lastIndex = pos;\n var result = nextPartRe.exec(p);\n previous = current;\n current += result[0];\n base = previous + result[1];\n pos = nextPartRe.lastIndex;\n\n // continue if not a symlink\n if (knownHard[base] || (cache && cache[base] === base)) {\n return process.nextTick(LOOP);\n }\n\n if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {\n // known symbolic link. no need to stat again.\n return gotResolvedLink(cache[base]);\n }\n\n return fs.lstat(base, gotStat);\n }\n\n function gotStat(err, stat) {\n if (err) return cb(err);\n\n // if not a symlink, skip to the next path part\n if (!stat.isSymbolicLink()) {\n knownHard[base] = true;\n if (cache) cache[base] = base;\n return process.nextTick(LOOP);\n }\n\n // stat & read the link if not read before\n // call gotTarget as soon as the link target is known\n // dev/ino always return 0 on windows, so skip the check.\n if (!isWindows) {\n var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);\n if (seenLinks.hasOwnProperty(id)) {\n return gotTarget(null, seenLinks[id], base);\n }\n }\n fs.stat(base, function(err) {\n if (err) return cb(err);\n\n fs.readlink(base, function(err, target) {\n if (!isWindows) seenLinks[id] = target;\n gotTarget(err, target);\n });\n });\n }\n\n function gotTarget(err, target, base) {\n if (err) return cb(err);\n\n var resolvedLink = pathModule.resolve(previous, target);\n if (cache) cache[base] = resolvedLink;\n gotResolvedLink(resolvedLink);\n }\n\n function gotResolvedLink(resolvedLink) {\n // resolve the link, then start over\n p = pathModule.resolve(resolvedLink, p.slice(pos));\n start();\n }\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\n\nvar getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\nconst {PassThrough} = require('stream');\n\nmodule.exports = options => {\n\toptions = Object.assign({}, options);\n\n\tconst {array} = options;\n\tlet {encoding} = options;\n\tconst buffer = encoding === 'buffer';\n\tlet objectMode = false;\n\n\tif (array) {\n\t\tobjectMode = !(encoding || buffer);\n\t} else {\n\t\tencoding = encoding || 'utf8';\n\t}\n\n\tif (buffer) {\n\t\tencoding = null;\n\t}\n\n\tlet len = 0;\n\tconst ret = [];\n\tconst stream = new PassThrough({objectMode});\n\n\tif (encoding) {\n\t\tstream.setEncoding(encoding);\n\t}\n\n\tstream.on('data', chunk => {\n\t\tret.push(chunk);\n\n\t\tif (objectMode) {\n\t\t\tlen = ret.length;\n\t\t} else {\n\t\t\tlen += chunk.length;\n\t\t}\n\t});\n\n\tstream.getBufferedValue = () => {\n\t\tif (array) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn buffer ? Buffer.concat(ret, len) : ret.join('');\n\t};\n\n\tstream.getBufferedLength = () => len;\n\n\treturn stream;\n};\n","'use strict';\nconst pump = require('pump');\nconst bufferStream = require('./buffer-stream');\n\nclass MaxBufferError extends Error {\n\tconstructor() {\n\t\tsuper('maxBuffer exceeded');\n\t\tthis.name = 'MaxBufferError';\n\t}\n}\n\nfunction getStream(inputStream, options) {\n\tif (!inputStream) {\n\t\treturn Promise.reject(new Error('Expected a stream'));\n\t}\n\n\toptions = Object.assign({maxBuffer: Infinity}, options);\n\n\tconst {maxBuffer} = options;\n\n\tlet stream;\n\treturn new Promise((resolve, reject) => {\n\t\tconst rejectPromise = error => {\n\t\t\tif (error) { // A null check\n\t\t\t\terror.bufferedData = stream.getBufferedValue();\n\t\t\t}\n\t\t\treject(error);\n\t\t};\n\n\t\tstream = pump(inputStream, bufferStream(options), error => {\n\t\t\tif (error) {\n\t\t\t\trejectPromise(error);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresolve();\n\t\t});\n\n\t\tstream.on('data', () => {\n\t\t\tif (stream.getBufferedLength() > maxBuffer) {\n\t\t\t\trejectPromise(new MaxBufferError());\n\t\t\t}\n\t\t});\n\t}).then(() => stream.getBufferedValue());\n}\n\nmodule.exports = getStream;\nmodule.exports.buffer = (stream, options) => getStream(stream, Object.assign({}, options, {encoding: 'buffer'}));\nmodule.exports.array = (stream, options) => getStream(stream, Object.assign({}, options, {array: true}));\nmodule.exports.MaxBufferError = MaxBufferError;\n","exports.setopts = setopts\nexports.ownProp = ownProp\nexports.makeAbs = makeAbs\nexports.finish = finish\nexports.mark = mark\nexports.isIgnored = isIgnored\nexports.childrenIgnored = childrenIgnored\n\nfunction ownProp (obj, field) {\n return Object.prototype.hasOwnProperty.call(obj, field)\n}\n\nvar fs = require(\"fs\")\nvar path = require(\"path\")\nvar minimatch = require(\"minimatch\")\nvar isAbsolute = require(\"path-is-absolute\")\nvar Minimatch = minimatch.Minimatch\n\nfunction alphasort (a, b) {\n return a.localeCompare(b, 'en')\n}\n\nfunction setupIgnores (self, options) {\n self.ignore = options.ignore || []\n\n if (!Array.isArray(self.ignore))\n self.ignore = [self.ignore]\n\n if (self.ignore.length) {\n self.ignore = self.ignore.map(ignoreMap)\n }\n}\n\n// ignore patterns are always in dot:true mode.\nfunction ignoreMap (pattern) {\n var gmatcher = null\n if (pattern.slice(-3) === '/**') {\n var gpattern = pattern.replace(/(\\/\\*\\*)+$/, '')\n gmatcher = new Minimatch(gpattern, { dot: true })\n }\n\n return {\n matcher: new Minimatch(pattern, { dot: true }),\n gmatcher: gmatcher\n }\n}\n\nfunction setopts (self, pattern, options) {\n if (!options)\n options = {}\n\n // base-matching: just use globstar for that.\n if (options.matchBase && -1 === pattern.indexOf(\"/\")) {\n if (options.noglobstar) {\n throw new Error(\"base matching requires globstar\")\n }\n pattern = \"**/\" + pattern\n }\n\n self.silent = !!options.silent\n self.pattern = pattern\n self.strict = options.strict !== false\n self.realpath = !!options.realpath\n self.realpathCache = options.realpathCache || Object.create(null)\n self.follow = !!options.follow\n self.dot = !!options.dot\n self.mark = !!options.mark\n self.nodir = !!options.nodir\n if (self.nodir)\n self.mark = true\n self.sync = !!options.sync\n self.nounique = !!options.nounique\n self.nonull = !!options.nonull\n self.nosort = !!options.nosort\n self.nocase = !!options.nocase\n self.stat = !!options.stat\n self.noprocess = !!options.noprocess\n self.absolute = !!options.absolute\n self.fs = options.fs || fs\n\n self.maxLength = options.maxLength || Infinity\n self.cache = options.cache || Object.create(null)\n self.statCache = options.statCache || Object.create(null)\n self.symlinks = options.symlinks || Object.create(null)\n\n setupIgnores(self, options)\n\n self.changedCwd = false\n var cwd = process.cwd()\n if (!ownProp(options, \"cwd\"))\n self.cwd = cwd\n else {\n self.cwd = path.resolve(options.cwd)\n self.changedCwd = self.cwd !== cwd\n }\n\n self.root = options.root || path.resolve(self.cwd, \"/\")\n self.root = path.resolve(self.root)\n if (process.platform === \"win32\")\n self.root = self.root.replace(/\\\\/g, \"/\")\n\n // TODO: is an absolute `cwd` supposed to be resolved against `root`?\n // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')\n self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd)\n if (process.platform === \"win32\")\n self.cwdAbs = self.cwdAbs.replace(/\\\\/g, \"/\")\n self.nomount = !!options.nomount\n\n // disable comments and negation in Minimatch.\n // Note that they are not supported in Glob itself anyway.\n options.nonegate = true\n options.nocomment = true\n\n self.minimatch = new Minimatch(pattern, options)\n self.options = self.minimatch.options\n}\n\nfunction finish (self) {\n var nou = self.nounique\n var all = nou ? [] : Object.create(null)\n\n for (var i = 0, l = self.matches.length; i < l; i ++) {\n var matches = self.matches[i]\n if (!matches || Object.keys(matches).length === 0) {\n if (self.nonull) {\n // do like the shell, and spit out the literal glob\n var literal = self.minimatch.globSet[i]\n if (nou)\n all.push(literal)\n else\n all[literal] = true\n }\n } else {\n // had matches\n var m = Object.keys(matches)\n if (nou)\n all.push.apply(all, m)\n else\n m.forEach(function (m) {\n all[m] = true\n })\n }\n }\n\n if (!nou)\n all = Object.keys(all)\n\n if (!self.nosort)\n all = all.sort(alphasort)\n\n // at *some* point we statted all of these\n if (self.mark) {\n for (var i = 0; i < all.length; i++) {\n all[i] = self._mark(all[i])\n }\n if (self.nodir) {\n all = all.filter(function (e) {\n var notDir = !(/\\/$/.test(e))\n var c = self.cache[e] || self.cache[makeAbs(self, e)]\n if (notDir && c)\n notDir = c !== 'DIR' && !Array.isArray(c)\n return notDir\n })\n }\n }\n\n if (self.ignore.length)\n all = all.filter(function(m) {\n return !isIgnored(self, m)\n })\n\n self.found = all\n}\n\nfunction mark (self, p) {\n var abs = makeAbs(self, p)\n var c = self.cache[abs]\n var m = p\n if (c) {\n var isDir = c === 'DIR' || Array.isArray(c)\n var slash = p.slice(-1) === '/'\n\n if (isDir && !slash)\n m += '/'\n else if (!isDir && slash)\n m = m.slice(0, -1)\n\n if (m !== p) {\n var mabs = makeAbs(self, m)\n self.statCache[mabs] = self.statCache[abs]\n self.cache[mabs] = self.cache[abs]\n }\n }\n\n return m\n}\n\n// lotta situps...\nfunction makeAbs (self, f) {\n var abs = f\n if (f.charAt(0) === '/') {\n abs = path.join(self.root, f)\n } else if (isAbsolute(f) || f === '') {\n abs = f\n } else if (self.changedCwd) {\n abs = path.resolve(self.cwd, f)\n } else {\n abs = path.resolve(f)\n }\n\n if (process.platform === 'win32')\n abs = abs.replace(/\\\\/g, '/')\n\n return abs\n}\n\n\n// Return true, if pattern ends with globstar '**', for the accompanying parent directory.\n// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents\nfunction isIgnored (self, path) {\n if (!self.ignore.length)\n return false\n\n return self.ignore.some(function(item) {\n return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))\n })\n}\n\nfunction childrenIgnored (self, path) {\n if (!self.ignore.length)\n return false\n\n return self.ignore.some(function(item) {\n return !!(item.gmatcher && item.gmatcher.match(path))\n })\n}\n","// Approach:\n//\n// 1. Get the minimatch set\n// 2. For each pattern in the set, PROCESS(pattern, false)\n// 3. Store matches per-set, then uniq them\n//\n// PROCESS(pattern, inGlobStar)\n// Get the first [n] items from pattern that are all strings\n// Join these together. This is PREFIX.\n// If there is no more remaining, then stat(PREFIX) and\n// add to matches if it succeeds. END.\n//\n// If inGlobStar and PREFIX is symlink and points to dir\n// set ENTRIES = []\n// else readdir(PREFIX) as ENTRIES\n// If fail, END\n//\n// with ENTRIES\n// If pattern[n] is GLOBSTAR\n// // handle the case where the globstar match is empty\n// // by pruning it out, and testing the resulting pattern\n// PROCESS(pattern[0..n] + pattern[n+1 .. $], false)\n// // handle other cases.\n// for ENTRY in ENTRIES (not dotfiles)\n// // attach globstar + tail onto the entry\n// // Mark that this entry is a globstar match\n// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true)\n//\n// else // not globstar\n// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)\n// Test ENTRY against pattern[n]\n// If fails, continue\n// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])\n//\n// Caveat:\n// Cache all stats and readdirs results to minimize syscall. Since all\n// we ever care about is existence and directory-ness, we can just keep\n// `true` for files, and [children,...] for directories, or `false` for\n// things that don't exist.\n\nmodule.exports = glob\n\nvar rp = require('fs.realpath')\nvar minimatch = require('minimatch')\nvar Minimatch = minimatch.Minimatch\nvar inherits = require('inherits')\nvar EE = require('events').EventEmitter\nvar path = require('path')\nvar assert = require('assert')\nvar isAbsolute = require('path-is-absolute')\nvar globSync = require('./sync.js')\nvar common = require('./common.js')\nvar setopts = common.setopts\nvar ownProp = common.ownProp\nvar inflight = require('inflight')\nvar util = require('util')\nvar childrenIgnored = common.childrenIgnored\nvar isIgnored = common.isIgnored\n\nvar once = require('once')\n\nfunction glob (pattern, options, cb) {\n if (typeof options === 'function') cb = options, options = {}\n if (!options) options = {}\n\n if (options.sync) {\n if (cb)\n throw new TypeError('callback provided to sync glob')\n return globSync(pattern, options)\n }\n\n return new Glob(pattern, options, cb)\n}\n\nglob.sync = globSync\nvar GlobSync = glob.GlobSync = globSync.GlobSync\n\n// old api surface\nglob.glob = glob\n\nfunction extend (origin, add) {\n if (add === null || typeof add !== 'object') {\n return origin\n }\n\n var keys = Object.keys(add)\n var i = keys.length\n while (i--) {\n origin[keys[i]] = add[keys[i]]\n }\n return origin\n}\n\nglob.hasMagic = function (pattern, options_) {\n var options = extend({}, options_)\n options.noprocess = true\n\n var g = new Glob(pattern, options)\n var set = g.minimatch.set\n\n if (!pattern)\n return false\n\n if (set.length > 1)\n return true\n\n for (var j = 0; j < set[0].length; j++) {\n if (typeof set[0][j] !== 'string')\n return true\n }\n\n return false\n}\n\nglob.Glob = Glob\ninherits(Glob, EE)\nfunction Glob (pattern, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = null\n }\n\n if (options && options.sync) {\n if (cb)\n throw new TypeError('callback provided to sync glob')\n return new GlobSync(pattern, options)\n }\n\n if (!(this instanceof Glob))\n return new Glob(pattern, options, cb)\n\n setopts(this, pattern, options)\n this._didRealPath = false\n\n // process each pattern in the minimatch set\n var n = this.minimatch.set.length\n\n // The matches are stored as {: true,...} so that\n // duplicates are automagically pruned.\n // Later, we do an Object.keys() on these.\n // Keep them as a list so we can fill in when nonull is set.\n this.matches = new Array(n)\n\n if (typeof cb === 'function') {\n cb = once(cb)\n this.on('error', cb)\n this.on('end', function (matches) {\n cb(null, matches)\n })\n }\n\n var self = this\n this._processing = 0\n\n this._emitQueue = []\n this._processQueue = []\n this.paused = false\n\n if (this.noprocess)\n return this\n\n if (n === 0)\n return done()\n\n var sync = true\n for (var i = 0; i < n; i ++) {\n this._process(this.minimatch.set[i], i, false, done)\n }\n sync = false\n\n function done () {\n --self._processing\n if (self._processing <= 0) {\n if (sync) {\n process.nextTick(function () {\n self._finish()\n })\n } else {\n self._finish()\n }\n }\n }\n}\n\nGlob.prototype._finish = function () {\n assert(this instanceof Glob)\n if (this.aborted)\n return\n\n if (this.realpath && !this._didRealpath)\n return this._realpath()\n\n common.finish(this)\n this.emit('end', this.found)\n}\n\nGlob.prototype._realpath = function () {\n if (this._didRealpath)\n return\n\n this._didRealpath = true\n\n var n = this.matches.length\n if (n === 0)\n return this._finish()\n\n var self = this\n for (var i = 0; i < this.matches.length; i++)\n this._realpathSet(i, next)\n\n function next () {\n if (--n === 0)\n self._finish()\n }\n}\n\nGlob.prototype._realpathSet = function (index, cb) {\n var matchset = this.matches[index]\n if (!matchset)\n return cb()\n\n var found = Object.keys(matchset)\n var self = this\n var n = found.length\n\n if (n === 0)\n return cb()\n\n var set = this.matches[index] = Object.create(null)\n found.forEach(function (p, i) {\n // If there's a problem with the stat, then it means that\n // one or more of the links in the realpath couldn't be\n // resolved. just return the abs value in that case.\n p = self._makeAbs(p)\n rp.realpath(p, self.realpathCache, function (er, real) {\n if (!er)\n set[real] = true\n else if (er.syscall === 'stat')\n set[p] = true\n else\n self.emit('error', er) // srsly wtf right here\n\n if (--n === 0) {\n self.matches[index] = set\n cb()\n }\n })\n })\n}\n\nGlob.prototype._mark = function (p) {\n return common.mark(this, p)\n}\n\nGlob.prototype._makeAbs = function (f) {\n return common.makeAbs(this, f)\n}\n\nGlob.prototype.abort = function () {\n this.aborted = true\n this.emit('abort')\n}\n\nGlob.prototype.pause = function () {\n if (!this.paused) {\n this.paused = true\n this.emit('pause')\n }\n}\n\nGlob.prototype.resume = function () {\n if (this.paused) {\n this.emit('resume')\n this.paused = false\n if (this._emitQueue.length) {\n var eq = this._emitQueue.slice(0)\n this._emitQueue.length = 0\n for (var i = 0; i < eq.length; i ++) {\n var e = eq[i]\n this._emitMatch(e[0], e[1])\n }\n }\n if (this._processQueue.length) {\n var pq = this._processQueue.slice(0)\n this._processQueue.length = 0\n for (var i = 0; i < pq.length; i ++) {\n var p = pq[i]\n this._processing--\n this._process(p[0], p[1], p[2], p[3])\n }\n }\n }\n}\n\nGlob.prototype._process = function (pattern, index, inGlobStar, cb) {\n assert(this instanceof Glob)\n assert(typeof cb === 'function')\n\n if (this.aborted)\n return\n\n this._processing++\n if (this.paused) {\n this._processQueue.push([pattern, index, inGlobStar, cb])\n return\n }\n\n //console.error('PROCESS %d', this._processing, pattern)\n\n // Get the first [n] parts of pattern that are all strings.\n var n = 0\n while (typeof pattern[n] === 'string') {\n n ++\n }\n // now n is the index of the first one that is *not* a string.\n\n // see if there's anything else\n var prefix\n switch (n) {\n // if not, then this is rather simple\n case pattern.length:\n this._processSimple(pattern.join('/'), index, cb)\n return\n\n case 0:\n // pattern *starts* with some non-trivial item.\n // going to readdir(cwd), but not include the prefix in matches.\n prefix = null\n break\n\n default:\n // pattern has some string bits in the front.\n // whatever it starts with, whether that's 'absolute' like /foo/bar,\n // or 'relative' like '../baz'\n prefix = pattern.slice(0, n).join('/')\n break\n }\n\n var remain = pattern.slice(n)\n\n // get the list of entries.\n var read\n if (prefix === null)\n read = '.'\n else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {\n if (!prefix || !isAbsolute(prefix))\n prefix = '/' + prefix\n read = prefix\n } else\n read = prefix\n\n var abs = this._makeAbs(read)\n\n //if ignored, skip _processing\n if (childrenIgnored(this, read))\n return cb()\n\n var isGlobStar = remain[0] === minimatch.GLOBSTAR\n if (isGlobStar)\n this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb)\n else\n this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb)\n}\n\nGlob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {\n var self = this\n this._readdir(abs, inGlobStar, function (er, entries) {\n return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb)\n })\n}\n\nGlob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {\n\n // if the abs isn't a dir, then nothing can match!\n if (!entries)\n return cb()\n\n // It will only match dot entries if it starts with a dot, or if\n // dot is set. Stuff like @(.foo|.bar) isn't allowed.\n var pn = remain[0]\n var negate = !!this.minimatch.negate\n var rawGlob = pn._glob\n var dotOk = this.dot || rawGlob.charAt(0) === '.'\n\n var matchedEntries = []\n for (var i = 0; i < entries.length; i++) {\n var e = entries[i]\n if (e.charAt(0) !== '.' || dotOk) {\n var m\n if (negate && !prefix) {\n m = !e.match(pn)\n } else {\n m = e.match(pn)\n }\n if (m)\n matchedEntries.push(e)\n }\n }\n\n //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)\n\n var len = matchedEntries.length\n // If there are no matched entries, then nothing matches.\n if (len === 0)\n return cb()\n\n // if this is the last remaining pattern bit, then no need for\n // an additional stat *unless* the user has specified mark or\n // stat explicitly. We know they exist, since readdir returned\n // them.\n\n if (remain.length === 1 && !this.mark && !this.stat) {\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n if (prefix) {\n if (prefix !== '/')\n e = prefix + '/' + e\n else\n e = prefix + e\n }\n\n if (e.charAt(0) === '/' && !this.nomount) {\n e = path.join(this.root, e)\n }\n this._emitMatch(index, e)\n }\n // This was the last one, and no stats were needed\n return cb()\n }\n\n // now test all matched entries as stand-ins for that part\n // of the pattern.\n remain.shift()\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n var newPattern\n if (prefix) {\n if (prefix !== '/')\n e = prefix + '/' + e\n else\n e = prefix + e\n }\n this._process([e].concat(remain), index, inGlobStar, cb)\n }\n cb()\n}\n\nGlob.prototype._emitMatch = function (index, e) {\n if (this.aborted)\n return\n\n if (isIgnored(this, e))\n return\n\n if (this.paused) {\n this._emitQueue.push([index, e])\n return\n }\n\n var abs = isAbsolute(e) ? e : this._makeAbs(e)\n\n if (this.mark)\n e = this._mark(e)\n\n if (this.absolute)\n e = abs\n\n if (this.matches[index][e])\n return\n\n if (this.nodir) {\n var c = this.cache[abs]\n if (c === 'DIR' || Array.isArray(c))\n return\n }\n\n this.matches[index][e] = true\n\n var st = this.statCache[abs]\n if (st)\n this.emit('stat', e, st)\n\n this.emit('match', e)\n}\n\nGlob.prototype._readdirInGlobStar = function (abs, cb) {\n if (this.aborted)\n return\n\n // follow all symlinked directories forever\n // just proceed as if this is a non-globstar situation\n if (this.follow)\n return this._readdir(abs, false, cb)\n\n var lstatkey = 'lstat\\0' + abs\n var self = this\n var lstatcb = inflight(lstatkey, lstatcb_)\n\n if (lstatcb)\n self.fs.lstat(abs, lstatcb)\n\n function lstatcb_ (er, lstat) {\n if (er && er.code === 'ENOENT')\n return cb()\n\n var isSym = lstat && lstat.isSymbolicLink()\n self.symlinks[abs] = isSym\n\n // If it's not a symlink or a dir, then it's definitely a regular file.\n // don't bother doing a readdir in that case.\n if (!isSym && lstat && !lstat.isDirectory()) {\n self.cache[abs] = 'FILE'\n cb()\n } else\n self._readdir(abs, false, cb)\n }\n}\n\nGlob.prototype._readdir = function (abs, inGlobStar, cb) {\n if (this.aborted)\n return\n\n cb = inflight('readdir\\0'+abs+'\\0'+inGlobStar, cb)\n if (!cb)\n return\n\n //console.error('RD %j %j', +inGlobStar, abs)\n if (inGlobStar && !ownProp(this.symlinks, abs))\n return this._readdirInGlobStar(abs, cb)\n\n if (ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n if (!c || c === 'FILE')\n return cb()\n\n if (Array.isArray(c))\n return cb(null, c)\n }\n\n var self = this\n self.fs.readdir(abs, readdirCb(this, abs, cb))\n}\n\nfunction readdirCb (self, abs, cb) {\n return function (er, entries) {\n if (er)\n self._readdirError(abs, er, cb)\n else\n self._readdirEntries(abs, entries, cb)\n }\n}\n\nGlob.prototype._readdirEntries = function (abs, entries, cb) {\n if (this.aborted)\n return\n\n // if we haven't asked to stat everything, then just\n // assume that everything in there exists, so we can avoid\n // having to stat it a second time.\n if (!this.mark && !this.stat) {\n for (var i = 0; i < entries.length; i ++) {\n var e = entries[i]\n if (abs === '/')\n e = abs + e\n else\n e = abs + '/' + e\n this.cache[e] = true\n }\n }\n\n this.cache[abs] = entries\n return cb(null, entries)\n}\n\nGlob.prototype._readdirError = function (f, er, cb) {\n if (this.aborted)\n return\n\n // handle errors, and cache the information\n switch (er.code) {\n case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205\n case 'ENOTDIR': // totally normal. means it *does* exist.\n var abs = this._makeAbs(f)\n this.cache[abs] = 'FILE'\n if (abs === this.cwdAbs) {\n var error = new Error(er.code + ' invalid cwd ' + this.cwd)\n error.path = this.cwd\n error.code = er.code\n this.emit('error', error)\n this.abort()\n }\n break\n\n case 'ENOENT': // not terribly unusual\n case 'ELOOP':\n case 'ENAMETOOLONG':\n case 'UNKNOWN':\n this.cache[this._makeAbs(f)] = false\n break\n\n default: // some unusual error. Treat as failure.\n this.cache[this._makeAbs(f)] = false\n if (this.strict) {\n this.emit('error', er)\n // If the error is handled, then we abort\n // if not, we threw out of here\n this.abort()\n }\n if (!this.silent)\n console.error('glob error', er)\n break\n }\n\n return cb()\n}\n\nGlob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {\n var self = this\n this._readdir(abs, inGlobStar, function (er, entries) {\n self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb)\n })\n}\n\n\nGlob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {\n //console.error('pgs2', prefix, remain[0], entries)\n\n // no entries means not a dir, so it can never have matches\n // foo.txt/** doesn't match foo.txt\n if (!entries)\n return cb()\n\n // test without the globstar, and with every child both below\n // and replacing the globstar.\n var remainWithoutGlobStar = remain.slice(1)\n var gspref = prefix ? [ prefix ] : []\n var noGlobStar = gspref.concat(remainWithoutGlobStar)\n\n // the noGlobStar pattern exits the inGlobStar state\n this._process(noGlobStar, index, false, cb)\n\n var isSym = this.symlinks[abs]\n var len = entries.length\n\n // If it's a symlink, and we're in a globstar, then stop\n if (isSym && inGlobStar)\n return cb()\n\n for (var i = 0; i < len; i++) {\n var e = entries[i]\n if (e.charAt(0) === '.' && !this.dot)\n continue\n\n // these two cases enter the inGlobStar state\n var instead = gspref.concat(entries[i], remainWithoutGlobStar)\n this._process(instead, index, true, cb)\n\n var below = gspref.concat(entries[i], remain)\n this._process(below, index, true, cb)\n }\n\n cb()\n}\n\nGlob.prototype._processSimple = function (prefix, index, cb) {\n // XXX review this. Shouldn't it be doing the mounting etc\n // before doing stat? kinda weird?\n var self = this\n this._stat(prefix, function (er, exists) {\n self._processSimple2(prefix, index, er, exists, cb)\n })\n}\nGlob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {\n\n //console.error('ps2', prefix, exists)\n\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n // If it doesn't exist, then just mark the lack of results\n if (!exists)\n return cb()\n\n if (prefix && isAbsolute(prefix) && !this.nomount) {\n var trail = /[\\/\\\\]$/.test(prefix)\n if (prefix.charAt(0) === '/') {\n prefix = path.join(this.root, prefix)\n } else {\n prefix = path.resolve(this.root, prefix)\n if (trail)\n prefix += '/'\n }\n }\n\n if (process.platform === 'win32')\n prefix = prefix.replace(/\\\\/g, '/')\n\n // Mark this as a match\n this._emitMatch(index, prefix)\n cb()\n}\n\n// Returns either 'DIR', 'FILE', or false\nGlob.prototype._stat = function (f, cb) {\n var abs = this._makeAbs(f)\n var needDir = f.slice(-1) === '/'\n\n if (f.length > this.maxLength)\n return cb()\n\n if (!this.stat && ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n\n if (Array.isArray(c))\n c = 'DIR'\n\n // It exists, but maybe not how we need it\n if (!needDir || c === 'DIR')\n return cb(null, c)\n\n if (needDir && c === 'FILE')\n return cb()\n\n // otherwise we have to stat, because maybe c=true\n // if we know it exists, but not what it is.\n }\n\n var exists\n var stat = this.statCache[abs]\n if (stat !== undefined) {\n if (stat === false)\n return cb(null, stat)\n else {\n var type = stat.isDirectory() ? 'DIR' : 'FILE'\n if (needDir && type === 'FILE')\n return cb()\n else\n return cb(null, type, stat)\n }\n }\n\n var self = this\n var statcb = inflight('stat\\0' + abs, lstatcb_)\n if (statcb)\n self.fs.lstat(abs, statcb)\n\n function lstatcb_ (er, lstat) {\n if (lstat && lstat.isSymbolicLink()) {\n // If it's a symlink, then treat it as the target, unless\n // the target does not exist, then treat it as a file.\n return self.fs.stat(abs, function (er, stat) {\n if (er)\n self._stat2(f, abs, null, lstat, cb)\n else\n self._stat2(f, abs, er, stat, cb)\n })\n } else {\n self._stat2(f, abs, er, lstat, cb)\n }\n }\n}\n\nGlob.prototype._stat2 = function (f, abs, er, stat, cb) {\n if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {\n this.statCache[abs] = false\n return cb()\n }\n\n var needDir = f.slice(-1) === '/'\n this.statCache[abs] = stat\n\n if (abs.slice(-1) === '/' && stat && !stat.isDirectory())\n return cb(null, false, stat)\n\n var c = true\n if (stat)\n c = stat.isDirectory() ? 'DIR' : 'FILE'\n this.cache[abs] = this.cache[abs] || c\n\n if (needDir && c === 'FILE')\n return cb()\n\n return cb(null, c, stat)\n}\n","module.exports = globSync\nglobSync.GlobSync = GlobSync\n\nvar rp = require('fs.realpath')\nvar minimatch = require('minimatch')\nvar Minimatch = minimatch.Minimatch\nvar Glob = require('./glob.js').Glob\nvar util = require('util')\nvar path = require('path')\nvar assert = require('assert')\nvar isAbsolute = require('path-is-absolute')\nvar common = require('./common.js')\nvar setopts = common.setopts\nvar ownProp = common.ownProp\nvar childrenIgnored = common.childrenIgnored\nvar isIgnored = common.isIgnored\n\nfunction globSync (pattern, options) {\n if (typeof options === 'function' || arguments.length === 3)\n throw new TypeError('callback provided to sync glob\\n'+\n 'See: https://github.com/isaacs/node-glob/issues/167')\n\n return new GlobSync(pattern, options).found\n}\n\nfunction GlobSync (pattern, options) {\n if (!pattern)\n throw new Error('must provide pattern')\n\n if (typeof options === 'function' || arguments.length === 3)\n throw new TypeError('callback provided to sync glob\\n'+\n 'See: https://github.com/isaacs/node-glob/issues/167')\n\n if (!(this instanceof GlobSync))\n return new GlobSync(pattern, options)\n\n setopts(this, pattern, options)\n\n if (this.noprocess)\n return this\n\n var n = this.minimatch.set.length\n this.matches = new Array(n)\n for (var i = 0; i < n; i ++) {\n this._process(this.minimatch.set[i], i, false)\n }\n this._finish()\n}\n\nGlobSync.prototype._finish = function () {\n assert(this instanceof GlobSync)\n if (this.realpath) {\n var self = this\n this.matches.forEach(function (matchset, index) {\n var set = self.matches[index] = Object.create(null)\n for (var p in matchset) {\n try {\n p = self._makeAbs(p)\n var real = rp.realpathSync(p, self.realpathCache)\n set[real] = true\n } catch (er) {\n if (er.syscall === 'stat')\n set[self._makeAbs(p)] = true\n else\n throw er\n }\n }\n })\n }\n common.finish(this)\n}\n\n\nGlobSync.prototype._process = function (pattern, index, inGlobStar) {\n assert(this instanceof GlobSync)\n\n // Get the first [n] parts of pattern that are all strings.\n var n = 0\n while (typeof pattern[n] === 'string') {\n n ++\n }\n // now n is the index of the first one that is *not* a string.\n\n // See if there's anything else\n var prefix\n switch (n) {\n // if not, then this is rather simple\n case pattern.length:\n this._processSimple(pattern.join('/'), index)\n return\n\n case 0:\n // pattern *starts* with some non-trivial item.\n // going to readdir(cwd), but not include the prefix in matches.\n prefix = null\n break\n\n default:\n // pattern has some string bits in the front.\n // whatever it starts with, whether that's 'absolute' like /foo/bar,\n // or 'relative' like '../baz'\n prefix = pattern.slice(0, n).join('/')\n break\n }\n\n var remain = pattern.slice(n)\n\n // get the list of entries.\n var read\n if (prefix === null)\n read = '.'\n else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {\n if (!prefix || !isAbsolute(prefix))\n prefix = '/' + prefix\n read = prefix\n } else\n read = prefix\n\n var abs = this._makeAbs(read)\n\n //if ignored, skip processing\n if (childrenIgnored(this, read))\n return\n\n var isGlobStar = remain[0] === minimatch.GLOBSTAR\n if (isGlobStar)\n this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)\n else\n this._processReaddir(prefix, read, abs, remain, index, inGlobStar)\n}\n\n\nGlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {\n var entries = this._readdir(abs, inGlobStar)\n\n // if the abs isn't a dir, then nothing can match!\n if (!entries)\n return\n\n // It will only match dot entries if it starts with a dot, or if\n // dot is set. Stuff like @(.foo|.bar) isn't allowed.\n var pn = remain[0]\n var negate = !!this.minimatch.negate\n var rawGlob = pn._glob\n var dotOk = this.dot || rawGlob.charAt(0) === '.'\n\n var matchedEntries = []\n for (var i = 0; i < entries.length; i++) {\n var e = entries[i]\n if (e.charAt(0) !== '.' || dotOk) {\n var m\n if (negate && !prefix) {\n m = !e.match(pn)\n } else {\n m = e.match(pn)\n }\n if (m)\n matchedEntries.push(e)\n }\n }\n\n var len = matchedEntries.length\n // If there are no matched entries, then nothing matches.\n if (len === 0)\n return\n\n // if this is the last remaining pattern bit, then no need for\n // an additional stat *unless* the user has specified mark or\n // stat explicitly. We know they exist, since readdir returned\n // them.\n\n if (remain.length === 1 && !this.mark && !this.stat) {\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n if (prefix) {\n if (prefix.slice(-1) !== '/')\n e = prefix + '/' + e\n else\n e = prefix + e\n }\n\n if (e.charAt(0) === '/' && !this.nomount) {\n e = path.join(this.root, e)\n }\n this._emitMatch(index, e)\n }\n // This was the last one, and no stats were needed\n return\n }\n\n // now test all matched entries as stand-ins for that part\n // of the pattern.\n remain.shift()\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n var newPattern\n if (prefix)\n newPattern = [prefix, e]\n else\n newPattern = [e]\n this._process(newPattern.concat(remain), index, inGlobStar)\n }\n}\n\n\nGlobSync.prototype._emitMatch = function (index, e) {\n if (isIgnored(this, e))\n return\n\n var abs = this._makeAbs(e)\n\n if (this.mark)\n e = this._mark(e)\n\n if (this.absolute) {\n e = abs\n }\n\n if (this.matches[index][e])\n return\n\n if (this.nodir) {\n var c = this.cache[abs]\n if (c === 'DIR' || Array.isArray(c))\n return\n }\n\n this.matches[index][e] = true\n\n if (this.stat)\n this._stat(e)\n}\n\n\nGlobSync.prototype._readdirInGlobStar = function (abs) {\n // follow all symlinked directories forever\n // just proceed as if this is a non-globstar situation\n if (this.follow)\n return this._readdir(abs, false)\n\n var entries\n var lstat\n var stat\n try {\n lstat = this.fs.lstatSync(abs)\n } catch (er) {\n if (er.code === 'ENOENT') {\n // lstat failed, doesn't exist\n return null\n }\n }\n\n var isSym = lstat && lstat.isSymbolicLink()\n this.symlinks[abs] = isSym\n\n // If it's not a symlink or a dir, then it's definitely a regular file.\n // don't bother doing a readdir in that case.\n if (!isSym && lstat && !lstat.isDirectory())\n this.cache[abs] = 'FILE'\n else\n entries = this._readdir(abs, false)\n\n return entries\n}\n\nGlobSync.prototype._readdir = function (abs, inGlobStar) {\n var entries\n\n if (inGlobStar && !ownProp(this.symlinks, abs))\n return this._readdirInGlobStar(abs)\n\n if (ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n if (!c || c === 'FILE')\n return null\n\n if (Array.isArray(c))\n return c\n }\n\n try {\n return this._readdirEntries(abs, this.fs.readdirSync(abs))\n } catch (er) {\n this._readdirError(abs, er)\n return null\n }\n}\n\nGlobSync.prototype._readdirEntries = function (abs, entries) {\n // if we haven't asked to stat everything, then just\n // assume that everything in there exists, so we can avoid\n // having to stat it a second time.\n if (!this.mark && !this.stat) {\n for (var i = 0; i < entries.length; i ++) {\n var e = entries[i]\n if (abs === '/')\n e = abs + e\n else\n e = abs + '/' + e\n this.cache[e] = true\n }\n }\n\n this.cache[abs] = entries\n\n // mark and cache dir-ness\n return entries\n}\n\nGlobSync.prototype._readdirError = function (f, er) {\n // handle errors, and cache the information\n switch (er.code) {\n case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205\n case 'ENOTDIR': // totally normal. means it *does* exist.\n var abs = this._makeAbs(f)\n this.cache[abs] = 'FILE'\n if (abs === this.cwdAbs) {\n var error = new Error(er.code + ' invalid cwd ' + this.cwd)\n error.path = this.cwd\n error.code = er.code\n throw error\n }\n break\n\n case 'ENOENT': // not terribly unusual\n case 'ELOOP':\n case 'ENAMETOOLONG':\n case 'UNKNOWN':\n this.cache[this._makeAbs(f)] = false\n break\n\n default: // some unusual error. Treat as failure.\n this.cache[this._makeAbs(f)] = false\n if (this.strict)\n throw er\n if (!this.silent)\n console.error('glob error', er)\n break\n }\n}\n\nGlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {\n\n var entries = this._readdir(abs, inGlobStar)\n\n // no entries means not a dir, so it can never have matches\n // foo.txt/** doesn't match foo.txt\n if (!entries)\n return\n\n // test without the globstar, and with every child both below\n // and replacing the globstar.\n var remainWithoutGlobStar = remain.slice(1)\n var gspref = prefix ? [ prefix ] : []\n var noGlobStar = gspref.concat(remainWithoutGlobStar)\n\n // the noGlobStar pattern exits the inGlobStar state\n this._process(noGlobStar, index, false)\n\n var len = entries.length\n var isSym = this.symlinks[abs]\n\n // If it's a symlink, and we're in a globstar, then stop\n if (isSym && inGlobStar)\n return\n\n for (var i = 0; i < len; i++) {\n var e = entries[i]\n if (e.charAt(0) === '.' && !this.dot)\n continue\n\n // these two cases enter the inGlobStar state\n var instead = gspref.concat(entries[i], remainWithoutGlobStar)\n this._process(instead, index, true)\n\n var below = gspref.concat(entries[i], remain)\n this._process(below, index, true)\n }\n}\n\nGlobSync.prototype._processSimple = function (prefix, index) {\n // XXX review this. Shouldn't it be doing the mounting etc\n // before doing stat? kinda weird?\n var exists = this._stat(prefix)\n\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n // If it doesn't exist, then just mark the lack of results\n if (!exists)\n return\n\n if (prefix && isAbsolute(prefix) && !this.nomount) {\n var trail = /[\\/\\\\]$/.test(prefix)\n if (prefix.charAt(0) === '/') {\n prefix = path.join(this.root, prefix)\n } else {\n prefix = path.resolve(this.root, prefix)\n if (trail)\n prefix += '/'\n }\n }\n\n if (process.platform === 'win32')\n prefix = prefix.replace(/\\\\/g, '/')\n\n // Mark this as a match\n this._emitMatch(index, prefix)\n}\n\n// Returns either 'DIR', 'FILE', or false\nGlobSync.prototype._stat = function (f) {\n var abs = this._makeAbs(f)\n var needDir = f.slice(-1) === '/'\n\n if (f.length > this.maxLength)\n return false\n\n if (!this.stat && ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n\n if (Array.isArray(c))\n c = 'DIR'\n\n // It exists, but maybe not how we need it\n if (!needDir || c === 'DIR')\n return c\n\n if (needDir && c === 'FILE')\n return false\n\n // otherwise we have to stat, because maybe c=true\n // if we know it exists, but not what it is.\n }\n\n var exists\n var stat = this.statCache[abs]\n if (!stat) {\n var lstat\n try {\n lstat = this.fs.lstatSync(abs)\n } catch (er) {\n if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {\n this.statCache[abs] = false\n return false\n }\n }\n\n if (lstat && lstat.isSymbolicLink()) {\n try {\n stat = this.fs.statSync(abs)\n } catch (er) {\n stat = lstat\n }\n } else {\n stat = lstat\n }\n }\n\n this.statCache[abs] = stat\n\n var c = true\n if (stat)\n c = stat.isDirectory() ? 'DIR' : 'FILE'\n\n this.cache[abs] = this.cache[abs] || c\n\n if (needDir && c === 'FILE')\n return false\n\n return c\n}\n\nGlobSync.prototype._mark = function (p) {\n return common.mark(this, p)\n}\n\nGlobSync.prototype._makeAbs = function (f) {\n return common.makeAbs(this, f)\n}\n","'use strict';\n\nclass CancelError extends Error {\n\tconstructor(reason) {\n\t\tsuper(reason || 'Promise was canceled');\n\t\tthis.name = 'CancelError';\n\t}\n\n\tget isCanceled() {\n\t\treturn true;\n\t}\n}\n\nclass PCancelable {\n\tstatic fn(userFn) {\n\t\treturn (...args) => {\n\t\t\treturn new PCancelable((resolve, reject, onCancel) => {\n\t\t\t\targs.push(onCancel);\n\t\t\t\tuserFn(...args).then(resolve, reject);\n\t\t\t});\n\t\t};\n\t}\n\n\tconstructor(executor) {\n\t\tthis._cancelHandlers = [];\n\t\tthis._isPending = true;\n\t\tthis._isCanceled = false;\n\t\tthis._rejectOnCancel = true;\n\n\t\tthis._promise = new Promise((resolve, reject) => {\n\t\t\tthis._reject = reject;\n\n\t\t\tconst onResolve = value => {\n\t\t\t\tthis._isPending = false;\n\t\t\t\tresolve(value);\n\t\t\t};\n\n\t\t\tconst onReject = error => {\n\t\t\t\tthis._isPending = false;\n\t\t\t\treject(error);\n\t\t\t};\n\n\t\t\tconst onCancel = handler => {\n\t\t\t\tthis._cancelHandlers.push(handler);\n\t\t\t};\n\n\t\t\tObject.defineProperties(onCancel, {\n\t\t\t\tshouldReject: {\n\t\t\t\t\tget: () => this._rejectOnCancel,\n\t\t\t\t\tset: bool => {\n\t\t\t\t\t\tthis._rejectOnCancel = bool;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn executor(onResolve, onReject, onCancel);\n\t\t});\n\t}\n\n\tthen(onFulfilled, onRejected) {\n\t\treturn this._promise.then(onFulfilled, onRejected);\n\t}\n\n\tcatch(onRejected) {\n\t\treturn this._promise.catch(onRejected);\n\t}\n\n\tfinally(onFinally) {\n\t\treturn this._promise.finally(onFinally);\n\t}\n\n\tcancel(reason) {\n\t\tif (!this._isPending || this._isCanceled) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._cancelHandlers.length > 0) {\n\t\t\ttry {\n\t\t\t\tfor (const handler of this._cancelHandlers) {\n\t\t\t\t\thandler();\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tthis._reject(error);\n\t\t\t}\n\t\t}\n\n\t\tthis._isCanceled = true;\n\t\tif (this._rejectOnCancel) {\n\t\t\tthis._reject(new CancelError(reason));\n\t\t}\n\t}\n\n\tget isCanceled() {\n\t\treturn this._isCanceled;\n\t}\n}\n\nObject.setPrototypeOf(PCancelable.prototype, Promise.prototype);\n\nmodule.exports = PCancelable;\nmodule.exports.default = PCancelable;\n\nmodule.exports.CancelError = CancelError;\n","'use strict';\nconst EventEmitter = require('events');\nconst getStream = require('get-stream');\nconst is = require('@sindresorhus/is');\nconst PCancelable = require('p-cancelable');\nconst requestAsEventEmitter = require('./request-as-event-emitter');\nconst {HTTPError, ParseError, ReadError} = require('./errors');\nconst {options: mergeOptions} = require('./merge');\nconst {reNormalize} = require('./normalize-arguments');\n\nconst asPromise = options => {\n\tconst proxy = new EventEmitter();\n\n\tconst promise = new PCancelable((resolve, reject, onCancel) => {\n\t\tconst emitter = requestAsEventEmitter(options);\n\n\t\tonCancel(emitter.abort);\n\n\t\temitter.on('response', async response => {\n\t\t\tproxy.emit('response', response);\n\n\t\t\tconst stream = is.null(options.encoding) ? getStream.buffer(response) : getStream(response, options);\n\n\t\t\tlet data;\n\t\t\ttry {\n\t\t\t\tdata = await stream;\n\t\t\t} catch (error) {\n\t\t\t\treject(new ReadError(error, options));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst limitStatusCode = options.followRedirect ? 299 : 399;\n\n\t\t\tresponse.body = data;\n\n\t\t\ttry {\n\t\t\t\tfor (const [index, hook] of Object.entries(options.hooks.afterResponse)) {\n\t\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\t\tresponse = await hook(response, updatedOptions => {\n\t\t\t\t\t\tupdatedOptions = reNormalize(mergeOptions(options, {\n\t\t\t\t\t\t\t...updatedOptions,\n\t\t\t\t\t\t\tretry: 0,\n\t\t\t\t\t\t\tthrowHttpErrors: false\n\t\t\t\t\t\t}));\n\n\t\t\t\t\t\t// Remove any further hooks for that request, because we we'll call them anyway.\n\t\t\t\t\t\t// The loop continues. We don't want duplicates (asPromise recursion).\n\t\t\t\t\t\tupdatedOptions.hooks.afterResponse = options.hooks.afterResponse.slice(0, index);\n\n\t\t\t\t\t\treturn asPromise(updatedOptions);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\treject(error);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst {statusCode} = response;\n\n\t\t\tif (options.json && response.body) {\n\t\t\t\ttry {\n\t\t\t\t\tresponse.body = JSON.parse(response.body);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (statusCode >= 200 && statusCode < 300) {\n\t\t\t\t\t\tconst parseError = new ParseError(error, statusCode, options, data);\n\t\t\t\t\t\tObject.defineProperty(parseError, 'response', {value: response});\n\t\t\t\t\t\treject(parseError);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (statusCode !== 304 && (statusCode < 200 || statusCode > limitStatusCode)) {\n\t\t\t\tconst error = new HTTPError(response, options);\n\t\t\t\tObject.defineProperty(error, 'response', {value: response});\n\t\t\t\tif (emitter.retry(error) === false) {\n\t\t\t\t\tif (options.throwHttpErrors) {\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve(response);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresolve(response);\n\t\t});\n\n\t\temitter.once('error', reject);\n\t\t[\n\t\t\t'request',\n\t\t\t'redirect',\n\t\t\t'uploadProgress',\n\t\t\t'downloadProgress'\n\t\t].forEach(event => emitter.on(event, (...args) => proxy.emit(event, ...args)));\n\t});\n\n\tpromise.on = (name, fn) => {\n\t\tproxy.on(name, fn);\n\t\treturn promise;\n\t};\n\n\treturn promise;\n};\n\nmodule.exports = asPromise;\n","'use strict';\nconst {PassThrough} = require('stream');\nconst duplexer3 = require('duplexer3');\nconst requestAsEventEmitter = require('./request-as-event-emitter');\nconst {HTTPError, ReadError} = require('./errors');\n\nmodule.exports = options => {\n\tconst input = new PassThrough();\n\tconst output = new PassThrough();\n\tconst proxy = duplexer3(input, output);\n\tconst piped = new Set();\n\tlet isFinished = false;\n\n\toptions.retry.retries = () => 0;\n\n\tif (options.body) {\n\t\tproxy.write = () => {\n\t\t\tthrow new Error('Got\\'s stream is not writable when the `body` option is used');\n\t\t};\n\t}\n\n\tconst emitter = requestAsEventEmitter(options, input);\n\n\t// Cancels the request\n\tproxy._destroy = emitter.abort;\n\n\temitter.on('response', response => {\n\t\tconst {statusCode} = response;\n\n\t\tresponse.on('error', error => {\n\t\t\tproxy.emit('error', new ReadError(error, options));\n\t\t});\n\n\t\tif (options.throwHttpErrors && statusCode !== 304 && (statusCode < 200 || statusCode > 299)) {\n\t\t\tproxy.emit('error', new HTTPError(response, options), null, response);\n\t\t\treturn;\n\t\t}\n\n\t\tisFinished = true;\n\n\t\tresponse.pipe(output);\n\n\t\tfor (const destination of piped) {\n\t\t\tif (destination.headersSent) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tfor (const [key, value] of Object.entries(response.headers)) {\n\t\t\t\t// Got gives *decompressed* data. Overriding `content-encoding` header would result in an error.\n\t\t\t\t// It's not possible to decompress already decompressed data, is it?\n\t\t\t\tconst allowed = options.decompress ? key !== 'content-encoding' : true;\n\t\t\t\tif (allowed) {\n\t\t\t\t\tdestination.setHeader(key, value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdestination.statusCode = response.statusCode;\n\t\t}\n\n\t\tproxy.emit('response', response);\n\t});\n\n\t[\n\t\t'error',\n\t\t'request',\n\t\t'redirect',\n\t\t'uploadProgress',\n\t\t'downloadProgress'\n\t].forEach(event => emitter.on(event, (...args) => proxy.emit(event, ...args)));\n\n\tconst pipe = proxy.pipe.bind(proxy);\n\tconst unpipe = proxy.unpipe.bind(proxy);\n\tproxy.pipe = (destination, options) => {\n\t\tif (isFinished) {\n\t\t\tthrow new Error('Failed to pipe. The response has been emitted already.');\n\t\t}\n\n\t\tconst result = pipe(destination, options);\n\n\t\tif (Reflect.has(destination, 'setHeader')) {\n\t\t\tpiped.add(destination);\n\t\t}\n\n\t\treturn result;\n\t};\n\n\tproxy.unpipe = stream => {\n\t\tpiped.delete(stream);\n\t\treturn unpipe(stream);\n\t};\n\n\treturn proxy;\n};\n","'use strict';\nconst errors = require('./errors');\nconst asStream = require('./as-stream');\nconst asPromise = require('./as-promise');\nconst normalizeArguments = require('./normalize-arguments');\nconst merge = require('./merge');\nconst deepFreeze = require('./utils/deep-freeze');\n\nconst getPromiseOrStream = options => options.stream ? asStream(options) : asPromise(options);\n\nconst aliases = [\n\t'get',\n\t'post',\n\t'put',\n\t'patch',\n\t'head',\n\t'delete'\n];\n\nconst create = defaults => {\n\tdefaults = merge({}, defaults);\n\tnormalizeArguments.preNormalize(defaults.options);\n\n\tif (!defaults.handler) {\n\t\t// This can't be getPromiseOrStream, because when merging\n\t\t// the chain would stop at this point and no further handlers would be called.\n\t\tdefaults.handler = (options, next) => next(options);\n\t}\n\n\tfunction got(url, options) {\n\t\ttry {\n\t\t\treturn defaults.handler(normalizeArguments(url, options, defaults), getPromiseOrStream);\n\t\t} catch (error) {\n\t\t\tif (options && options.stream) {\n\t\t\t\tthrow error;\n\t\t\t} else {\n\t\t\t\treturn Promise.reject(error);\n\t\t\t}\n\t\t}\n\t}\n\n\tgot.create = create;\n\tgot.extend = options => {\n\t\tlet mutableDefaults;\n\t\tif (options && Reflect.has(options, 'mutableDefaults')) {\n\t\t\tmutableDefaults = options.mutableDefaults;\n\t\t\tdelete options.mutableDefaults;\n\t\t} else {\n\t\t\tmutableDefaults = defaults.mutableDefaults;\n\t\t}\n\n\t\treturn create({\n\t\t\toptions: merge.options(defaults.options, options),\n\t\t\thandler: defaults.handler,\n\t\t\tmutableDefaults\n\t\t});\n\t};\n\n\tgot.mergeInstances = (...args) => create(merge.instances(args));\n\n\tgot.stream = (url, options) => got(url, {...options, stream: true});\n\n\tfor (const method of aliases) {\n\t\tgot[method] = (url, options) => got(url, {...options, method});\n\t\tgot.stream[method] = (url, options) => got.stream(url, {...options, method});\n\t}\n\n\tObject.assign(got, {...errors, mergeOptions: merge.options});\n\tObject.defineProperty(got, 'defaults', {\n\t\tvalue: defaults.mutableDefaults ? defaults : deepFreeze(defaults),\n\t\twritable: defaults.mutableDefaults,\n\t\tconfigurable: defaults.mutableDefaults,\n\t\tenumerable: true\n\t});\n\n\treturn got;\n};\n\nmodule.exports = create;\n","'use strict';\nconst urlLib = require('url');\nconst http = require('http');\nconst PCancelable = require('p-cancelable');\nconst is = require('@sindresorhus/is');\n\nclass GotError extends Error {\n\tconstructor(message, error, options) {\n\t\tsuper(message);\n\t\tError.captureStackTrace(this, this.constructor);\n\t\tthis.name = 'GotError';\n\n\t\tif (!is.undefined(error.code)) {\n\t\t\tthis.code = error.code;\n\t\t}\n\n\t\tObject.assign(this, {\n\t\t\thost: options.host,\n\t\t\thostname: options.hostname,\n\t\t\tmethod: options.method,\n\t\t\tpath: options.path,\n\t\t\tsocketPath: options.socketPath,\n\t\t\tprotocol: options.protocol,\n\t\t\turl: options.href,\n\t\t\tgotOptions: options\n\t\t});\n\t}\n}\n\nmodule.exports.GotError = GotError;\n\nmodule.exports.CacheError = class extends GotError {\n\tconstructor(error, options) {\n\t\tsuper(error.message, error, options);\n\t\tthis.name = 'CacheError';\n\t}\n};\n\nmodule.exports.RequestError = class extends GotError {\n\tconstructor(error, options) {\n\t\tsuper(error.message, error, options);\n\t\tthis.name = 'RequestError';\n\t}\n};\n\nmodule.exports.ReadError = class extends GotError {\n\tconstructor(error, options) {\n\t\tsuper(error.message, error, options);\n\t\tthis.name = 'ReadError';\n\t}\n};\n\nmodule.exports.ParseError = class extends GotError {\n\tconstructor(error, statusCode, options, data) {\n\t\tsuper(`${error.message} in \"${urlLib.format(options)}\": \\n${data.slice(0, 77)}...`, error, options);\n\t\tthis.name = 'ParseError';\n\t\tthis.statusCode = statusCode;\n\t\tthis.statusMessage = http.STATUS_CODES[this.statusCode];\n\t}\n};\n\nmodule.exports.HTTPError = class extends GotError {\n\tconstructor(response, options) {\n\t\tconst {statusCode} = response;\n\t\tlet {statusMessage} = response;\n\n\t\tif (statusMessage) {\n\t\t\tstatusMessage = statusMessage.replace(/\\r?\\n/g, ' ').trim();\n\t\t} else {\n\t\t\tstatusMessage = http.STATUS_CODES[statusCode];\n\t\t}\n\n\t\tsuper(`Response code ${statusCode} (${statusMessage})`, {}, options);\n\t\tthis.name = 'HTTPError';\n\t\tthis.statusCode = statusCode;\n\t\tthis.statusMessage = statusMessage;\n\t\tthis.headers = response.headers;\n\t\tthis.body = response.body;\n\t}\n};\n\nmodule.exports.MaxRedirectsError = class extends GotError {\n\tconstructor(statusCode, redirectUrls, options) {\n\t\tsuper('Redirected 10 times. Aborting.', {}, options);\n\t\tthis.name = 'MaxRedirectsError';\n\t\tthis.statusCode = statusCode;\n\t\tthis.statusMessage = http.STATUS_CODES[this.statusCode];\n\t\tthis.redirectUrls = redirectUrls;\n\t}\n};\n\nmodule.exports.UnsupportedProtocolError = class extends GotError {\n\tconstructor(options) {\n\t\tsuper(`Unsupported protocol \"${options.protocol}\"`, {}, options);\n\t\tthis.name = 'UnsupportedProtocolError';\n\t}\n};\n\nmodule.exports.TimeoutError = class extends GotError {\n\tconstructor(error, options) {\n\t\tsuper(error.message, {code: 'ETIMEDOUT'}, options);\n\t\tthis.name = 'TimeoutError';\n\t\tthis.event = error.event;\n\t}\n};\n\nmodule.exports.CancelError = PCancelable.CancelError;\n","'use strict';\nconst decompressResponse = require('decompress-response');\nconst is = require('@sindresorhus/is');\nconst mimicResponse = require('mimic-response');\nconst progress = require('./progress');\n\nmodule.exports = (response, options, emitter) => {\n\tconst downloadBodySize = Number(response.headers['content-length']) || null;\n\n\tconst progressStream = progress.download(response, emitter, downloadBodySize);\n\n\tmimicResponse(response, progressStream);\n\n\tconst newResponse = options.decompress === true &&\n\t\tis.function(decompressResponse) &&\n\t\toptions.method !== 'HEAD' ? decompressResponse(progressStream) : progressStream;\n\n\tif (!options.decompress && ['gzip', 'deflate'].includes(response.headers['content-encoding'])) {\n\t\toptions.encoding = null;\n\t}\n\n\temitter.emit('response', newResponse);\n\n\temitter.emit('downloadProgress', {\n\t\tpercent: 0,\n\t\ttransferred: 0,\n\t\ttotal: downloadBodySize\n\t});\n\n\tresponse.pipe(progressStream);\n};\n","'use strict';\nconst pkg = require('../package.json');\nconst create = require('./create');\n\nconst defaults = {\n\toptions: {\n\t\tretry: {\n\t\t\tretries: 2,\n\t\t\tmethods: [\n\t\t\t\t'GET',\n\t\t\t\t'PUT',\n\t\t\t\t'HEAD',\n\t\t\t\t'DELETE',\n\t\t\t\t'OPTIONS',\n\t\t\t\t'TRACE'\n\t\t\t],\n\t\t\tstatusCodes: [\n\t\t\t\t408,\n\t\t\t\t413,\n\t\t\t\t429,\n\t\t\t\t500,\n\t\t\t\t502,\n\t\t\t\t503,\n\t\t\t\t504\n\t\t\t],\n\t\t\terrorCodes: [\n\t\t\t\t'ETIMEDOUT',\n\t\t\t\t'ECONNRESET',\n\t\t\t\t'EADDRINUSE',\n\t\t\t\t'ECONNREFUSED',\n\t\t\t\t'EPIPE',\n\t\t\t\t'ENOTFOUND',\n\t\t\t\t'ENETUNREACH',\n\t\t\t\t'EAI_AGAIN'\n\t\t\t]\n\t\t},\n\t\theaders: {\n\t\t\t'user-agent': `${pkg.name}/${pkg.version} (https://github.com/sindresorhus/got)`\n\t\t},\n\t\thooks: {\n\t\t\tbeforeRequest: [],\n\t\t\tbeforeRedirect: [],\n\t\t\tbeforeRetry: [],\n\t\t\tafterResponse: []\n\t\t},\n\t\tdecompress: true,\n\t\tthrowHttpErrors: true,\n\t\tfollowRedirect: true,\n\t\tstream: false,\n\t\tform: false,\n\t\tjson: false,\n\t\tcache: false,\n\t\tuseElectronNet: false\n\t},\n\tmutableDefaults: false\n};\n\nconst got = create(defaults);\n\nmodule.exports = got;\n","'use strict';\n\nmodule.exports = [\n\t'beforeError',\n\t'init',\n\t'beforeRequest',\n\t'beforeRedirect',\n\t'beforeRetry',\n\t'afterResponse'\n];\n","'use strict';\nconst {URL} = require('url');\nconst is = require('@sindresorhus/is');\nconst knownHookEvents = require('./known-hook-events');\n\nconst merge = (target, ...sources) => {\n\tfor (const source of sources) {\n\t\tfor (const [key, sourceValue] of Object.entries(source)) {\n\t\t\tif (is.undefined(sourceValue)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst targetValue = target[key];\n\t\t\tif (is.urlInstance(targetValue) && (is.urlInstance(sourceValue) || is.string(sourceValue))) {\n\t\t\t\ttarget[key] = new URL(sourceValue, targetValue);\n\t\t\t} else if (is.plainObject(sourceValue)) {\n\t\t\t\tif (is.plainObject(targetValue)) {\n\t\t\t\t\ttarget[key] = merge({}, targetValue, sourceValue);\n\t\t\t\t} else {\n\t\t\t\t\ttarget[key] = merge({}, sourceValue);\n\t\t\t\t}\n\t\t\t} else if (is.array(sourceValue)) {\n\t\t\t\ttarget[key] = merge([], sourceValue);\n\t\t\t} else {\n\t\t\t\ttarget[key] = sourceValue;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn target;\n};\n\nconst mergeOptions = (...sources) => {\n\tsources = sources.map(source => source || {});\n\tconst merged = merge({}, ...sources);\n\n\tconst hooks = {};\n\tfor (const hook of knownHookEvents) {\n\t\thooks[hook] = [];\n\t}\n\n\tfor (const source of sources) {\n\t\tif (source.hooks) {\n\t\t\tfor (const hook of knownHookEvents) {\n\t\t\t\thooks[hook] = hooks[hook].concat(source.hooks[hook]);\n\t\t\t}\n\t\t}\n\t}\n\n\tmerged.hooks = hooks;\n\n\treturn merged;\n};\n\nconst mergeInstances = (instances, methods) => {\n\tconst handlers = instances.map(instance => instance.defaults.handler);\n\tconst size = instances.length - 1;\n\n\treturn {\n\t\tmethods,\n\t\toptions: mergeOptions(...instances.map(instance => instance.defaults.options)),\n\t\thandler: (options, next) => {\n\t\t\tlet iteration = -1;\n\t\t\tconst iterate = options => handlers[++iteration](options, iteration === size ? next : iterate);\n\n\t\t\treturn iterate(options);\n\t\t}\n\t};\n};\n\nmodule.exports = merge;\nmodule.exports.options = mergeOptions;\nmodule.exports.instances = mergeInstances;\n","'use strict';\nconst {URL, URLSearchParams} = require('url'); // TODO: Use the `URL` global when targeting Node.js 10\nconst urlLib = require('url');\nconst is = require('@sindresorhus/is');\nconst urlParseLax = require('url-parse-lax');\nconst lowercaseKeys = require('lowercase-keys');\nconst urlToOptions = require('./utils/url-to-options');\nconst isFormData = require('./utils/is-form-data');\nconst merge = require('./merge');\nconst knownHookEvents = require('./known-hook-events');\n\nconst retryAfterStatusCodes = new Set([413, 429, 503]);\n\n// `preNormalize` handles static options (e.g. headers).\n// For example, when you create a custom instance and make a request\n// with no static changes, they won't be normalized again.\n//\n// `normalize` operates on dynamic options - they cannot be saved.\n// For example, `body` is everytime different per request.\n// When it's done normalizing the new options, it performs merge()\n// on the prenormalized options and the normalized ones.\n\nconst preNormalize = (options, defaults) => {\n\tif (is.nullOrUndefined(options.headers)) {\n\t\toptions.headers = {};\n\t} else {\n\t\toptions.headers = lowercaseKeys(options.headers);\n\t}\n\n\tif (options.baseUrl && !options.baseUrl.toString().endsWith('/')) {\n\t\toptions.baseUrl += '/';\n\t}\n\n\tif (options.stream) {\n\t\toptions.json = false;\n\t}\n\n\tif (is.nullOrUndefined(options.hooks)) {\n\t\toptions.hooks = {};\n\t} else if (!is.object(options.hooks)) {\n\t\tthrow new TypeError(`Parameter \\`hooks\\` must be an object, not ${is(options.hooks)}`);\n\t}\n\n\tfor (const event of knownHookEvents) {\n\t\tif (is.nullOrUndefined(options.hooks[event])) {\n\t\t\tif (defaults) {\n\t\t\t\toptions.hooks[event] = [...defaults.hooks[event]];\n\t\t\t} else {\n\t\t\t\toptions.hooks[event] = [];\n\t\t\t}\n\t\t}\n\t}\n\n\tif (is.number(options.timeout)) {\n\t\toptions.gotTimeout = {request: options.timeout};\n\t} else if (is.object(options.timeout)) {\n\t\toptions.gotTimeout = options.timeout;\n\t}\n\n\tdelete options.timeout;\n\n\tconst {retry} = options;\n\toptions.retry = {\n\t\tretries: 0,\n\t\tmethods: [],\n\t\tstatusCodes: [],\n\t\terrorCodes: []\n\t};\n\n\tif (is.nonEmptyObject(defaults) && retry !== false) {\n\t\toptions.retry = {...defaults.retry};\n\t}\n\n\tif (retry !== false) {\n\t\tif (is.number(retry)) {\n\t\t\toptions.retry.retries = retry;\n\t\t} else {\n\t\t\toptions.retry = {...options.retry, ...retry};\n\t\t}\n\t}\n\n\tif (options.gotTimeout) {\n\t\toptions.retry.maxRetryAfter = Math.min(...[options.gotTimeout.request, options.gotTimeout.connection].filter(n => !is.nullOrUndefined(n)));\n\t}\n\n\tif (is.array(options.retry.methods)) {\n\t\toptions.retry.methods = new Set(options.retry.methods.map(method => method.toUpperCase()));\n\t}\n\n\tif (is.array(options.retry.statusCodes)) {\n\t\toptions.retry.statusCodes = new Set(options.retry.statusCodes);\n\t}\n\n\tif (is.array(options.retry.errorCodes)) {\n\t\toptions.retry.errorCodes = new Set(options.retry.errorCodes);\n\t}\n\n\treturn options;\n};\n\nconst normalize = (url, options, defaults) => {\n\tif (is.plainObject(url)) {\n\t\toptions = {...url, ...options};\n\t\turl = options.url || {};\n\t\tdelete options.url;\n\t}\n\n\tif (defaults) {\n\t\toptions = merge({}, defaults.options, options ? preNormalize(options, defaults.options) : {});\n\t} else {\n\t\toptions = merge({}, preNormalize(options));\n\t}\n\n\tif (!is.string(url) && !is.object(url)) {\n\t\tthrow new TypeError(`Parameter \\`url\\` must be a string or object, not ${is(url)}`);\n\t}\n\n\tif (is.string(url)) {\n\t\tif (options.baseUrl) {\n\t\t\tif (url.toString().startsWith('/')) {\n\t\t\t\turl = url.toString().slice(1);\n\t\t\t}\n\n\t\t\turl = urlToOptions(new URL(url, options.baseUrl));\n\t\t} else {\n\t\t\turl = url.replace(/^unix:/, 'http://$&');\n\t\t\turl = urlParseLax(url);\n\t\t}\n\t} else if (is(url) === 'URL') {\n\t\turl = urlToOptions(url);\n\t}\n\n\t// Override both null/undefined with default protocol\n\toptions = merge({path: ''}, url, {protocol: url.protocol || 'https:'}, options);\n\n\tfor (const hook of options.hooks.init) {\n\t\tconst called = hook(options);\n\n\t\tif (is.promise(called)) {\n\t\t\tthrow new TypeError('The `init` hook must be a synchronous function');\n\t\t}\n\t}\n\n\tconst {baseUrl} = options;\n\tObject.defineProperty(options, 'baseUrl', {\n\t\tset: () => {\n\t\t\tthrow new Error('Failed to set baseUrl. Options are normalized already.');\n\t\t},\n\t\tget: () => baseUrl\n\t});\n\n\tconst {query} = options;\n\tif (is.nonEmptyString(query) || is.nonEmptyObject(query) || query instanceof URLSearchParams) {\n\t\tif (!is.string(query)) {\n\t\t\toptions.query = (new URLSearchParams(query)).toString();\n\t\t}\n\n\t\toptions.path = `${options.path.split('?')[0]}?${options.query}`;\n\t\tdelete options.query;\n\t}\n\n\tif (options.hostname === 'unix') {\n\t\tconst matches = /(.+?):(.+)/.exec(options.path);\n\n\t\tif (matches) {\n\t\t\tconst [, socketPath, path] = matches;\n\t\t\toptions = {\n\t\t\t\t...options,\n\t\t\t\tsocketPath,\n\t\t\t\tpath,\n\t\t\t\thost: null\n\t\t\t};\n\t\t}\n\t}\n\n\tconst {headers} = options;\n\tfor (const [key, value] of Object.entries(headers)) {\n\t\tif (is.nullOrUndefined(value)) {\n\t\t\tdelete headers[key];\n\t\t}\n\t}\n\n\tif (options.json && is.undefined(headers.accept)) {\n\t\theaders.accept = 'application/json';\n\t}\n\n\tif (options.decompress && is.undefined(headers['accept-encoding'])) {\n\t\theaders['accept-encoding'] = 'gzip, deflate';\n\t}\n\n\tconst {body} = options;\n\tif (is.nullOrUndefined(body)) {\n\t\toptions.method = options.method ? options.method.toUpperCase() : 'GET';\n\t} else {\n\t\tconst isObject = is.object(body) && !is.buffer(body) && !is.nodeStream(body);\n\t\tif (!is.nodeStream(body) && !is.string(body) && !is.buffer(body) && !(options.form || options.json)) {\n\t\t\tthrow new TypeError('The `body` option must be a stream.Readable, string or Buffer');\n\t\t}\n\n\t\tif (options.json && !(isObject || is.array(body))) {\n\t\t\tthrow new TypeError('The `body` option must be an Object or Array when the `json` option is used');\n\t\t}\n\n\t\tif (options.form && !isObject) {\n\t\t\tthrow new TypeError('The `body` option must be an Object when the `form` option is used');\n\t\t}\n\n\t\tif (isFormData(body)) {\n\t\t\t// Special case for https://github.com/form-data/form-data\n\t\t\theaders['content-type'] = headers['content-type'] || `multipart/form-data; boundary=${body.getBoundary()}`;\n\t\t} else if (options.form) {\n\t\t\theaders['content-type'] = headers['content-type'] || 'application/x-www-form-urlencoded';\n\t\t\toptions.body = (new URLSearchParams(body)).toString();\n\t\t} else if (options.json) {\n\t\t\theaders['content-type'] = headers['content-type'] || 'application/json';\n\t\t\toptions.body = JSON.stringify(body);\n\t\t}\n\n\t\toptions.method = options.method ? options.method.toUpperCase() : 'POST';\n\t}\n\n\tif (!is.function(options.retry.retries)) {\n\t\tconst {retries} = options.retry;\n\n\t\toptions.retry.retries = (iteration, error) => {\n\t\t\tif (iteration > retries) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tif ((!error || !options.retry.errorCodes.has(error.code)) && (!options.retry.methods.has(error.method) || !options.retry.statusCodes.has(error.statusCode))) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tif (Reflect.has(error, 'headers') && Reflect.has(error.headers, 'retry-after') && retryAfterStatusCodes.has(error.statusCode)) {\n\t\t\t\tlet after = Number(error.headers['retry-after']);\n\t\t\t\tif (is.nan(after)) {\n\t\t\t\t\tafter = Date.parse(error.headers['retry-after']) - Date.now();\n\t\t\t\t} else {\n\t\t\t\t\tafter *= 1000;\n\t\t\t\t}\n\n\t\t\t\tif (after > options.retry.maxRetryAfter) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn after;\n\t\t\t}\n\n\t\t\tif (error.statusCode === 413) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tconst noise = Math.random() * 100;\n\t\t\treturn ((2 ** (iteration - 1)) * 1000) + noise;\n\t\t};\n\t}\n\n\treturn options;\n};\n\nconst reNormalize = options => normalize(urlLib.format(options), options);\n\nmodule.exports = normalize;\nmodule.exports.preNormalize = preNormalize;\nmodule.exports.reNormalize = reNormalize;\n","'use strict';\nconst {Transform} = require('stream');\n\nmodule.exports = {\n\tdownload(response, emitter, downloadBodySize) {\n\t\tlet downloaded = 0;\n\n\t\treturn new Transform({\n\t\t\ttransform(chunk, encoding, callback) {\n\t\t\t\tdownloaded += chunk.length;\n\n\t\t\t\tconst percent = downloadBodySize ? downloaded / downloadBodySize : 0;\n\n\t\t\t\t// Let `flush()` be responsible for emitting the last event\n\t\t\t\tif (percent < 1) {\n\t\t\t\t\temitter.emit('downloadProgress', {\n\t\t\t\t\t\tpercent,\n\t\t\t\t\t\ttransferred: downloaded,\n\t\t\t\t\t\ttotal: downloadBodySize\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tcallback(null, chunk);\n\t\t\t},\n\n\t\t\tflush(callback) {\n\t\t\t\temitter.emit('downloadProgress', {\n\t\t\t\t\tpercent: 1,\n\t\t\t\t\ttransferred: downloaded,\n\t\t\t\t\ttotal: downloadBodySize\n\t\t\t\t});\n\n\t\t\t\tcallback();\n\t\t\t}\n\t\t});\n\t},\n\n\tupload(request, emitter, uploadBodySize) {\n\t\tconst uploadEventFrequency = 150;\n\t\tlet uploaded = 0;\n\t\tlet progressInterval;\n\n\t\temitter.emit('uploadProgress', {\n\t\t\tpercent: 0,\n\t\t\ttransferred: 0,\n\t\t\ttotal: uploadBodySize\n\t\t});\n\n\t\trequest.once('error', () => {\n\t\t\tclearInterval(progressInterval);\n\t\t});\n\n\t\trequest.once('response', () => {\n\t\t\tclearInterval(progressInterval);\n\n\t\t\temitter.emit('uploadProgress', {\n\t\t\t\tpercent: 1,\n\t\t\t\ttransferred: uploaded,\n\t\t\t\ttotal: uploadBodySize\n\t\t\t});\n\t\t});\n\n\t\trequest.once('socket', socket => {\n\t\t\tconst onSocketConnect = () => {\n\t\t\t\tprogressInterval = setInterval(() => {\n\t\t\t\t\tconst lastUploaded = uploaded;\n\t\t\t\t\t/* istanbul ignore next: see #490 (occurs randomly!) */\n\t\t\t\t\tconst headersSize = request._header ? Buffer.byteLength(request._header) : 0;\n\t\t\t\t\tuploaded = socket.bytesWritten - headersSize;\n\n\t\t\t\t\t// Don't emit events with unchanged progress and\n\t\t\t\t\t// prevent last event from being emitted, because\n\t\t\t\t\t// it's emitted when `response` is emitted\n\t\t\t\t\tif (uploaded === lastUploaded || uploaded === uploadBodySize) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\temitter.emit('uploadProgress', {\n\t\t\t\t\t\tpercent: uploadBodySize ? uploaded / uploadBodySize : 0,\n\t\t\t\t\t\ttransferred: uploaded,\n\t\t\t\t\t\ttotal: uploadBodySize\n\t\t\t\t\t});\n\t\t\t\t}, uploadEventFrequency);\n\t\t\t};\n\n\t\t\t/* istanbul ignore next: hard to test */\n\t\t\tif (socket.connecting) {\n\t\t\t\tsocket.once('connect', onSocketConnect);\n\t\t\t} else if (socket.writable) {\n\t\t\t\t// The socket is being reused from pool,\n\t\t\t\t// so the connect event will not be emitted\n\t\t\t\tonSocketConnect();\n\t\t\t}\n\t\t});\n\t}\n};\n",null,"'use strict';\nconst is = require('@sindresorhus/is');\n\nmodule.exports = function deepFreeze(object) {\n\tfor (const [key, value] of Object.entries(object)) {\n\t\tif (is.plainObject(value) || is.array(value)) {\n\t\t\tdeepFreeze(object[key]);\n\t\t}\n\t}\n\n\treturn Object.freeze(object);\n};\n","'use strict';\nconst fs = require('fs');\nconst util = require('util');\nconst is = require('@sindresorhus/is');\nconst isFormData = require('./is-form-data');\n\nmodule.exports = async options => {\n\tconst {body} = options;\n\n\tif (options.headers['content-length']) {\n\t\treturn Number(options.headers['content-length']);\n\t}\n\n\tif (!body && !options.stream) {\n\t\treturn 0;\n\t}\n\n\tif (is.string(body)) {\n\t\treturn Buffer.byteLength(body);\n\t}\n\n\tif (isFormData(body)) {\n\t\treturn util.promisify(body.getLength.bind(body))();\n\t}\n\n\tif (body instanceof fs.ReadStream) {\n\t\tconst {size} = await util.promisify(fs.stat)(body.path);\n\t\treturn size;\n\t}\n\n\treturn null;\n};\n","'use strict';\nconst is = require('@sindresorhus/is');\n\nmodule.exports = body => is.nodeStream(body) && is.function(body.getBoundary);\n","'use strict';\nconst net = require('net');\n\nclass TimeoutError extends Error {\n\tconstructor(threshold, event) {\n\t\tsuper(`Timeout awaiting '${event}' for ${threshold}ms`);\n\t\tthis.name = 'TimeoutError';\n\t\tthis.code = 'ETIMEDOUT';\n\t\tthis.event = event;\n\t}\n}\n\nconst reentry = Symbol('reentry');\n\nconst noop = () => {};\n\nmodule.exports = (request, delays, options) => {\n\t/* istanbul ignore next: this makes sure timed-out isn't called twice */\n\tif (request[reentry]) {\n\t\treturn;\n\t}\n\n\trequest[reentry] = true;\n\n\tlet stopNewTimeouts = false;\n\n\tconst addTimeout = (delay, callback, ...args) => {\n\t\t// An error had been thrown before. Going further would result in uncaught errors.\n\t\t// See https://github.com/sindresorhus/got/issues/631#issuecomment-435675051\n\t\tif (stopNewTimeouts) {\n\t\t\treturn noop;\n\t\t}\n\n\t\t// Event loop order is timers, poll, immediates.\n\t\t// The timed event may emit during the current tick poll phase, so\n\t\t// defer calling the handler until the poll phase completes.\n\t\tlet immediate;\n\t\tconst timeout = setTimeout(() => {\n\t\t\timmediate = setImmediate(callback, delay, ...args);\n\t\t\t/* istanbul ignore next: added in node v9.7.0 */\n\t\t\tif (immediate.unref) {\n\t\t\t\timmediate.unref();\n\t\t\t}\n\t\t}, delay);\n\n\t\t/* istanbul ignore next: in order to support electron renderer */\n\t\tif (timeout.unref) {\n\t\t\ttimeout.unref();\n\t\t}\n\n\t\tconst cancel = () => {\n\t\t\tclearTimeout(timeout);\n\t\t\tclearImmediate(immediate);\n\t\t};\n\n\t\tcancelers.push(cancel);\n\n\t\treturn cancel;\n\t};\n\n\tconst {host, hostname} = options;\n\tconst timeoutHandler = (delay, event) => {\n\t\trequest.emit('error', new TimeoutError(delay, event));\n\t\trequest.once('error', () => {}); // Ignore the `socket hung up` error made by request.abort()\n\n\t\trequest.abort();\n\t};\n\n\tconst cancelers = [];\n\tconst cancelTimeouts = () => {\n\t\tstopNewTimeouts = true;\n\t\tcancelers.forEach(cancelTimeout => cancelTimeout());\n\t};\n\n\trequest.once('error', cancelTimeouts);\n\trequest.once('response', response => {\n\t\tresponse.once('end', cancelTimeouts);\n\t});\n\n\tif (delays.request !== undefined) {\n\t\taddTimeout(delays.request, timeoutHandler, 'request');\n\t}\n\n\tif (delays.socket !== undefined) {\n\t\tconst socketTimeoutHandler = () => {\n\t\t\ttimeoutHandler(delays.socket, 'socket');\n\t\t};\n\n\t\trequest.setTimeout(delays.socket, socketTimeoutHandler);\n\n\t\t// `request.setTimeout(0)` causes a memory leak.\n\t\t// We can just remove the listener and forget about the timer - it's unreffed.\n\t\t// See https://github.com/sindresorhus/got/issues/690\n\t\tcancelers.push(() => request.removeListener('timeout', socketTimeoutHandler));\n\t}\n\n\tif (delays.lookup !== undefined && !request.socketPath && !net.isIP(hostname || host)) {\n\t\trequest.once('socket', socket => {\n\t\t\t/* istanbul ignore next: hard to test */\n\t\t\tif (socket.connecting) {\n\t\t\t\tconst cancelTimeout = addTimeout(delays.lookup, timeoutHandler, 'lookup');\n\t\t\t\tsocket.once('lookup', cancelTimeout);\n\t\t\t}\n\t\t});\n\t}\n\n\tif (delays.connect !== undefined) {\n\t\trequest.once('socket', socket => {\n\t\t\t/* istanbul ignore next: hard to test */\n\t\t\tif (socket.connecting) {\n\t\t\t\tconst timeConnect = () => addTimeout(delays.connect, timeoutHandler, 'connect');\n\n\t\t\t\tif (request.socketPath || net.isIP(hostname || host)) {\n\t\t\t\t\tsocket.once('connect', timeConnect());\n\t\t\t\t} else {\n\t\t\t\t\tsocket.once('lookup', error => {\n\t\t\t\t\t\tif (error === null) {\n\t\t\t\t\t\t\tsocket.once('connect', timeConnect());\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tif (delays.secureConnect !== undefined && options.protocol === 'https:') {\n\t\trequest.once('socket', socket => {\n\t\t\t/* istanbul ignore next: hard to test */\n\t\t\tif (socket.connecting) {\n\t\t\t\tsocket.once('connect', () => {\n\t\t\t\t\tconst cancelTimeout = addTimeout(delays.secureConnect, timeoutHandler, 'secureConnect');\n\t\t\t\t\tsocket.once('secureConnect', cancelTimeout);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tif (delays.send !== undefined) {\n\t\trequest.once('socket', socket => {\n\t\t\tconst timeRequest = () => addTimeout(delays.send, timeoutHandler, 'send');\n\t\t\t/* istanbul ignore next: hard to test */\n\t\t\tif (socket.connecting) {\n\t\t\t\tsocket.once('connect', () => {\n\t\t\t\t\trequest.once('upload-complete', timeRequest());\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\trequest.once('upload-complete', timeRequest());\n\t\t\t}\n\t\t});\n\t}\n\n\tif (delays.response !== undefined) {\n\t\trequest.once('upload-complete', () => {\n\t\t\tconst cancelTimeout = addTimeout(delays.response, timeoutHandler, 'response');\n\t\t\trequest.once('response', cancelTimeout);\n\t\t});\n\t}\n};\n\nmodule.exports.TimeoutError = TimeoutError;\n","'use strict';\nconst is = require('@sindresorhus/is');\n\nmodule.exports = url => {\n\tconst options = {\n\t\tprotocol: url.protocol,\n\t\thostname: url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname,\n\t\thash: url.hash,\n\t\tsearch: url.search,\n\t\tpathname: url.pathname,\n\t\thref: url.href\n\t};\n\n\tif (is.string(url.port) && url.port.length > 0) {\n\t\toptions.port = Number(url.port);\n\t}\n\n\tif (url.username || url.password) {\n\t\toptions.auth = `${url.username}:${url.password}`;\n\t}\n\n\toptions.path = is.null(url.search) ? url.pathname : `${url.pathname}${url.search}`;\n\n\treturn options;\n};\n","'use strict'\n\nmodule.exports = {\n afterRequest: require('./afterRequest.json'),\n beforeRequest: require('./beforeRequest.json'),\n browser: require('./browser.json'),\n cache: require('./cache.json'),\n content: require('./content.json'),\n cookie: require('./cookie.json'),\n creator: require('./creator.json'),\n entry: require('./entry.json'),\n har: require('./har.json'),\n header: require('./header.json'),\n log: require('./log.json'),\n page: require('./page.json'),\n pageTimings: require('./pageTimings.json'),\n postData: require('./postData.json'),\n query: require('./query.json'),\n request: require('./request.json'),\n response: require('./response.json'),\n timings: require('./timings.json')\n}\n","function HARError (errors) {\n var message = 'validation failed'\n\n this.name = 'HARError'\n this.message = message\n this.errors = errors\n\n if (typeof Error.captureStackTrace === 'function') {\n Error.captureStackTrace(this, this.constructor)\n } else {\n this.stack = (new Error(message)).stack\n }\n}\n\nHARError.prototype = Error.prototype\n\nmodule.exports = HARError\n","var Ajv = require('ajv')\nvar HARError = require('./error')\nvar schemas = require('har-schema')\n\nvar ajv\n\nfunction createAjvInstance () {\n var ajv = new Ajv({\n allErrors: true\n })\n ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json'))\n ajv.addSchema(schemas)\n\n return ajv\n}\n\nfunction validate (name, data) {\n data = data || {}\n\n // validator config\n ajv = ajv || createAjvInstance()\n\n var validate = ajv.getSchema(name + '.json')\n\n return new Promise(function (resolve, reject) {\n var valid = validate(data)\n\n !valid ? reject(new HARError(validate.errors)) : resolve(data)\n })\n}\n\nexports.afterRequest = function (data) {\n return validate('afterRequest', data)\n}\n\nexports.beforeRequest = function (data) {\n return validate('beforeRequest', data)\n}\n\nexports.browser = function (data) {\n return validate('browser', data)\n}\n\nexports.cache = function (data) {\n return validate('cache', data)\n}\n\nexports.content = function (data) {\n return validate('content', data)\n}\n\nexports.cookie = function (data) {\n return validate('cookie', data)\n}\n\nexports.creator = function (data) {\n return validate('creator', data)\n}\n\nexports.entry = function (data) {\n return validate('entry', data)\n}\n\nexports.har = function (data) {\n return validate('har', data)\n}\n\nexports.header = function (data) {\n return validate('header', data)\n}\n\nexports.log = function (data) {\n return validate('log', data)\n}\n\nexports.page = function (data) {\n return validate('page', data)\n}\n\nexports.pageTimings = function (data) {\n return validate('pageTimings', data)\n}\n\nexports.postData = function (data) {\n return validate('postData', data)\n}\n\nexports.query = function (data) {\n return validate('query', data)\n}\n\nexports.request = function (data) {\n return validate('request', data)\n}\n\nexports.response = function (data) {\n return validate('response', data)\n}\n\nexports.timings = function (data) {\n return validate('timings', data)\n}\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar bind = require('function-bind');\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n","\"use strict\";\nconst whatwgEncoding = require(\"whatwg-encoding\");\n\n// https://html.spec.whatwg.org/#encoding-sniffing-algorithm\nmodule.exports = (buffer, { transportLayerEncodingLabel, defaultEncoding = \"windows-1252\" } = {}) => {\n let encoding = whatwgEncoding.getBOMEncoding(buffer); // see https://github.com/whatwg/html/issues/1910\n\n if (encoding === null && transportLayerEncodingLabel !== undefined) {\n encoding = whatwgEncoding.labelToName(transportLayerEncodingLabel);\n }\n\n if (encoding === null) {\n encoding = prescanMetaCharset(buffer);\n }\n\n if (encoding === null) {\n encoding = defaultEncoding;\n }\n\n return encoding;\n};\n\n// https://html.spec.whatwg.org/multipage/syntax.html#prescan-a-byte-stream-to-determine-its-encoding\nfunction prescanMetaCharset(buffer) {\n const l = Math.min(buffer.length, 1024);\n for (let i = 0; i < l; i++) {\n let c = buffer[i];\n if (c === 0x3C) {\n // \"<\"\n const c1 = buffer[i + 1];\n const c2 = buffer[i + 2];\n const c3 = buffer[i + 3];\n const c4 = buffer[i + 4];\n const c5 = buffer[i + 5];\n // !-- (comment start)\n if (c1 === 0x21 && c2 === 0x2D && c3 === 0x2D) {\n i += 4;\n for (; i < l; i++) {\n c = buffer[i];\n const cMinus1 = buffer[i - 1];\n const cMinus2 = buffer[i - 2];\n // --> (comment end)\n if (c === 0x3E && cMinus1 === 0x2D && cMinus2 === 0x2D) {\n break;\n }\n }\n } else if ((c1 === 0x4D || c1 === 0x6D) &&\n (c2 === 0x45 || c2 === 0x65) &&\n (c3 === 0x54 || c3 === 0x74) &&\n (c4 === 0x41 || c4 === 0x61) &&\n (isSpaceCharacter(c5) || c5 === 0x2F)) {\n // \"meta\" + space or /\n i += 6;\n const attributeList = new Set();\n let gotPragma = false;\n let needPragma = null;\n let charset = null;\n\n let attrRes;\n do {\n attrRes = getAttribute(buffer, i, l);\n if (attrRes.attr && !attributeList.has(attrRes.attr.name)) {\n attributeList.add(attrRes.attr.name);\n if (attrRes.attr.name === \"http-equiv\") {\n gotPragma = attrRes.attr.value === \"content-type\";\n } else if (attrRes.attr.name === \"content\" && !charset) {\n charset = extractCharacterEncodingFromMeta(attrRes.attr.value);\n if (charset !== null) {\n needPragma = true;\n }\n } else if (attrRes.attr.name === \"charset\") {\n charset = whatwgEncoding.labelToName(attrRes.attr.value);\n needPragma = false;\n }\n }\n i = attrRes.i;\n } while (attrRes.attr);\n\n if (needPragma === null) {\n continue;\n }\n if (needPragma === true && gotPragma === false) {\n continue;\n }\n if (charset === null) {\n continue;\n }\n\n if (charset === \"UTF-16LE\" || charset === \"UTF-16BE\") {\n charset = \"UTF-8\";\n }\n if (charset === \"x-user-defined\") {\n charset = \"windows-1252\";\n }\n\n return charset;\n } else if ((c1 >= 0x41 && c1 <= 0x5A) || (c1 >= 0x61 && c1 <= 0x7A)) {\n // a-z or A-Z\n for (i += 2; i < l; i++) {\n c = buffer[i];\n // space or >\n if (isSpaceCharacter(c) || c === 0x3E) {\n break;\n }\n }\n let attrRes;\n do {\n attrRes = getAttribute(buffer, i, l);\n i = attrRes.i;\n } while (attrRes.attr);\n } else if (c1 === 0x21 || c1 === 0x2F || c1 === 0x3F) {\n // ! or / or ?\n for (i += 2; i < l; i++) {\n c = buffer[i];\n // >\n if (c === 0x3E) {\n break;\n }\n }\n }\n }\n }\n return null;\n}\n\n// https://html.spec.whatwg.org/multipage/syntax.html#concept-get-attributes-when-sniffing\nfunction getAttribute(buffer, i, l) {\n for (; i < l; i++) {\n let c = buffer[i];\n // space or /\n if (isSpaceCharacter(c) || c === 0x2F) {\n continue;\n }\n // \">\"\n if (c === 0x3E) {\n break;\n }\n let name = \"\";\n let value = \"\";\n nameLoop:for (; i < l; i++) {\n c = buffer[i];\n // \"=\"\n if (c === 0x3D && name !== \"\") {\n i++;\n break;\n }\n // space\n if (isSpaceCharacter(c)) {\n for (i++; i < l; i++) {\n c = buffer[i];\n // space\n if (isSpaceCharacter(c)) {\n continue;\n }\n // not \"=\"\n if (c !== 0x3D) {\n return { attr: { name, value }, i };\n }\n\n i++;\n break nameLoop;\n }\n break;\n }\n // / or >\n if (c === 0x2F || c === 0x3E) {\n return { attr: { name, value }, i };\n }\n // A-Z\n if (c >= 0x41 && c <= 0x5A) {\n name += String.fromCharCode(c + 0x20); // lowercase\n } else {\n name += String.fromCharCode(c);\n }\n }\n c = buffer[i];\n // space\n if (isSpaceCharacter(c)) {\n for (i++; i < l; i++) {\n c = buffer[i];\n // space\n if (isSpaceCharacter(c)) {\n continue;\n } else {\n break;\n }\n }\n }\n // \" or '\n if (c === 0x22 || c === 0x27) {\n const quote = c;\n for (i++; i < l; i++) {\n c = buffer[i];\n\n if (c === quote) {\n i++;\n return { attr: { name, value }, i };\n }\n\n // A-Z\n if (c >= 0x41 && c <= 0x5A) {\n value += String.fromCharCode(c + 0x20); // lowercase\n } else {\n value += String.fromCharCode(c);\n }\n }\n }\n\n // >\n if (c === 0x3E) {\n return { attr: { name, value }, i };\n }\n\n // A-Z\n if (c >= 0x41 && c <= 0x5A) {\n value += String.fromCharCode(c + 0x20); // lowercase\n } else {\n value += String.fromCharCode(c);\n }\n\n for (i++; i < l; i++) {\n c = buffer[i];\n\n // space or >\n if (isSpaceCharacter(c) || c === 0x3E) {\n return { attr: { name, value }, i };\n }\n\n // A-Z\n if (c >= 0x41 && c <= 0x5A) {\n value += String.fromCharCode(c + 0x20); // lowercase\n } else {\n value += String.fromCharCode(c);\n }\n }\n }\n return { i };\n}\n\nfunction extractCharacterEncodingFromMeta(string) {\n let position = 0;\n\n while (true) {\n const indexOfCharset = string.substring(position).search(/charset/i);\n\n if (indexOfCharset === -1) {\n return null;\n }\n let subPosition = position + indexOfCharset + \"charset\".length;\n\n while (isSpaceCharacter(string[subPosition].charCodeAt(0))) {\n ++subPosition;\n }\n\n if (string[subPosition] !== \"=\") {\n position = subPosition - 1;\n continue;\n }\n\n ++subPosition;\n\n while (isSpaceCharacter(string[subPosition].charCodeAt(0))) {\n ++subPosition;\n }\n\n position = subPosition;\n break;\n }\n\n if (string[position] === \"\\\"\" || string[position] === \"'\") {\n const nextIndex = string.indexOf(string[position], position + 1);\n\n if (nextIndex !== -1) {\n return whatwgEncoding.labelToName(string.substring(position + 1, nextIndex));\n }\n\n // It is an unmatched quotation mark\n return null;\n }\n\n if (string.length === position + 1) {\n return null;\n }\n\n const indexOfASCIIWhitespaceOrSemicolon = string.substring(position + 1).search(/\\x09|\\x0A|\\x0C|\\x0D|\\x20|;/);\n const end = indexOfASCIIWhitespaceOrSemicolon === -1 ?\n string.length :\n position + indexOfASCIIWhitespaceOrSemicolon + 1;\n\n return whatwgEncoding.labelToName(string.substring(position, end));\n}\n\nfunction isSpaceCharacter(c) {\n return c === 0x09 || c === 0x0A || c === 0x0C || c === 0x0D || c === 0x20;\n}\n","'use strict';\n// rfc7231 6.1\nconst statusCodeCacheableByDefault = new Set([\n 200,\n 203,\n 204,\n 206,\n 300,\n 301,\n 404,\n 405,\n 410,\n 414,\n 501,\n]);\n\n// This implementation does not understand partial responses (206)\nconst understoodStatuses = new Set([\n 200,\n 203,\n 204,\n 300,\n 301,\n 302,\n 303,\n 307,\n 308,\n 404,\n 405,\n 410,\n 414,\n 501,\n]);\n\nconst errorStatusCodes = new Set([\n 500,\n 502,\n 503, \n 504,\n]);\n\nconst hopByHopHeaders = {\n date: true, // included, because we add Age update Date\n connection: true,\n 'keep-alive': true,\n 'proxy-authenticate': true,\n 'proxy-authorization': true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n};\n\nconst excludedFromRevalidationUpdate = {\n // Since the old body is reused, it doesn't make sense to change properties of the body\n 'content-length': true,\n 'content-encoding': true,\n 'transfer-encoding': true,\n 'content-range': true,\n};\n\nfunction toNumberOrZero(s) {\n const n = parseInt(s, 10);\n return isFinite(n) ? n : 0;\n}\n\n// RFC 5861\nfunction isErrorResponse(response) {\n // consider undefined response as faulty\n if(!response) {\n return true\n }\n return errorStatusCodes.has(response.status);\n}\n\nfunction parseCacheControl(header) {\n const cc = {};\n if (!header) return cc;\n\n // TODO: When there is more than one value present for a given directive (e.g., two Expires header fields, multiple Cache-Control: max-age directives),\n // the directive's value is considered invalid. Caches are encouraged to consider responses that have invalid freshness information to be stale\n const parts = header.trim().split(/\\s*,\\s*/); // TODO: lame parsing\n for (const part of parts) {\n const [k, v] = part.split(/\\s*=\\s*/, 2);\n cc[k] = v === undefined ? true : v.replace(/^\"|\"$/g, ''); // TODO: lame unquoting\n }\n\n return cc;\n}\n\nfunction formatCacheControl(cc) {\n let parts = [];\n for (const k in cc) {\n const v = cc[k];\n parts.push(v === true ? k : k + '=' + v);\n }\n if (!parts.length) {\n return undefined;\n }\n return parts.join(', ');\n}\n\nmodule.exports = class CachePolicy {\n constructor(\n req,\n res,\n {\n shared,\n cacheHeuristic,\n immutableMinTimeToLive,\n ignoreCargoCult,\n _fromObject,\n } = {}\n ) {\n if (_fromObject) {\n this._fromObject(_fromObject);\n return;\n }\n\n if (!res || !res.headers) {\n throw Error('Response headers missing');\n }\n this._assertRequestHasHeaders(req);\n\n this._responseTime = this.now();\n this._isShared = shared !== false;\n this._cacheHeuristic =\n undefined !== cacheHeuristic ? cacheHeuristic : 0.1; // 10% matches IE\n this._immutableMinTtl =\n undefined !== immutableMinTimeToLive\n ? immutableMinTimeToLive\n : 24 * 3600 * 1000;\n\n this._status = 'status' in res ? res.status : 200;\n this._resHeaders = res.headers;\n this._rescc = parseCacheControl(res.headers['cache-control']);\n this._method = 'method' in req ? req.method : 'GET';\n this._url = req.url;\n this._host = req.headers.host;\n this._noAuthorization = !req.headers.authorization;\n this._reqHeaders = res.headers.vary ? req.headers : null; // Don't keep all request headers if they won't be used\n this._reqcc = parseCacheControl(req.headers['cache-control']);\n\n // Assume that if someone uses legacy, non-standard uncecessary options they don't understand caching,\n // so there's no point stricly adhering to the blindly copy&pasted directives.\n if (\n ignoreCargoCult &&\n 'pre-check' in this._rescc &&\n 'post-check' in this._rescc\n ) {\n delete this._rescc['pre-check'];\n delete this._rescc['post-check'];\n delete this._rescc['no-cache'];\n delete this._rescc['no-store'];\n delete this._rescc['must-revalidate'];\n this._resHeaders = Object.assign({}, this._resHeaders, {\n 'cache-control': formatCacheControl(this._rescc),\n });\n delete this._resHeaders.expires;\n delete this._resHeaders.pragma;\n }\n\n // When the Cache-Control header field is not present in a request, caches MUST consider the no-cache request pragma-directive\n // as having the same effect as if \"Cache-Control: no-cache\" were present (see Section 5.2.1).\n if (\n res.headers['cache-control'] == null &&\n /no-cache/.test(res.headers.pragma)\n ) {\n this._rescc['no-cache'] = true;\n }\n }\n\n now() {\n return Date.now();\n }\n\n storable() {\n // The \"no-store\" request directive indicates that a cache MUST NOT store any part of either this request or any response to it.\n return !!(\n !this._reqcc['no-store'] &&\n // A cache MUST NOT store a response to any request, unless:\n // The request method is understood by the cache and defined as being cacheable, and\n ('GET' === this._method ||\n 'HEAD' === this._method ||\n ('POST' === this._method && this._hasExplicitExpiration())) &&\n // the response status code is understood by the cache, and\n understoodStatuses.has(this._status) &&\n // the \"no-store\" cache directive does not appear in request or response header fields, and\n !this._rescc['no-store'] &&\n // the \"private\" response directive does not appear in the response, if the cache is shared, and\n (!this._isShared || !this._rescc.private) &&\n // the Authorization header field does not appear in the request, if the cache is shared,\n (!this._isShared ||\n this._noAuthorization ||\n this._allowsStoringAuthenticated()) &&\n // the response either:\n // contains an Expires header field, or\n (this._resHeaders.expires ||\n // contains a max-age response directive, or\n // contains a s-maxage response directive and the cache is shared, or\n // contains a public response directive.\n this._rescc['max-age'] ||\n (this._isShared && this._rescc['s-maxage']) ||\n this._rescc.public ||\n // has a status code that is defined as cacheable by default\n statusCodeCacheableByDefault.has(this._status))\n );\n }\n\n _hasExplicitExpiration() {\n // 4.2.1 Calculating Freshness Lifetime\n return (\n (this._isShared && this._rescc['s-maxage']) ||\n this._rescc['max-age'] ||\n this._resHeaders.expires\n );\n }\n\n _assertRequestHasHeaders(req) {\n if (!req || !req.headers) {\n throw Error('Request headers missing');\n }\n }\n\n satisfiesWithoutRevalidation(req) {\n this._assertRequestHasHeaders(req);\n\n // When presented with a request, a cache MUST NOT reuse a stored response, unless:\n // the presented request does not contain the no-cache pragma (Section 5.4), nor the no-cache cache directive,\n // unless the stored response is successfully validated (Section 4.3), and\n const requestCC = parseCacheControl(req.headers['cache-control']);\n if (requestCC['no-cache'] || /no-cache/.test(req.headers.pragma)) {\n return false;\n }\n\n if (requestCC['max-age'] && this.age() > requestCC['max-age']) {\n return false;\n }\n\n if (\n requestCC['min-fresh'] &&\n this.timeToLive() < 1000 * requestCC['min-fresh']\n ) {\n return false;\n }\n\n // the stored response is either:\n // fresh, or allowed to be served stale\n if (this.stale()) {\n const allowsStale =\n requestCC['max-stale'] &&\n !this._rescc['must-revalidate'] &&\n (true === requestCC['max-stale'] ||\n requestCC['max-stale'] > this.age() - this.maxAge());\n if (!allowsStale) {\n return false;\n }\n }\n\n return this._requestMatches(req, false);\n }\n\n _requestMatches(req, allowHeadMethod) {\n // The presented effective request URI and that of the stored response match, and\n return (\n (!this._url || this._url === req.url) &&\n this._host === req.headers.host &&\n // the request method associated with the stored response allows it to be used for the presented request, and\n (!req.method ||\n this._method === req.method ||\n (allowHeadMethod && 'HEAD' === req.method)) &&\n // selecting header fields nominated by the stored response (if any) match those presented, and\n this._varyMatches(req)\n );\n }\n\n _allowsStoringAuthenticated() {\n // following Cache-Control response directives (Section 5.2.2) have such an effect: must-revalidate, public, and s-maxage.\n return (\n this._rescc['must-revalidate'] ||\n this._rescc.public ||\n this._rescc['s-maxage']\n );\n }\n\n _varyMatches(req) {\n if (!this._resHeaders.vary) {\n return true;\n }\n\n // A Vary header field-value of \"*\" always fails to match\n if (this._resHeaders.vary === '*') {\n return false;\n }\n\n const fields = this._resHeaders.vary\n .trim()\n .toLowerCase()\n .split(/\\s*,\\s*/);\n for (const name of fields) {\n if (req.headers[name] !== this._reqHeaders[name]) return false;\n }\n return true;\n }\n\n _copyWithoutHopByHopHeaders(inHeaders) {\n const headers = {};\n for (const name in inHeaders) {\n if (hopByHopHeaders[name]) continue;\n headers[name] = inHeaders[name];\n }\n // 9.1. Connection\n if (inHeaders.connection) {\n const tokens = inHeaders.connection.trim().split(/\\s*,\\s*/);\n for (const name of tokens) {\n delete headers[name];\n }\n }\n if (headers.warning) {\n const warnings = headers.warning.split(/,/).filter(warning => {\n return !/^\\s*1[0-9][0-9]/.test(warning);\n });\n if (!warnings.length) {\n delete headers.warning;\n } else {\n headers.warning = warnings.join(',').trim();\n }\n }\n return headers;\n }\n\n responseHeaders() {\n const headers = this._copyWithoutHopByHopHeaders(this._resHeaders);\n const age = this.age();\n\n // A cache SHOULD generate 113 warning if it heuristically chose a freshness\n // lifetime greater than 24 hours and the response's age is greater than 24 hours.\n if (\n age > 3600 * 24 &&\n !this._hasExplicitExpiration() &&\n this.maxAge() > 3600 * 24\n ) {\n headers.warning =\n (headers.warning ? `${headers.warning}, ` : '') +\n '113 - \"rfc7234 5.5.4\"';\n }\n headers.age = `${Math.round(age)}`;\n headers.date = new Date(this.now()).toUTCString();\n return headers;\n }\n\n /**\n * Value of the Date response header or current time if Date was invalid\n * @return timestamp\n */\n date() {\n const serverDate = Date.parse(this._resHeaders.date);\n if (isFinite(serverDate)) {\n return serverDate;\n }\n return this._responseTime;\n }\n\n /**\n * Value of the Age header, in seconds, updated for the current time.\n * May be fractional.\n *\n * @return Number\n */\n age() {\n let age = this._ageValue();\n\n const residentTime = (this.now() - this._responseTime) / 1000;\n return age + residentTime;\n }\n\n _ageValue() {\n return toNumberOrZero(this._resHeaders.age);\n }\n\n /**\n * Value of applicable max-age (or heuristic equivalent) in seconds. This counts since response's `Date`.\n *\n * For an up-to-date value, see `timeToLive()`.\n *\n * @return Number\n */\n maxAge() {\n if (!this.storable() || this._rescc['no-cache']) {\n return 0;\n }\n\n // Shared responses with cookies are cacheable according to the RFC, but IMHO it'd be unwise to do so by default\n // so this implementation requires explicit opt-in via public header\n if (\n this._isShared &&\n (this._resHeaders['set-cookie'] &&\n !this._rescc.public &&\n !this._rescc.immutable)\n ) {\n return 0;\n }\n\n if (this._resHeaders.vary === '*') {\n return 0;\n }\n\n if (this._isShared) {\n if (this._rescc['proxy-revalidate']) {\n return 0;\n }\n // if a response includes the s-maxage directive, a shared cache recipient MUST ignore the Expires field.\n if (this._rescc['s-maxage']) {\n return toNumberOrZero(this._rescc['s-maxage']);\n }\n }\n\n // If a response includes a Cache-Control field with the max-age directive, a recipient MUST ignore the Expires field.\n if (this._rescc['max-age']) {\n return toNumberOrZero(this._rescc['max-age']);\n }\n\n const defaultMinTtl = this._rescc.immutable ? this._immutableMinTtl : 0;\n\n const serverDate = this.date();\n if (this._resHeaders.expires) {\n const expires = Date.parse(this._resHeaders.expires);\n // A cache recipient MUST interpret invalid date formats, especially the value \"0\", as representing a time in the past (i.e., \"already expired\").\n if (Number.isNaN(expires) || expires < serverDate) {\n return 0;\n }\n return Math.max(defaultMinTtl, (expires - serverDate) / 1000);\n }\n\n if (this._resHeaders['last-modified']) {\n const lastModified = Date.parse(this._resHeaders['last-modified']);\n if (isFinite(lastModified) && serverDate > lastModified) {\n return Math.max(\n defaultMinTtl,\n ((serverDate - lastModified) / 1000) * this._cacheHeuristic\n );\n }\n }\n\n return defaultMinTtl;\n }\n\n timeToLive() {\n const age = this.maxAge() - this.age();\n const staleIfErrorAge = age + toNumberOrZero(this._rescc['stale-if-error']);\n const staleWhileRevalidateAge = age + toNumberOrZero(this._rescc['stale-while-revalidate']);\n return Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1000;\n }\n\n stale() {\n return this.maxAge() <= this.age();\n }\n\n _useStaleIfError() {\n return this.maxAge() + toNumberOrZero(this._rescc['stale-if-error']) > this.age();\n }\n\n useStaleWhileRevalidate() {\n return this.maxAge() + toNumberOrZero(this._rescc['stale-while-revalidate']) > this.age();\n }\n\n static fromObject(obj) {\n return new this(undefined, undefined, { _fromObject: obj });\n }\n\n _fromObject(obj) {\n if (this._responseTime) throw Error('Reinitialized');\n if (!obj || obj.v !== 1) throw Error('Invalid serialization');\n\n this._responseTime = obj.t;\n this._isShared = obj.sh;\n this._cacheHeuristic = obj.ch;\n this._immutableMinTtl =\n obj.imm !== undefined ? obj.imm : 24 * 3600 * 1000;\n this._status = obj.st;\n this._resHeaders = obj.resh;\n this._rescc = obj.rescc;\n this._method = obj.m;\n this._url = obj.u;\n this._host = obj.h;\n this._noAuthorization = obj.a;\n this._reqHeaders = obj.reqh;\n this._reqcc = obj.reqcc;\n }\n\n toObject() {\n return {\n v: 1,\n t: this._responseTime,\n sh: this._isShared,\n ch: this._cacheHeuristic,\n imm: this._immutableMinTtl,\n st: this._status,\n resh: this._resHeaders,\n rescc: this._rescc,\n m: this._method,\n u: this._url,\n h: this._host,\n a: this._noAuthorization,\n reqh: this._reqHeaders,\n reqcc: this._reqcc,\n };\n }\n\n /**\n * Headers for sending to the origin server to revalidate stale response.\n * Allows server to return 304 to allow reuse of the previous response.\n *\n * Hop by hop headers are always stripped.\n * Revalidation headers may be added or removed, depending on request.\n */\n revalidationHeaders(incomingReq) {\n this._assertRequestHasHeaders(incomingReq);\n const headers = this._copyWithoutHopByHopHeaders(incomingReq.headers);\n\n // This implementation does not understand range requests\n delete headers['if-range'];\n\n if (!this._requestMatches(incomingReq, true) || !this.storable()) {\n // revalidation allowed via HEAD\n // not for the same resource, or wasn't allowed to be cached anyway\n delete headers['if-none-match'];\n delete headers['if-modified-since'];\n return headers;\n }\n\n /* MUST send that entity-tag in any cache validation request (using If-Match or If-None-Match) if an entity-tag has been provided by the origin server. */\n if (this._resHeaders.etag) {\n headers['if-none-match'] = headers['if-none-match']\n ? `${headers['if-none-match']}, ${this._resHeaders.etag}`\n : this._resHeaders.etag;\n }\n\n // Clients MAY issue simple (non-subrange) GET requests with either weak validators or strong validators. Clients MUST NOT use weak validators in other forms of request.\n const forbidsWeakValidators =\n headers['accept-ranges'] ||\n headers['if-match'] ||\n headers['if-unmodified-since'] ||\n (this._method && this._method != 'GET');\n\n /* SHOULD send the Last-Modified value in non-subrange cache validation requests (using If-Modified-Since) if only a Last-Modified value has been provided by the origin server.\n Note: This implementation does not understand partial responses (206) */\n if (forbidsWeakValidators) {\n delete headers['if-modified-since'];\n\n if (headers['if-none-match']) {\n const etags = headers['if-none-match']\n .split(/,/)\n .filter(etag => {\n return !/^\\s*W\\//.test(etag);\n });\n if (!etags.length) {\n delete headers['if-none-match'];\n } else {\n headers['if-none-match'] = etags.join(',').trim();\n }\n }\n } else if (\n this._resHeaders['last-modified'] &&\n !headers['if-modified-since']\n ) {\n headers['if-modified-since'] = this._resHeaders['last-modified'];\n }\n\n return headers;\n }\n\n /**\n * Creates new CachePolicy with information combined from the previews response,\n * and the new revalidation response.\n *\n * Returns {policy, modified} where modified is a boolean indicating\n * whether the response body has been modified, and old cached body can't be used.\n *\n * @return {Object} {policy: CachePolicy, modified: Boolean}\n */\n revalidatedPolicy(request, response) {\n this._assertRequestHasHeaders(request);\n if(this._useStaleIfError() && isErrorResponse(response)) { // I consider the revalidation request unsuccessful\n return {\n modified: false,\n matches: false,\n policy: this,\n };\n }\n if (!response || !response.headers) {\n throw Error('Response headers missing');\n }\n\n // These aren't going to be supported exactly, since one CachePolicy object\n // doesn't know about all the other cached objects.\n let matches = false;\n if (response.status !== undefined && response.status != 304) {\n matches = false;\n } else if (\n response.headers.etag &&\n !/^\\s*W\\//.test(response.headers.etag)\n ) {\n // \"All of the stored responses with the same strong validator are selected.\n // If none of the stored responses contain the same strong validator,\n // then the cache MUST NOT use the new response to update any stored responses.\"\n matches =\n this._resHeaders.etag &&\n this._resHeaders.etag.replace(/^\\s*W\\//, '') ===\n response.headers.etag;\n } else if (this._resHeaders.etag && response.headers.etag) {\n // \"If the new response contains a weak validator and that validator corresponds\n // to one of the cache's stored responses,\n // then the most recent of those matching stored responses is selected for update.\"\n matches =\n this._resHeaders.etag.replace(/^\\s*W\\//, '') ===\n response.headers.etag.replace(/^\\s*W\\//, '');\n } else if (this._resHeaders['last-modified']) {\n matches =\n this._resHeaders['last-modified'] ===\n response.headers['last-modified'];\n } else {\n // If the new response does not include any form of validator (such as in the case where\n // a client generates an If-Modified-Since request from a source other than the Last-Modified\n // response header field), and there is only one stored response, and that stored response also\n // lacks a validator, then that stored response is selected for update.\n if (\n !this._resHeaders.etag &&\n !this._resHeaders['last-modified'] &&\n !response.headers.etag &&\n !response.headers['last-modified']\n ) {\n matches = true;\n }\n }\n\n if (!matches) {\n return {\n policy: new this.constructor(request, response),\n // Client receiving 304 without body, even if it's invalid/mismatched has no option\n // but to reuse a cached body. We don't have a good way to tell clients to do\n // error recovery in such case.\n modified: response.status != 304,\n matches: false,\n };\n }\n\n // use other header fields provided in the 304 (Not Modified) response to replace all instances\n // of the corresponding header fields in the stored response.\n const headers = {};\n for (const k in this._resHeaders) {\n headers[k] =\n k in response.headers && !excludedFromRevalidationUpdate[k]\n ? response.headers[k]\n : this._resHeaders[k];\n }\n\n const newResponse = Object.assign({}, response, {\n status: this._status,\n method: this._method,\n headers,\n });\n return {\n policy: new this.constructor(request, newResponse, {\n shared: this._isShared,\n cacheHeuristic: this._cacheHeuristic,\n immutableMinTimeToLive: this._immutableMinTtl,\n }),\n modified: false,\n matches: true,\n };\n }\n};\n","// Copyright 2015 Joyent, Inc.\n\nvar parser = require('./parser');\nvar signer = require('./signer');\nvar verify = require('./verify');\nvar utils = require('./utils');\n\n\n\n///--- API\n\nmodule.exports = {\n\n parse: parser.parseRequest,\n parseRequest: parser.parseRequest,\n\n sign: signer.signRequest,\n signRequest: signer.signRequest,\n createSigner: signer.createSigner,\n isSigner: signer.isSigner,\n\n sshKeyToPEM: utils.sshKeyToPEM,\n sshKeyFingerprint: utils.fingerprint,\n pemToRsaSSHKey: utils.pemToRsaSSHKey,\n\n verify: verify.verifySignature,\n verifySignature: verify.verifySignature,\n verifyHMAC: verify.verifyHMAC\n};\n","// Copyright 2012 Joyent, Inc. All rights reserved.\n\nvar assert = require('assert-plus');\nvar util = require('util');\nvar utils = require('./utils');\n\n\n\n///--- Globals\n\nvar HASH_ALGOS = utils.HASH_ALGOS;\nvar PK_ALGOS = utils.PK_ALGOS;\nvar HttpSignatureError = utils.HttpSignatureError;\nvar InvalidAlgorithmError = utils.InvalidAlgorithmError;\nvar validateAlgorithm = utils.validateAlgorithm;\n\nvar State = {\n New: 0,\n Params: 1\n};\n\nvar ParamsState = {\n Name: 0,\n Quote: 1,\n Value: 2,\n Comma: 3\n};\n\n\n///--- Specific Errors\n\n\nfunction ExpiredRequestError(message) {\n HttpSignatureError.call(this, message, ExpiredRequestError);\n}\nutil.inherits(ExpiredRequestError, HttpSignatureError);\n\n\nfunction InvalidHeaderError(message) {\n HttpSignatureError.call(this, message, InvalidHeaderError);\n}\nutil.inherits(InvalidHeaderError, HttpSignatureError);\n\n\nfunction InvalidParamsError(message) {\n HttpSignatureError.call(this, message, InvalidParamsError);\n}\nutil.inherits(InvalidParamsError, HttpSignatureError);\n\n\nfunction MissingHeaderError(message) {\n HttpSignatureError.call(this, message, MissingHeaderError);\n}\nutil.inherits(MissingHeaderError, HttpSignatureError);\n\nfunction StrictParsingError(message) {\n HttpSignatureError.call(this, message, StrictParsingError);\n}\nutil.inherits(StrictParsingError, HttpSignatureError);\n\n///--- Exported API\n\nmodule.exports = {\n\n /**\n * Parses the 'Authorization' header out of an http.ServerRequest object.\n *\n * Note that this API will fully validate the Authorization header, and throw\n * on any error. It will not however check the signature, or the keyId format\n * as those are specific to your environment. You can use the options object\n * to pass in extra constraints.\n *\n * As a response object you can expect this:\n *\n * {\n * \"scheme\": \"Signature\",\n * \"params\": {\n * \"keyId\": \"foo\",\n * \"algorithm\": \"rsa-sha256\",\n * \"headers\": [\n * \"date\" or \"x-date\",\n * \"digest\"\n * ],\n * \"signature\": \"base64\"\n * },\n * \"signingString\": \"ready to be passed to crypto.verify()\"\n * }\n *\n * @param {Object} request an http.ServerRequest.\n * @param {Object} options an optional options object with:\n * - clockSkew: allowed clock skew in seconds (default 300).\n * - headers: required header names (def: date or x-date)\n * - algorithms: algorithms to support (default: all).\n * - strict: should enforce latest spec parsing\n * (default: false).\n * @return {Object} parsed out object (see above).\n * @throws {TypeError} on invalid input.\n * @throws {InvalidHeaderError} on an invalid Authorization header error.\n * @throws {InvalidParamsError} if the params in the scheme are invalid.\n * @throws {MissingHeaderError} if the params indicate a header not present,\n * either in the request headers from the params,\n * or not in the params from a required header\n * in options.\n * @throws {StrictParsingError} if old attributes are used in strict parsing\n * mode.\n * @throws {ExpiredRequestError} if the value of date or x-date exceeds skew.\n */\n parseRequest: function parseRequest(request, options) {\n assert.object(request, 'request');\n assert.object(request.headers, 'request.headers');\n if (options === undefined) {\n options = {};\n }\n if (options.headers === undefined) {\n options.headers = [request.headers['x-date'] ? 'x-date' : 'date'];\n }\n assert.object(options, 'options');\n assert.arrayOfString(options.headers, 'options.headers');\n assert.optionalFinite(options.clockSkew, 'options.clockSkew');\n\n var authzHeaderName = options.authorizationHeaderName || 'authorization';\n\n if (!request.headers[authzHeaderName]) {\n throw new MissingHeaderError('no ' + authzHeaderName + ' header ' +\n 'present in the request');\n }\n\n options.clockSkew = options.clockSkew || 300;\n\n\n var i = 0;\n var state = State.New;\n var substate = ParamsState.Name;\n var tmpName = '';\n var tmpValue = '';\n\n var parsed = {\n scheme: '',\n params: {},\n signingString: ''\n };\n\n var authz = request.headers[authzHeaderName];\n for (i = 0; i < authz.length; i++) {\n var c = authz.charAt(i);\n\n switch (Number(state)) {\n\n case State.New:\n if (c !== ' ') parsed.scheme += c;\n else state = State.Params;\n break;\n\n case State.Params:\n switch (Number(substate)) {\n\n case ParamsState.Name:\n var code = c.charCodeAt(0);\n // restricted name of A-Z / a-z\n if ((code >= 0x41 && code <= 0x5a) || // A-Z\n (code >= 0x61 && code <= 0x7a)) { // a-z\n tmpName += c;\n } else if (c === '=') {\n if (tmpName.length === 0)\n throw new InvalidHeaderError('bad param format');\n substate = ParamsState.Quote;\n } else {\n throw new InvalidHeaderError('bad param format');\n }\n break;\n\n case ParamsState.Quote:\n if (c === '\"') {\n tmpValue = '';\n substate = ParamsState.Value;\n } else {\n throw new InvalidHeaderError('bad param format');\n }\n break;\n\n case ParamsState.Value:\n if (c === '\"') {\n parsed.params[tmpName] = tmpValue;\n substate = ParamsState.Comma;\n } else {\n tmpValue += c;\n }\n break;\n\n case ParamsState.Comma:\n if (c === ',') {\n tmpName = '';\n substate = ParamsState.Name;\n } else {\n throw new InvalidHeaderError('bad param format');\n }\n break;\n\n default:\n throw new Error('Invalid substate');\n }\n break;\n\n default:\n throw new Error('Invalid substate');\n }\n\n }\n\n if (!parsed.params.headers || parsed.params.headers === '') {\n if (request.headers['x-date']) {\n parsed.params.headers = ['x-date'];\n } else {\n parsed.params.headers = ['date'];\n }\n } else {\n parsed.params.headers = parsed.params.headers.split(' ');\n }\n\n // Minimally validate the parsed object\n if (!parsed.scheme || parsed.scheme !== 'Signature')\n throw new InvalidHeaderError('scheme was not \"Signature\"');\n\n if (!parsed.params.keyId)\n throw new InvalidHeaderError('keyId was not specified');\n\n if (!parsed.params.algorithm)\n throw new InvalidHeaderError('algorithm was not specified');\n\n if (!parsed.params.signature)\n throw new InvalidHeaderError('signature was not specified');\n\n // Check the algorithm against the official list\n parsed.params.algorithm = parsed.params.algorithm.toLowerCase();\n try {\n validateAlgorithm(parsed.params.algorithm);\n } catch (e) {\n if (e instanceof InvalidAlgorithmError)\n throw (new InvalidParamsError(parsed.params.algorithm + ' is not ' +\n 'supported'));\n else\n throw (e);\n }\n\n // Build the signingString\n for (i = 0; i < parsed.params.headers.length; i++) {\n var h = parsed.params.headers[i].toLowerCase();\n parsed.params.headers[i] = h;\n\n if (h === 'request-line') {\n if (!options.strict) {\n /*\n * We allow headers from the older spec drafts if strict parsing isn't\n * specified in options.\n */\n parsed.signingString +=\n request.method + ' ' + request.url + ' HTTP/' + request.httpVersion;\n } else {\n /* Strict parsing doesn't allow older draft headers. */\n throw (new StrictParsingError('request-line is not a valid header ' +\n 'with strict parsing enabled.'));\n }\n } else if (h === '(request-target)') {\n parsed.signingString +=\n '(request-target): ' + request.method.toLowerCase() + ' ' +\n request.url;\n } else {\n var value = request.headers[h];\n if (value === undefined)\n throw new MissingHeaderError(h + ' was not in the request');\n parsed.signingString += h + ': ' + value;\n }\n\n if ((i + 1) < parsed.params.headers.length)\n parsed.signingString += '\\n';\n }\n\n // Check against the constraints\n var date;\n if (request.headers.date || request.headers['x-date']) {\n if (request.headers['x-date']) {\n date = new Date(request.headers['x-date']);\n } else {\n date = new Date(request.headers.date);\n }\n var now = new Date();\n var skew = Math.abs(now.getTime() - date.getTime());\n\n if (skew > options.clockSkew * 1000) {\n throw new ExpiredRequestError('clock skew of ' +\n (skew / 1000) +\n 's was greater than ' +\n options.clockSkew + 's');\n }\n }\n\n options.headers.forEach(function (hdr) {\n // Remember that we already checked any headers in the params\n // were in the request, so if this passes we're good.\n if (parsed.params.headers.indexOf(hdr.toLowerCase()) < 0)\n throw new MissingHeaderError(hdr + ' was not a signed header');\n });\n\n if (options.algorithms) {\n if (options.algorithms.indexOf(parsed.params.algorithm) === -1)\n throw new InvalidParamsError(parsed.params.algorithm +\n ' is not a supported algorithm');\n }\n\n parsed.algorithm = parsed.params.algorithm.toUpperCase();\n parsed.keyId = parsed.params.keyId;\n return parsed;\n }\n\n};\n","// Copyright 2012 Joyent, Inc. All rights reserved.\n\nvar assert = require('assert-plus');\nvar crypto = require('crypto');\nvar http = require('http');\nvar util = require('util');\nvar sshpk = require('sshpk');\nvar jsprim = require('jsprim');\nvar utils = require('./utils');\n\nvar sprintf = require('util').format;\n\nvar HASH_ALGOS = utils.HASH_ALGOS;\nvar PK_ALGOS = utils.PK_ALGOS;\nvar InvalidAlgorithmError = utils.InvalidAlgorithmError;\nvar HttpSignatureError = utils.HttpSignatureError;\nvar validateAlgorithm = utils.validateAlgorithm;\n\n///--- Globals\n\nvar AUTHZ_FMT =\n 'Signature keyId=\"%s\",algorithm=\"%s\",headers=\"%s\",signature=\"%s\"';\n\n///--- Specific Errors\n\nfunction MissingHeaderError(message) {\n HttpSignatureError.call(this, message, MissingHeaderError);\n}\nutil.inherits(MissingHeaderError, HttpSignatureError);\n\nfunction StrictParsingError(message) {\n HttpSignatureError.call(this, message, StrictParsingError);\n}\nutil.inherits(StrictParsingError, HttpSignatureError);\n\n/* See createSigner() */\nfunction RequestSigner(options) {\n assert.object(options, 'options');\n\n var alg = [];\n if (options.algorithm !== undefined) {\n assert.string(options.algorithm, 'options.algorithm');\n alg = validateAlgorithm(options.algorithm);\n }\n this.rs_alg = alg;\n\n /*\n * RequestSigners come in two varieties: ones with an rs_signFunc, and ones\n * with an rs_signer.\n *\n * rs_signFunc-based RequestSigners have to build up their entire signing\n * string within the rs_lines array and give it to rs_signFunc as a single\n * concat'd blob. rs_signer-based RequestSigners can add a line at a time to\n * their signing state by using rs_signer.update(), thus only needing to\n * buffer the hash function state and one line at a time.\n */\n if (options.sign !== undefined) {\n assert.func(options.sign, 'options.sign');\n this.rs_signFunc = options.sign;\n\n } else if (alg[0] === 'hmac' && options.key !== undefined) {\n assert.string(options.keyId, 'options.keyId');\n this.rs_keyId = options.keyId;\n\n if (typeof (options.key) !== 'string' && !Buffer.isBuffer(options.key))\n throw (new TypeError('options.key for HMAC must be a string or Buffer'));\n\n /*\n * Make an rs_signer for HMACs, not a rs_signFunc -- HMACs digest their\n * data in chunks rather than requiring it all to be given in one go\n * at the end, so they are more similar to signers than signFuncs.\n */\n this.rs_signer = crypto.createHmac(alg[1].toUpperCase(), options.key);\n this.rs_signer.sign = function () {\n var digest = this.digest('base64');\n return ({\n hashAlgorithm: alg[1],\n toString: function () { return (digest); }\n });\n };\n\n } else if (options.key !== undefined) {\n var key = options.key;\n if (typeof (key) === 'string' || Buffer.isBuffer(key))\n key = sshpk.parsePrivateKey(key);\n\n assert.ok(sshpk.PrivateKey.isPrivateKey(key, [1, 2]),\n 'options.key must be a sshpk.PrivateKey');\n this.rs_key = key;\n\n assert.string(options.keyId, 'options.keyId');\n this.rs_keyId = options.keyId;\n\n if (!PK_ALGOS[key.type]) {\n throw (new InvalidAlgorithmError(key.type.toUpperCase() + ' type ' +\n 'keys are not supported'));\n }\n\n if (alg[0] !== undefined && key.type !== alg[0]) {\n throw (new InvalidAlgorithmError('options.key must be a ' +\n alg[0].toUpperCase() + ' key, was given a ' +\n key.type.toUpperCase() + ' key instead'));\n }\n\n this.rs_signer = key.createSign(alg[1]);\n\n } else {\n throw (new TypeError('options.sign (func) or options.key is required'));\n }\n\n this.rs_headers = [];\n this.rs_lines = [];\n}\n\n/**\n * Adds a header to be signed, with its value, into this signer.\n *\n * @param {String} header\n * @param {String} value\n * @return {String} value written\n */\nRequestSigner.prototype.writeHeader = function (header, value) {\n assert.string(header, 'header');\n header = header.toLowerCase();\n assert.string(value, 'value');\n\n this.rs_headers.push(header);\n\n if (this.rs_signFunc) {\n this.rs_lines.push(header + ': ' + value);\n\n } else {\n var line = header + ': ' + value;\n if (this.rs_headers.length > 0)\n line = '\\n' + line;\n this.rs_signer.update(line);\n }\n\n return (value);\n};\n\n/**\n * Adds a default Date header, returning its value.\n *\n * @return {String}\n */\nRequestSigner.prototype.writeDateHeader = function () {\n return (this.writeHeader('date', jsprim.rfc1123(new Date())));\n};\n\n/**\n * Adds the request target line to be signed.\n *\n * @param {String} method, HTTP method (e.g. 'get', 'post', 'put')\n * @param {String} path\n */\nRequestSigner.prototype.writeTarget = function (method, path) {\n assert.string(method, 'method');\n assert.string(path, 'path');\n method = method.toLowerCase();\n this.writeHeader('(request-target)', method + ' ' + path);\n};\n\n/**\n * Calculate the value for the Authorization header on this request\n * asynchronously.\n *\n * @param {Func} callback (err, authz)\n */\nRequestSigner.prototype.sign = function (cb) {\n assert.func(cb, 'callback');\n\n if (this.rs_headers.length < 1)\n throw (new Error('At least one header must be signed'));\n\n var alg, authz;\n if (this.rs_signFunc) {\n var data = this.rs_lines.join('\\n');\n var self = this;\n this.rs_signFunc(data, function (err, sig) {\n if (err) {\n cb(err);\n return;\n }\n try {\n assert.object(sig, 'signature');\n assert.string(sig.keyId, 'signature.keyId');\n assert.string(sig.algorithm, 'signature.algorithm');\n assert.string(sig.signature, 'signature.signature');\n alg = validateAlgorithm(sig.algorithm);\n\n authz = sprintf(AUTHZ_FMT,\n sig.keyId,\n sig.algorithm,\n self.rs_headers.join(' '),\n sig.signature);\n } catch (e) {\n cb(e);\n return;\n }\n cb(null, authz);\n });\n\n } else {\n try {\n var sigObj = this.rs_signer.sign();\n } catch (e) {\n cb(e);\n return;\n }\n alg = (this.rs_alg[0] || this.rs_key.type) + '-' + sigObj.hashAlgorithm;\n var signature = sigObj.toString();\n authz = sprintf(AUTHZ_FMT,\n this.rs_keyId,\n alg,\n this.rs_headers.join(' '),\n signature);\n cb(null, authz);\n }\n};\n\n///--- Exported API\n\nmodule.exports = {\n /**\n * Identifies whether a given object is a request signer or not.\n *\n * @param {Object} object, the object to identify\n * @returns {Boolean}\n */\n isSigner: function (obj) {\n if (typeof (obj) === 'object' && obj instanceof RequestSigner)\n return (true);\n return (false);\n },\n\n /**\n * Creates a request signer, used to asynchronously build a signature\n * for a request (does not have to be an http.ClientRequest).\n *\n * @param {Object} options, either:\n * - {String} keyId\n * - {String|Buffer} key\n * - {String} algorithm (optional, required for HMAC)\n * or:\n * - {Func} sign (data, cb)\n * @return {RequestSigner}\n */\n createSigner: function createSigner(options) {\n return (new RequestSigner(options));\n },\n\n /**\n * Adds an 'Authorization' header to an http.ClientRequest object.\n *\n * Note that this API will add a Date header if it's not already set. Any\n * other headers in the options.headers array MUST be present, or this\n * will throw.\n *\n * You shouldn't need to check the return type; it's just there if you want\n * to be pedantic.\n *\n * The optional flag indicates whether parsing should use strict enforcement\n * of the version draft-cavage-http-signatures-04 of the spec or beyond.\n * The default is to be loose and support\n * older versions for compatibility.\n *\n * @param {Object} request an instance of http.ClientRequest.\n * @param {Object} options signing parameters object:\n * - {String} keyId required.\n * - {String} key required (either a PEM or HMAC key).\n * - {Array} headers optional; defaults to ['date'].\n * - {String} algorithm optional (unless key is HMAC);\n * default is the same as the sshpk default\n * signing algorithm for the type of key given\n * - {String} httpVersion optional; defaults to '1.1'.\n * - {Boolean} strict optional; defaults to 'false'.\n * @return {Boolean} true if Authorization (and optionally Date) were added.\n * @throws {TypeError} on bad parameter types (input).\n * @throws {InvalidAlgorithmError} if algorithm was bad or incompatible with\n * the given key.\n * @throws {sshpk.KeyParseError} if key was bad.\n * @throws {MissingHeaderError} if a header to be signed was specified but\n * was not present.\n */\n signRequest: function signRequest(request, options) {\n assert.object(request, 'request');\n assert.object(options, 'options');\n assert.optionalString(options.algorithm, 'options.algorithm');\n assert.string(options.keyId, 'options.keyId');\n assert.optionalArrayOfString(options.headers, 'options.headers');\n assert.optionalString(options.httpVersion, 'options.httpVersion');\n\n if (!request.getHeader('Date'))\n request.setHeader('Date', jsprim.rfc1123(new Date()));\n if (!options.headers)\n options.headers = ['date'];\n if (!options.httpVersion)\n options.httpVersion = '1.1';\n\n var alg = [];\n if (options.algorithm) {\n options.algorithm = options.algorithm.toLowerCase();\n alg = validateAlgorithm(options.algorithm);\n }\n\n var i;\n var stringToSign = '';\n for (i = 0; i < options.headers.length; i++) {\n if (typeof (options.headers[i]) !== 'string')\n throw new TypeError('options.headers must be an array of Strings');\n\n var h = options.headers[i].toLowerCase();\n\n if (h === 'request-line') {\n if (!options.strict) {\n /**\n * We allow headers from the older spec drafts if strict parsing isn't\n * specified in options.\n */\n stringToSign +=\n request.method + ' ' + request.path + ' HTTP/' +\n options.httpVersion;\n } else {\n /* Strict parsing doesn't allow older draft headers. */\n throw (new StrictParsingError('request-line is not a valid header ' +\n 'with strict parsing enabled.'));\n }\n } else if (h === '(request-target)') {\n stringToSign +=\n '(request-target): ' + request.method.toLowerCase() + ' ' +\n request.path;\n } else {\n var value = request.getHeader(h);\n if (value === undefined || value === '') {\n throw new MissingHeaderError(h + ' was not in the request');\n }\n stringToSign += h + ': ' + value;\n }\n\n if ((i + 1) < options.headers.length)\n stringToSign += '\\n';\n }\n\n /* This is just for unit tests. */\n if (request.hasOwnProperty('_stringToSign')) {\n request._stringToSign = stringToSign;\n }\n\n var signature;\n if (alg[0] === 'hmac') {\n if (typeof (options.key) !== 'string' && !Buffer.isBuffer(options.key))\n throw (new TypeError('options.key must be a string or Buffer'));\n\n var hmac = crypto.createHmac(alg[1].toUpperCase(), options.key);\n hmac.update(stringToSign);\n signature = hmac.digest('base64');\n\n } else {\n var key = options.key;\n if (typeof (key) === 'string' || Buffer.isBuffer(key))\n key = sshpk.parsePrivateKey(options.key);\n\n assert.ok(sshpk.PrivateKey.isPrivateKey(key, [1, 2]),\n 'options.key must be a sshpk.PrivateKey');\n\n if (!PK_ALGOS[key.type]) {\n throw (new InvalidAlgorithmError(key.type.toUpperCase() + ' type ' +\n 'keys are not supported'));\n }\n\n if (alg[0] !== undefined && key.type !== alg[0]) {\n throw (new InvalidAlgorithmError('options.key must be a ' +\n alg[0].toUpperCase() + ' key, was given a ' +\n key.type.toUpperCase() + ' key instead'));\n }\n\n var signer = key.createSign(alg[1]);\n signer.update(stringToSign);\n var sigObj = signer.sign();\n if (!HASH_ALGOS[sigObj.hashAlgorithm]) {\n throw (new InvalidAlgorithmError(sigObj.hashAlgorithm.toUpperCase() +\n ' is not a supported hash algorithm'));\n }\n options.algorithm = key.type + '-' + sigObj.hashAlgorithm;\n signature = sigObj.toString();\n assert.notStrictEqual(signature, '', 'empty signature produced');\n }\n\n var authzHeaderName = options.authorizationHeaderName || 'Authorization';\n\n request.setHeader(authzHeaderName, sprintf(AUTHZ_FMT,\n options.keyId,\n options.algorithm,\n options.headers.join(' '),\n signature));\n\n return true;\n }\n\n};\n","// Copyright 2012 Joyent, Inc. All rights reserved.\n\nvar assert = require('assert-plus');\nvar sshpk = require('sshpk');\nvar util = require('util');\n\nvar HASH_ALGOS = {\n 'sha1': true,\n 'sha256': true,\n 'sha512': true\n};\n\nvar PK_ALGOS = {\n 'rsa': true,\n 'dsa': true,\n 'ecdsa': true\n};\n\nfunction HttpSignatureError(message, caller) {\n if (Error.captureStackTrace)\n Error.captureStackTrace(this, caller || HttpSignatureError);\n\n this.message = message;\n this.name = caller.name;\n}\nutil.inherits(HttpSignatureError, Error);\n\nfunction InvalidAlgorithmError(message) {\n HttpSignatureError.call(this, message, InvalidAlgorithmError);\n}\nutil.inherits(InvalidAlgorithmError, HttpSignatureError);\n\nfunction validateAlgorithm(algorithm) {\n var alg = algorithm.toLowerCase().split('-');\n\n if (alg.length !== 2) {\n throw (new InvalidAlgorithmError(alg[0].toUpperCase() + ' is not a ' +\n 'valid algorithm'));\n }\n\n if (alg[0] !== 'hmac' && !PK_ALGOS[alg[0]]) {\n throw (new InvalidAlgorithmError(alg[0].toUpperCase() + ' type keys ' +\n 'are not supported'));\n }\n\n if (!HASH_ALGOS[alg[1]]) {\n throw (new InvalidAlgorithmError(alg[1].toUpperCase() + ' is not a ' +\n 'supported hash algorithm'));\n }\n\n return (alg);\n}\n\n///--- API\n\nmodule.exports = {\n\n HASH_ALGOS: HASH_ALGOS,\n PK_ALGOS: PK_ALGOS,\n\n HttpSignatureError: HttpSignatureError,\n InvalidAlgorithmError: InvalidAlgorithmError,\n\n validateAlgorithm: validateAlgorithm,\n\n /**\n * Converts an OpenSSH public key (rsa only) to a PKCS#8 PEM file.\n *\n * The intent of this module is to interoperate with OpenSSL only,\n * specifically the node crypto module's `verify` method.\n *\n * @param {String} key an OpenSSH public key.\n * @return {String} PEM encoded form of the RSA public key.\n * @throws {TypeError} on bad input.\n * @throws {Error} on invalid ssh key formatted data.\n */\n sshKeyToPEM: function sshKeyToPEM(key) {\n assert.string(key, 'ssh_key');\n\n var k = sshpk.parseKey(key, 'ssh');\n return (k.toString('pem'));\n },\n\n\n /**\n * Generates an OpenSSH fingerprint from an ssh public key.\n *\n * @param {String} key an OpenSSH public key.\n * @return {String} key fingerprint.\n * @throws {TypeError} on bad input.\n * @throws {Error} if what you passed doesn't look like an ssh public key.\n */\n fingerprint: function fingerprint(key) {\n assert.string(key, 'ssh_key');\n\n var k = sshpk.parseKey(key, 'ssh');\n return (k.fingerprint('md5').toString('hex'));\n },\n\n /**\n * Converts a PKGCS#8 PEM file to an OpenSSH public key (rsa)\n *\n * The reverse of the above function.\n */\n pemToRsaSSHKey: function pemToRsaSSHKey(pem, comment) {\n assert.equal('string', typeof (pem), 'typeof pem');\n\n var k = sshpk.parseKey(pem, 'pem');\n k.comment = comment;\n return (k.toString('ssh'));\n }\n};\n","// Copyright 2015 Joyent, Inc.\n\nvar assert = require('assert-plus');\nvar crypto = require('crypto');\nvar sshpk = require('sshpk');\nvar utils = require('./utils');\n\nvar HASH_ALGOS = utils.HASH_ALGOS;\nvar PK_ALGOS = utils.PK_ALGOS;\nvar InvalidAlgorithmError = utils.InvalidAlgorithmError;\nvar HttpSignatureError = utils.HttpSignatureError;\nvar validateAlgorithm = utils.validateAlgorithm;\n\n///--- Exported API\n\nmodule.exports = {\n /**\n * Verify RSA/DSA signature against public key. You are expected to pass in\n * an object that was returned from `parse()`.\n *\n * @param {Object} parsedSignature the object you got from `parse`.\n * @param {String} pubkey RSA/DSA private key PEM.\n * @return {Boolean} true if valid, false otherwise.\n * @throws {TypeError} if you pass in bad arguments.\n * @throws {InvalidAlgorithmError}\n */\n verifySignature: function verifySignature(parsedSignature, pubkey) {\n assert.object(parsedSignature, 'parsedSignature');\n if (typeof (pubkey) === 'string' || Buffer.isBuffer(pubkey))\n pubkey = sshpk.parseKey(pubkey);\n assert.ok(sshpk.Key.isKey(pubkey, [1, 1]), 'pubkey must be a sshpk.Key');\n\n var alg = validateAlgorithm(parsedSignature.algorithm);\n if (alg[0] === 'hmac' || alg[0] !== pubkey.type)\n return (false);\n\n var v = pubkey.createVerify(alg[1]);\n v.update(parsedSignature.signingString);\n return (v.verify(parsedSignature.params.signature, 'base64'));\n },\n\n /**\n * Verify HMAC against shared secret. You are expected to pass in an object\n * that was returned from `parse()`.\n *\n * @param {Object} parsedSignature the object you got from `parse`.\n * @param {String} secret HMAC shared secret.\n * @return {Boolean} true if valid, false otherwise.\n * @throws {TypeError} if you pass in bad arguments.\n * @throws {InvalidAlgorithmError}\n */\n verifyHMAC: function verifyHMAC(parsedSignature, secret) {\n assert.object(parsedSignature, 'parsedHMAC');\n assert.string(secret, 'secret');\n\n var alg = validateAlgorithm(parsedSignature.algorithm);\n if (alg[0] !== 'hmac')\n return (false);\n\n var hashAlg = alg[1].toUpperCase();\n\n var hmac = crypto.createHmac(hashAlg, secret);\n hmac.update(parsedSignature.signingString);\n\n /*\n * Now double-hash to avoid leaking timing information - there's\n * no easy constant-time compare in JS, so we use this approach\n * instead. See for more info:\n * https://www.isecpartners.com/blog/2011/february/double-hmac-\n * verification.aspx\n */\n var h1 = crypto.createHmac(hashAlg, secret);\n h1.update(hmac.digest());\n h1 = h1.digest();\n var h2 = crypto.createHmac(hashAlg, secret);\n h2.update(new Buffer(parsedSignature.params.signature, 'base64'));\n h2 = h2.digest();\n\n /* Node 0.8 returns strings from .digest(). */\n if (typeof (h1) === 'string')\n return (h1 === h2);\n /* And node 0.10 lacks the .equals() method on Buffers. */\n if (Buffer.isBuffer(h1) && !h1.equals)\n return (h1.toString('binary') === h2.toString('binary'));\n\n return (h1.equals(h2));\n }\n};\n","\"use strict\";\nvar Buffer = require(\"safer-buffer\").Buffer;\n\n// Multibyte codec. In this scheme, a character is represented by 1 or more bytes.\n// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences.\n// To save memory and loading time, we read table files only when requested.\n\nexports._dbcs = DBCSCodec;\n\nvar UNASSIGNED = -1,\n GB18030_CODE = -2,\n SEQ_START = -10,\n NODE_START = -1000,\n UNASSIGNED_NODE = new Array(0x100),\n DEF_CHAR = -1;\n\nfor (var i = 0; i < 0x100; i++)\n UNASSIGNED_NODE[i] = UNASSIGNED;\n\n\n// Class DBCSCodec reads and initializes mapping tables.\nfunction DBCSCodec(codecOptions, iconv) {\n this.encodingName = codecOptions.encodingName;\n if (!codecOptions)\n throw new Error(\"DBCS codec is called without the data.\")\n if (!codecOptions.table)\n throw new Error(\"Encoding '\" + this.encodingName + \"' has no data.\");\n\n // Load tables.\n var mappingTable = codecOptions.table();\n\n\n // Decode tables: MBCS -> Unicode.\n\n // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256.\n // Trie root is decodeTables[0].\n // Values: >= 0 -> unicode character code. can be > 0xFFFF\n // == UNASSIGNED -> unknown/unassigned sequence.\n // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence.\n // <= NODE_START -> index of the next node in our trie to process next byte.\n // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq.\n this.decodeTables = [];\n this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node.\n\n // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. \n this.decodeTableSeq = [];\n\n // Actual mapping tables consist of chunks. Use them to fill up decode tables.\n for (var i = 0; i < mappingTable.length; i++)\n this._addDecodeChunk(mappingTable[i]);\n\n this.defaultCharUnicode = iconv.defaultCharUnicode;\n\n \n // Encode tables: Unicode -> DBCS.\n\n // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance.\n // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null.\n // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.).\n // == UNASSIGNED -> no conversion found. Output a default char.\n // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence.\n this.encodeTable = [];\n \n // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of\n // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key\n // means end of sequence (needed when one sequence is a strict subsequence of another).\n // Objects are kept separately from encodeTable to increase performance.\n this.encodeTableSeq = [];\n\n // Some chars can be decoded, but need not be encoded.\n var skipEncodeChars = {};\n if (codecOptions.encodeSkipVals)\n for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) {\n var val = codecOptions.encodeSkipVals[i];\n if (typeof val === 'number')\n skipEncodeChars[val] = true;\n else\n for (var j = val.from; j <= val.to; j++)\n skipEncodeChars[j] = true;\n }\n \n // Use decode trie to recursively fill out encode tables.\n this._fillEncodeTable(0, 0, skipEncodeChars);\n\n // Add more encoding pairs when needed.\n if (codecOptions.encodeAdd) {\n for (var uChar in codecOptions.encodeAdd)\n if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar))\n this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]);\n }\n\n this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)];\n if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?'];\n if (this.defCharSB === UNASSIGNED) this.defCharSB = \"?\".charCodeAt(0);\n\n\n // Load & create GB18030 tables when needed.\n if (typeof codecOptions.gb18030 === 'function') {\n this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges.\n\n // Add GB18030 decode tables.\n var thirdByteNodeIdx = this.decodeTables.length;\n var thirdByteNode = this.decodeTables[thirdByteNodeIdx] = UNASSIGNED_NODE.slice(0);\n\n var fourthByteNodeIdx = this.decodeTables.length;\n var fourthByteNode = this.decodeTables[fourthByteNodeIdx] = UNASSIGNED_NODE.slice(0);\n\n for (var i = 0x81; i <= 0xFE; i++) {\n var secondByteNodeIdx = NODE_START - this.decodeTables[0][i];\n var secondByteNode = this.decodeTables[secondByteNodeIdx];\n for (var j = 0x30; j <= 0x39; j++)\n secondByteNode[j] = NODE_START - thirdByteNodeIdx;\n }\n for (var i = 0x81; i <= 0xFE; i++)\n thirdByteNode[i] = NODE_START - fourthByteNodeIdx;\n for (var i = 0x30; i <= 0x39; i++)\n fourthByteNode[i] = GB18030_CODE\n } \n}\n\nDBCSCodec.prototype.encoder = DBCSEncoder;\nDBCSCodec.prototype.decoder = DBCSDecoder;\n\n// Decoder helpers\nDBCSCodec.prototype._getDecodeTrieNode = function(addr) {\n var bytes = [];\n for (; addr > 0; addr >>= 8)\n bytes.push(addr & 0xFF);\n if (bytes.length == 0)\n bytes.push(0);\n\n var node = this.decodeTables[0];\n for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie.\n var val = node[bytes[i]];\n\n if (val == UNASSIGNED) { // Create new node.\n node[bytes[i]] = NODE_START - this.decodeTables.length;\n this.decodeTables.push(node = UNASSIGNED_NODE.slice(0));\n }\n else if (val <= NODE_START) { // Existing node.\n node = this.decodeTables[NODE_START - val];\n }\n else\n throw new Error(\"Overwrite byte in \" + this.encodingName + \", addr: \" + addr.toString(16));\n }\n return node;\n}\n\n\nDBCSCodec.prototype._addDecodeChunk = function(chunk) {\n // First element of chunk is the hex mbcs code where we start.\n var curAddr = parseInt(chunk[0], 16);\n\n // Choose the decoding node where we'll write our chars.\n var writeTable = this._getDecodeTrieNode(curAddr);\n curAddr = curAddr & 0xFF;\n\n // Write all other elements of the chunk to the table.\n for (var k = 1; k < chunk.length; k++) {\n var part = chunk[k];\n if (typeof part === \"string\") { // String, write as-is.\n for (var l = 0; l < part.length;) {\n var code = part.charCodeAt(l++);\n if (0xD800 <= code && code < 0xDC00) { // Decode surrogate\n var codeTrail = part.charCodeAt(l++);\n if (0xDC00 <= codeTrail && codeTrail < 0xE000)\n writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00);\n else\n throw new Error(\"Incorrect surrogate pair in \" + this.encodingName + \" at chunk \" + chunk[0]);\n }\n else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used)\n var len = 0xFFF - code + 2;\n var seq = [];\n for (var m = 0; m < len; m++)\n seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq.\n\n writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length;\n this.decodeTableSeq.push(seq);\n }\n else\n writeTable[curAddr++] = code; // Basic char\n }\n } \n else if (typeof part === \"number\") { // Integer, meaning increasing sequence starting with prev character.\n var charCode = writeTable[curAddr - 1] + 1;\n for (var l = 0; l < part; l++)\n writeTable[curAddr++] = charCode++;\n }\n else\n throw new Error(\"Incorrect type '\" + typeof part + \"' given in \" + this.encodingName + \" at chunk \" + chunk[0]);\n }\n if (curAddr > 0xFF)\n throw new Error(\"Incorrect chunk in \" + this.encodingName + \" at addr \" + chunk[0] + \": too long\" + curAddr);\n}\n\n// Encoder helpers\nDBCSCodec.prototype._getEncodeBucket = function(uCode) {\n var high = uCode >> 8; // This could be > 0xFF because of astral characters.\n if (this.encodeTable[high] === undefined)\n this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand.\n return this.encodeTable[high];\n}\n\nDBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) {\n var bucket = this._getEncodeBucket(uCode);\n var low = uCode & 0xFF;\n if (bucket[low] <= SEQ_START)\n this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it.\n else if (bucket[low] == UNASSIGNED)\n bucket[low] = dbcsCode;\n}\n\nDBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) {\n \n // Get the root of character tree according to first character of the sequence.\n var uCode = seq[0];\n var bucket = this._getEncodeBucket(uCode);\n var low = uCode & 0xFF;\n\n var node;\n if (bucket[low] <= SEQ_START) {\n // There's already a sequence with - use it.\n node = this.encodeTableSeq[SEQ_START-bucket[low]];\n }\n else {\n // There was no sequence object - allocate a new one.\n node = {};\n if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence.\n bucket[low] = SEQ_START - this.encodeTableSeq.length;\n this.encodeTableSeq.push(node);\n }\n\n // Traverse the character tree, allocating new nodes as needed.\n for (var j = 1; j < seq.length-1; j++) {\n var oldVal = node[uCode];\n if (typeof oldVal === 'object')\n node = oldVal;\n else {\n node = node[uCode] = {}\n if (oldVal !== undefined)\n node[DEF_CHAR] = oldVal\n }\n }\n\n // Set the leaf to given dbcsCode.\n uCode = seq[seq.length-1];\n node[uCode] = dbcsCode;\n}\n\nDBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) {\n var node = this.decodeTables[nodeIdx];\n for (var i = 0; i < 0x100; i++) {\n var uCode = node[i];\n var mbCode = prefix + i;\n if (skipEncodeChars[mbCode])\n continue;\n\n if (uCode >= 0)\n this._setEncodeChar(uCode, mbCode);\n else if (uCode <= NODE_START)\n this._fillEncodeTable(NODE_START - uCode, mbCode << 8, skipEncodeChars);\n else if (uCode <= SEQ_START)\n this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode);\n }\n}\n\n\n\n// == Encoder ==================================================================\n\nfunction DBCSEncoder(options, codec) {\n // Encoder state\n this.leadSurrogate = -1;\n this.seqObj = undefined;\n \n // Static data\n this.encodeTable = codec.encodeTable;\n this.encodeTableSeq = codec.encodeTableSeq;\n this.defaultCharSingleByte = codec.defCharSB;\n this.gb18030 = codec.gb18030;\n}\n\nDBCSEncoder.prototype.write = function(str) {\n var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)),\n leadSurrogate = this.leadSurrogate,\n seqObj = this.seqObj, nextChar = -1,\n i = 0, j = 0;\n\n while (true) {\n // 0. Get next character.\n if (nextChar === -1) {\n if (i == str.length) break;\n var uCode = str.charCodeAt(i++);\n }\n else {\n var uCode = nextChar;\n nextChar = -1; \n }\n\n // 1. Handle surrogates.\n if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates.\n if (uCode < 0xDC00) { // We've got lead surrogate.\n if (leadSurrogate === -1) {\n leadSurrogate = uCode;\n continue;\n } else {\n leadSurrogate = uCode;\n // Double lead surrogate found.\n uCode = UNASSIGNED;\n }\n } else { // We've got trail surrogate.\n if (leadSurrogate !== -1) {\n uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00);\n leadSurrogate = -1;\n } else {\n // Incomplete surrogate pair - only trail surrogate found.\n uCode = UNASSIGNED;\n }\n \n }\n }\n else if (leadSurrogate !== -1) {\n // Incomplete surrogate pair - only lead surrogate found.\n nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char.\n leadSurrogate = -1;\n }\n\n // 2. Convert uCode character.\n var dbcsCode = UNASSIGNED;\n if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence\n var resCode = seqObj[uCode];\n if (typeof resCode === 'object') { // Sequence continues.\n seqObj = resCode;\n continue;\n\n } else if (typeof resCode == 'number') { // Sequence finished. Write it.\n dbcsCode = resCode;\n\n } else if (resCode == undefined) { // Current character is not part of the sequence.\n\n // Try default character for this sequence\n resCode = seqObj[DEF_CHAR];\n if (resCode !== undefined) {\n dbcsCode = resCode; // Found. Write it.\n nextChar = uCode; // Current character will be written too in the next iteration.\n\n } else {\n // TODO: What if we have no default? (resCode == undefined)\n // Then, we should write first char of the sequence as-is and try the rest recursively.\n // Didn't do it for now because no encoding has this situation yet.\n // Currently, just skip the sequence and write current char.\n }\n }\n seqObj = undefined;\n }\n else if (uCode >= 0) { // Regular character\n var subtable = this.encodeTable[uCode >> 8];\n if (subtable !== undefined)\n dbcsCode = subtable[uCode & 0xFF];\n \n if (dbcsCode <= SEQ_START) { // Sequence start\n seqObj = this.encodeTableSeq[SEQ_START-dbcsCode];\n continue;\n }\n\n if (dbcsCode == UNASSIGNED && this.gb18030) {\n // Use GB18030 algorithm to find character(s) to write.\n var idx = findIdx(this.gb18030.uChars, uCode);\n if (idx != -1) {\n var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]);\n newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600;\n newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260;\n newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10;\n newBuf[j++] = 0x30 + dbcsCode;\n continue;\n }\n }\n }\n\n // 3. Write dbcsCode character.\n if (dbcsCode === UNASSIGNED)\n dbcsCode = this.defaultCharSingleByte;\n \n if (dbcsCode < 0x100) {\n newBuf[j++] = dbcsCode;\n }\n else if (dbcsCode < 0x10000) {\n newBuf[j++] = dbcsCode >> 8; // high byte\n newBuf[j++] = dbcsCode & 0xFF; // low byte\n }\n else {\n newBuf[j++] = dbcsCode >> 16;\n newBuf[j++] = (dbcsCode >> 8) & 0xFF;\n newBuf[j++] = dbcsCode & 0xFF;\n }\n }\n\n this.seqObj = seqObj;\n this.leadSurrogate = leadSurrogate;\n return newBuf.slice(0, j);\n}\n\nDBCSEncoder.prototype.end = function() {\n if (this.leadSurrogate === -1 && this.seqObj === undefined)\n return; // All clean. Most often case.\n\n var newBuf = Buffer.alloc(10), j = 0;\n\n if (this.seqObj) { // We're in the sequence.\n var dbcsCode = this.seqObj[DEF_CHAR];\n if (dbcsCode !== undefined) { // Write beginning of the sequence.\n if (dbcsCode < 0x100) {\n newBuf[j++] = dbcsCode;\n }\n else {\n newBuf[j++] = dbcsCode >> 8; // high byte\n newBuf[j++] = dbcsCode & 0xFF; // low byte\n }\n } else {\n // See todo above.\n }\n this.seqObj = undefined;\n }\n\n if (this.leadSurrogate !== -1) {\n // Incomplete surrogate pair - only lead surrogate found.\n newBuf[j++] = this.defaultCharSingleByte;\n this.leadSurrogate = -1;\n }\n \n return newBuf.slice(0, j);\n}\n\n// Export for testing\nDBCSEncoder.prototype.findIdx = findIdx;\n\n\n// == Decoder ==================================================================\n\nfunction DBCSDecoder(options, codec) {\n // Decoder state\n this.nodeIdx = 0;\n this.prevBuf = Buffer.alloc(0);\n\n // Static data\n this.decodeTables = codec.decodeTables;\n this.decodeTableSeq = codec.decodeTableSeq;\n this.defaultCharUnicode = codec.defaultCharUnicode;\n this.gb18030 = codec.gb18030;\n}\n\nDBCSDecoder.prototype.write = function(buf) {\n var newBuf = Buffer.alloc(buf.length*2),\n nodeIdx = this.nodeIdx, \n prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length,\n seqStart = -this.prevBuf.length, // idx of the start of current parsed sequence.\n uCode;\n\n if (prevBufOffset > 0) // Make prev buf overlap a little to make it easier to slice later.\n prevBuf = Buffer.concat([prevBuf, buf.slice(0, 10)]);\n \n for (var i = 0, j = 0; i < buf.length; i++) {\n var curByte = (i >= 0) ? buf[i] : prevBuf[i + prevBufOffset];\n\n // Lookup in current trie node.\n var uCode = this.decodeTables[nodeIdx][curByte];\n\n if (uCode >= 0) { \n // Normal character, just use it.\n }\n else if (uCode === UNASSIGNED) { // Unknown char.\n // TODO: Callback with seq.\n //var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset);\n i = seqStart; // Try to parse again, after skipping first byte of the sequence ('i' will be incremented by 'for' cycle).\n uCode = this.defaultCharUnicode.charCodeAt(0);\n }\n else if (uCode === GB18030_CODE) {\n var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset);\n var ptr = (curSeq[0]-0x81)*12600 + (curSeq[1]-0x30)*1260 + (curSeq[2]-0x81)*10 + (curSeq[3]-0x30);\n var idx = findIdx(this.gb18030.gbChars, ptr);\n uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx];\n }\n else if (uCode <= NODE_START) { // Go to next trie node.\n nodeIdx = NODE_START - uCode;\n continue;\n }\n else if (uCode <= SEQ_START) { // Output a sequence of chars.\n var seq = this.decodeTableSeq[SEQ_START - uCode];\n for (var k = 0; k < seq.length - 1; k++) {\n uCode = seq[k];\n newBuf[j++] = uCode & 0xFF;\n newBuf[j++] = uCode >> 8;\n }\n uCode = seq[seq.length-1];\n }\n else\n throw new Error(\"iconv-lite internal error: invalid decoding table value \" + uCode + \" at \" + nodeIdx + \"/\" + curByte);\n\n // Write the character to buffer, handling higher planes using surrogate pair.\n if (uCode > 0xFFFF) { \n uCode -= 0x10000;\n var uCodeLead = 0xD800 + Math.floor(uCode / 0x400);\n newBuf[j++] = uCodeLead & 0xFF;\n newBuf[j++] = uCodeLead >> 8;\n\n uCode = 0xDC00 + uCode % 0x400;\n }\n newBuf[j++] = uCode & 0xFF;\n newBuf[j++] = uCode >> 8;\n\n // Reset trie node.\n nodeIdx = 0; seqStart = i+1;\n }\n\n this.nodeIdx = nodeIdx;\n this.prevBuf = (seqStart >= 0) ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset);\n return newBuf.slice(0, j).toString('ucs2');\n}\n\nDBCSDecoder.prototype.end = function() {\n var ret = '';\n\n // Try to parse all remaining chars.\n while (this.prevBuf.length > 0) {\n // Skip 1 character in the buffer.\n ret += this.defaultCharUnicode;\n var buf = this.prevBuf.slice(1);\n\n // Parse remaining as usual.\n this.prevBuf = Buffer.alloc(0);\n this.nodeIdx = 0;\n if (buf.length > 0)\n ret += this.write(buf);\n }\n\n this.nodeIdx = 0;\n return ret;\n}\n\n// Binary search for GB18030. Returns largest i such that table[i] <= val.\nfunction findIdx(table, val) {\n if (table[0] > val)\n return -1;\n\n var l = 0, r = table.length;\n while (l < r-1) { // always table[l] <= val < table[r]\n var mid = l + Math.floor((r-l+1)/2);\n if (table[mid] <= val)\n l = mid;\n else\n r = mid;\n }\n return l;\n}\n\n","\"use strict\";\n\n// Description of supported double byte encodings and aliases.\n// Tables are not require()-d until they are needed to speed up library load.\n// require()-s are direct to support Browserify.\n\nmodule.exports = {\n \n // == Japanese/ShiftJIS ====================================================\n // All japanese encodings are based on JIS X set of standards:\n // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF.\n // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. \n // Has several variations in 1978, 1983, 1990 and 1997.\n // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead.\n // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233.\n // 2 planes, first is superset of 0208, second - revised 0212.\n // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx)\n\n // Byte encodings are:\n // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte\n // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC.\n // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI.\n // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes.\n // 0x00-0x7F - lower part of 0201\n // 0x8E, 0xA1-0xDF - upper part of 0201\n // (0xA1-0xFE)x2 - 0208 plane (94x94).\n // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94).\n // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon.\n // Used as-is in ISO2022 family.\n // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, \n // 0201-1976 Roman, 0208-1978, 0208-1983.\n // * ISO2022-JP-1: Adds esc seq for 0212-1990.\n // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7.\n // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2.\n // * ISO2022-JP-2004: Adds 0213-2004 Plane 1.\n //\n // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes.\n //\n // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html\n\n 'shiftjis': {\n type: '_dbcs',\n table: function() { return require('./tables/shiftjis.json') },\n encodeAdd: {'\\u00a5': 0x5C, '\\u203E': 0x7E},\n encodeSkipVals: [{from: 0xED40, to: 0xF940}],\n },\n 'csshiftjis': 'shiftjis',\n 'mskanji': 'shiftjis',\n 'sjis': 'shiftjis',\n 'windows31j': 'shiftjis',\n 'ms31j': 'shiftjis',\n 'xsjis': 'shiftjis',\n 'windows932': 'shiftjis',\n 'ms932': 'shiftjis',\n '932': 'shiftjis',\n 'cp932': 'shiftjis',\n\n 'eucjp': {\n type: '_dbcs',\n table: function() { return require('./tables/eucjp.json') },\n encodeAdd: {'\\u00a5': 0x5C, '\\u203E': 0x7E},\n },\n\n // TODO: KDDI extension to Shift_JIS\n // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes.\n // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars.\n\n\n // == Chinese/GBK ==========================================================\n // http://en.wikipedia.org/wiki/GBK\n // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder\n\n // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936\n 'gb2312': 'cp936',\n 'gb231280': 'cp936',\n 'gb23121980': 'cp936',\n 'csgb2312': 'cp936',\n 'csiso58gb231280': 'cp936',\n 'euccn': 'cp936',\n\n // Microsoft's CP936 is a subset and approximation of GBK.\n 'windows936': 'cp936',\n 'ms936': 'cp936',\n '936': 'cp936',\n 'cp936': {\n type: '_dbcs',\n table: function() { return require('./tables/cp936.json') },\n },\n\n // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other.\n 'gbk': {\n type: '_dbcs',\n table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },\n },\n 'xgbk': 'gbk',\n 'isoir58': 'gbk',\n\n // GB18030 is an algorithmic extension of GBK.\n // Main source: https://www.w3.org/TR/encoding/#gbk-encoder\n // http://icu-project.org/docs/papers/gb18030.html\n // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml\n // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0\n 'gb18030': {\n type: '_dbcs',\n table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },\n gb18030: function() { return require('./tables/gb18030-ranges.json') },\n encodeSkipVals: [0x80],\n encodeAdd: {'€': 0xA2E3},\n },\n\n 'chinese': 'gb18030',\n\n\n // == Korean ===============================================================\n // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same.\n 'windows949': 'cp949',\n 'ms949': 'cp949',\n '949': 'cp949',\n 'cp949': {\n type: '_dbcs',\n table: function() { return require('./tables/cp949.json') },\n },\n\n 'cseuckr': 'cp949',\n 'csksc56011987': 'cp949',\n 'euckr': 'cp949',\n 'isoir149': 'cp949',\n 'korean': 'cp949',\n 'ksc56011987': 'cp949',\n 'ksc56011989': 'cp949',\n 'ksc5601': 'cp949',\n\n\n // == Big5/Taiwan/Hong Kong ================================================\n // There are lots of tables for Big5 and cp950. Please see the following links for history:\n // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html\n // Variations, in roughly number of defined chars:\n // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT\n // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/\n // * Big5-2003 (Taiwan standard) almost superset of cp950.\n // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers.\n // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. \n // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years.\n // Plus, it has 4 combining sequences.\n // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299\n // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way.\n // Implementations are not consistent within browsers; sometimes labeled as just big5.\n // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied.\n // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31\n // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s.\n // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt\n // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt\n // \n // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder\n // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong.\n\n 'windows950': 'cp950',\n 'ms950': 'cp950',\n '950': 'cp950',\n 'cp950': {\n type: '_dbcs',\n table: function() { return require('./tables/cp950.json') },\n },\n\n // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus.\n 'big5': 'big5hkscs',\n 'big5hkscs': {\n type: '_dbcs',\n table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) },\n encodeSkipVals: [0xa2cc],\n },\n\n 'cnbig5': 'big5hkscs',\n 'csbig5': 'big5hkscs',\n 'xxbig5': 'big5hkscs',\n};\n","\"use strict\";\n\n// Update this array if you add/rename/remove files in this directory.\n// We support Browserify by skipping automatic module discovery and requiring modules directly.\nvar modules = [\n require(\"./internal\"),\n require(\"./utf16\"),\n require(\"./utf7\"),\n require(\"./sbcs-codec\"),\n require(\"./sbcs-data\"),\n require(\"./sbcs-data-generated\"),\n require(\"./dbcs-codec\"),\n require(\"./dbcs-data\"),\n];\n\n// Put all encoding/alias/codec definitions to single object and export it. \nfor (var i = 0; i < modules.length; i++) {\n var module = modules[i];\n for (var enc in module)\n if (Object.prototype.hasOwnProperty.call(module, enc))\n exports[enc] = module[enc];\n}\n","\"use strict\";\nvar Buffer = require(\"safer-buffer\").Buffer;\n\n// Export Node.js internal encodings.\n\nmodule.exports = {\n // Encodings\n utf8: { type: \"_internal\", bomAware: true},\n cesu8: { type: \"_internal\", bomAware: true},\n unicode11utf8: \"utf8\",\n\n ucs2: { type: \"_internal\", bomAware: true},\n utf16le: \"ucs2\",\n\n binary: { type: \"_internal\" },\n base64: { type: \"_internal\" },\n hex: { type: \"_internal\" },\n\n // Codec.\n _internal: InternalCodec,\n};\n\n//------------------------------------------------------------------------------\n\nfunction InternalCodec(codecOptions, iconv) {\n this.enc = codecOptions.encodingName;\n this.bomAware = codecOptions.bomAware;\n\n if (this.enc === \"base64\")\n this.encoder = InternalEncoderBase64;\n else if (this.enc === \"cesu8\") {\n this.enc = \"utf8\"; // Use utf8 for decoding.\n this.encoder = InternalEncoderCesu8;\n\n // Add decoder for versions of Node not supporting CESU-8\n if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') {\n this.decoder = InternalDecoderCesu8;\n this.defaultCharUnicode = iconv.defaultCharUnicode;\n }\n }\n}\n\nInternalCodec.prototype.encoder = InternalEncoder;\nInternalCodec.prototype.decoder = InternalDecoder;\n\n//------------------------------------------------------------------------------\n\n// We use node.js internal decoder. Its signature is the same as ours.\nvar StringDecoder = require('string_decoder').StringDecoder;\n\nif (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method.\n StringDecoder.prototype.end = function() {};\n\n\nfunction InternalDecoder(options, codec) {\n StringDecoder.call(this, codec.enc);\n}\n\nInternalDecoder.prototype = StringDecoder.prototype;\n\n\n//------------------------------------------------------------------------------\n// Encoder is mostly trivial\n\nfunction InternalEncoder(options, codec) {\n this.enc = codec.enc;\n}\n\nInternalEncoder.prototype.write = function(str) {\n return Buffer.from(str, this.enc);\n}\n\nInternalEncoder.prototype.end = function() {\n}\n\n\n//------------------------------------------------------------------------------\n// Except base64 encoder, which must keep its state.\n\nfunction InternalEncoderBase64(options, codec) {\n this.prevStr = '';\n}\n\nInternalEncoderBase64.prototype.write = function(str) {\n str = this.prevStr + str;\n var completeQuads = str.length - (str.length % 4);\n this.prevStr = str.slice(completeQuads);\n str = str.slice(0, completeQuads);\n\n return Buffer.from(str, \"base64\");\n}\n\nInternalEncoderBase64.prototype.end = function() {\n return Buffer.from(this.prevStr, \"base64\");\n}\n\n\n//------------------------------------------------------------------------------\n// CESU-8 encoder is also special.\n\nfunction InternalEncoderCesu8(options, codec) {\n}\n\nInternalEncoderCesu8.prototype.write = function(str) {\n var buf = Buffer.alloc(str.length * 3), bufIdx = 0;\n for (var i = 0; i < str.length; i++) {\n var charCode = str.charCodeAt(i);\n // Naive implementation, but it works because CESU-8 is especially easy\n // to convert from UTF-16 (which all JS strings are encoded in).\n if (charCode < 0x80)\n buf[bufIdx++] = charCode;\n else if (charCode < 0x800) {\n buf[bufIdx++] = 0xC0 + (charCode >>> 6);\n buf[bufIdx++] = 0x80 + (charCode & 0x3f);\n }\n else { // charCode will always be < 0x10000 in javascript.\n buf[bufIdx++] = 0xE0 + (charCode >>> 12);\n buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f);\n buf[bufIdx++] = 0x80 + (charCode & 0x3f);\n }\n }\n return buf.slice(0, bufIdx);\n}\n\nInternalEncoderCesu8.prototype.end = function() {\n}\n\n//------------------------------------------------------------------------------\n// CESU-8 decoder is not implemented in Node v4.0+\n\nfunction InternalDecoderCesu8(options, codec) {\n this.acc = 0;\n this.contBytes = 0;\n this.accBytes = 0;\n this.defaultCharUnicode = codec.defaultCharUnicode;\n}\n\nInternalDecoderCesu8.prototype.write = function(buf) {\n var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, \n res = '';\n for (var i = 0; i < buf.length; i++) {\n var curByte = buf[i];\n if ((curByte & 0xC0) !== 0x80) { // Leading byte\n if (contBytes > 0) { // Previous code is invalid\n res += this.defaultCharUnicode;\n contBytes = 0;\n }\n\n if (curByte < 0x80) { // Single-byte code\n res += String.fromCharCode(curByte);\n } else if (curByte < 0xE0) { // Two-byte code\n acc = curByte & 0x1F;\n contBytes = 1; accBytes = 1;\n } else if (curByte < 0xF0) { // Three-byte code\n acc = curByte & 0x0F;\n contBytes = 2; accBytes = 1;\n } else { // Four or more are not supported for CESU-8.\n res += this.defaultCharUnicode;\n }\n } else { // Continuation byte\n if (contBytes > 0) { // We're waiting for it.\n acc = (acc << 6) | (curByte & 0x3f);\n contBytes--; accBytes++;\n if (contBytes === 0) {\n // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80)\n if (accBytes === 2 && acc < 0x80 && acc > 0)\n res += this.defaultCharUnicode;\n else if (accBytes === 3 && acc < 0x800)\n res += this.defaultCharUnicode;\n else\n // Actually add character.\n res += String.fromCharCode(acc);\n }\n } else { // Unexpected continuation byte\n res += this.defaultCharUnicode;\n }\n }\n }\n this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes;\n return res;\n}\n\nInternalDecoderCesu8.prototype.end = function() {\n var res = 0;\n if (this.contBytes > 0)\n res += this.defaultCharUnicode;\n return res;\n}\n","\"use strict\";\nvar Buffer = require(\"safer-buffer\").Buffer;\n\n// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that\n// correspond to encoded bytes (if 128 - then lower half is ASCII). \n\nexports._sbcs = SBCSCodec;\nfunction SBCSCodec(codecOptions, iconv) {\n if (!codecOptions)\n throw new Error(\"SBCS codec is called without the data.\")\n \n // Prepare char buffer for decoding.\n if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256))\n throw new Error(\"Encoding '\"+codecOptions.type+\"' has incorrect 'chars' (must be of len 128 or 256)\");\n \n if (codecOptions.chars.length === 128) {\n var asciiString = \"\";\n for (var i = 0; i < 128; i++)\n asciiString += String.fromCharCode(i);\n codecOptions.chars = asciiString + codecOptions.chars;\n }\n\n this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2');\n \n // Encoding buffer.\n var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0));\n\n for (var i = 0; i < codecOptions.chars.length; i++)\n encodeBuf[codecOptions.chars.charCodeAt(i)] = i;\n\n this.encodeBuf = encodeBuf;\n}\n\nSBCSCodec.prototype.encoder = SBCSEncoder;\nSBCSCodec.prototype.decoder = SBCSDecoder;\n\n\nfunction SBCSEncoder(options, codec) {\n this.encodeBuf = codec.encodeBuf;\n}\n\nSBCSEncoder.prototype.write = function(str) {\n var buf = Buffer.alloc(str.length);\n for (var i = 0; i < str.length; i++)\n buf[i] = this.encodeBuf[str.charCodeAt(i)];\n \n return buf;\n}\n\nSBCSEncoder.prototype.end = function() {\n}\n\n\nfunction SBCSDecoder(options, codec) {\n this.decodeBuf = codec.decodeBuf;\n}\n\nSBCSDecoder.prototype.write = function(buf) {\n // Strings are immutable in JS -> we use ucs2 buffer to speed up computations.\n var decodeBuf = this.decodeBuf;\n var newBuf = Buffer.alloc(buf.length*2);\n var idx1 = 0, idx2 = 0;\n for (var i = 0; i < buf.length; i++) {\n idx1 = buf[i]*2; idx2 = i*2;\n newBuf[idx2] = decodeBuf[idx1];\n newBuf[idx2+1] = decodeBuf[idx1+1];\n }\n return newBuf.toString('ucs2');\n}\n\nSBCSDecoder.prototype.end = function() {\n}\n","\"use strict\";\n\n// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script.\nmodule.exports = {\n \"437\": \"cp437\",\n \"737\": \"cp737\",\n \"775\": \"cp775\",\n \"850\": \"cp850\",\n \"852\": \"cp852\",\n \"855\": \"cp855\",\n \"856\": \"cp856\",\n \"857\": \"cp857\",\n \"858\": \"cp858\",\n \"860\": \"cp860\",\n \"861\": \"cp861\",\n \"862\": \"cp862\",\n \"863\": \"cp863\",\n \"864\": \"cp864\",\n \"865\": \"cp865\",\n \"866\": \"cp866\",\n \"869\": \"cp869\",\n \"874\": \"windows874\",\n \"922\": \"cp922\",\n \"1046\": \"cp1046\",\n \"1124\": \"cp1124\",\n \"1125\": \"cp1125\",\n \"1129\": \"cp1129\",\n \"1133\": \"cp1133\",\n \"1161\": \"cp1161\",\n \"1162\": \"cp1162\",\n \"1163\": \"cp1163\",\n \"1250\": \"windows1250\",\n \"1251\": \"windows1251\",\n \"1252\": \"windows1252\",\n \"1253\": \"windows1253\",\n \"1254\": \"windows1254\",\n \"1255\": \"windows1255\",\n \"1256\": \"windows1256\",\n \"1257\": \"windows1257\",\n \"1258\": \"windows1258\",\n \"28591\": \"iso88591\",\n \"28592\": \"iso88592\",\n \"28593\": \"iso88593\",\n \"28594\": \"iso88594\",\n \"28595\": \"iso88595\",\n \"28596\": \"iso88596\",\n \"28597\": \"iso88597\",\n \"28598\": \"iso88598\",\n \"28599\": \"iso88599\",\n \"28600\": \"iso885910\",\n \"28601\": \"iso885911\",\n \"28603\": \"iso885913\",\n \"28604\": \"iso885914\",\n \"28605\": \"iso885915\",\n \"28606\": \"iso885916\",\n \"windows874\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����\"\n },\n \"win874\": \"windows874\",\n \"cp874\": \"windows874\",\n \"windows1250\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙\"\n },\n \"win1250\": \"windows1250\",\n \"cp1250\": \"windows1250\",\n \"windows1251\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя\"\n },\n \"win1251\": \"windows1251\",\n \"cp1251\": \"windows1251\",\n \"windows1252\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\"\n },\n \"win1252\": \"windows1252\",\n \"cp1252\": \"windows1252\",\n \"windows1253\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�\"\n },\n \"win1253\": \"windows1253\",\n \"cp1253\": \"windows1253\",\n \"windows1254\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ\"\n },\n \"win1254\": \"windows1254\",\n \"cp1254\": \"windows1254\",\n \"windows1255\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�\"\n },\n \"win1255\": \"windows1255\",\n \"cp1255\": \"windows1255\",\n \"windows1256\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے\"\n },\n \"win1256\": \"windows1256\",\n \"cp1256\": \"windows1256\",\n \"windows1257\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙\"\n },\n \"win1257\": \"windows1257\",\n \"cp1257\": \"windows1257\",\n \"windows1258\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ\"\n },\n \"win1258\": \"windows1258\",\n \"cp1258\": \"windows1258\",\n \"iso88591\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\"\n },\n \"cp28591\": \"iso88591\",\n \"iso88592\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙\"\n },\n \"cp28592\": \"iso88592\",\n \"iso88593\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�ݰħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙\"\n },\n \"cp28593\": \"iso88593\",\n \"iso88594\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤Ĩϧ¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩšēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖרŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙\"\n },\n \"cp28594\": \"iso88594\",\n \"iso88595\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ\"\n },\n \"cp28595\": \"iso88595\",\n \"iso88596\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������\"\n },\n \"cp28596\": \"iso88596\",\n \"iso88597\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�\"\n },\n \"cp28597\": \"iso88597\",\n \"iso88598\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�\"\n },\n \"cp28598\": \"iso88598\",\n \"iso88599\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ\"\n },\n \"cp28599\": \"iso88599\",\n \"iso885910\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨͧĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ\"\n },\n \"cp28600\": \"iso885910\",\n \"iso885911\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����\"\n },\n \"cp28601\": \"iso885911\",\n \"iso885913\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’\"\n },\n \"cp28603\": \"iso885913\",\n \"iso885914\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ\"\n },\n \"cp28604\": \"iso885914\",\n \"iso885915\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\"\n },\n \"cp28605\": \"iso885915\",\n \"iso885916\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Чš©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ\"\n },\n \"cp28606\": \"iso885916\",\n \"cp437\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n \"ibm437\": \"cp437\",\n \"csibm437\": \"cp437\",\n \"cp737\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ \"\n },\n \"ibm737\": \"cp737\",\n \"csibm737\": \"cp737\",\n \"cp775\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£Ø×¤ĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ \"\n },\n \"ibm775\": \"cp775\",\n \"csibm775\": \"cp775\",\n \"cp850\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ \"\n },\n \"ibm850\": \"cp850\",\n \"csibm850\": \"cp850\",\n \"cp852\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ \"\n },\n \"ibm852\": \"cp852\",\n \"csibm852\": \"cp852\",\n \"cp855\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ \"\n },\n \"ibm855\": \"cp855\",\n \"csibm855\": \"cp855\",\n \"cp856\": {\n \"type\": \"_sbcs\",\n \"chars\": \"אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ \"\n },\n \"ibm856\": \"cp856\",\n \"csibm856\": \"cp856\",\n \"cp857\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ \"\n },\n \"ibm857\": \"cp857\",\n \"csibm857\": \"cp857\",\n \"cp858\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ \"\n },\n \"ibm858\": \"cp858\",\n \"csibm858\": \"cp858\",\n \"cp860\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n \"ibm860\": \"cp860\",\n \"csibm860\": \"cp860\",\n \"cp861\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n \"ibm861\": \"cp861\",\n \"csibm861\": \"cp861\",\n \"cp862\": {\n \"type\": \"_sbcs\",\n \"chars\": \"אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n \"ibm862\": \"cp862\",\n \"csibm862\": \"cp862\",\n \"cp863\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n \"ibm863\": \"cp863\",\n \"csibm863\": \"cp863\",\n \"cp864\": {\n \"type\": \"_sbcs\",\n \"chars\": \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�\"\n },\n \"ibm864\": \"cp864\",\n \"csibm864\": \"cp864\",\n \"cp865\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n \"ibm865\": \"cp865\",\n \"csibm865\": \"cp865\",\n \"cp866\": {\n \"type\": \"_sbcs\",\n \"chars\": \"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ \"\n },\n \"ibm866\": \"cp866\",\n \"csibm866\": \"cp866\",\n \"cp869\": {\n \"type\": \"_sbcs\",\n \"chars\": \"������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ \"\n },\n \"ibm869\": \"cp869\",\n \"csibm869\": \"cp869\",\n \"cp922\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖרÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ\"\n },\n \"ibm922\": \"cp922\",\n \"csibm922\": \"cp922\",\n \"cp1046\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�\"\n },\n \"ibm1046\": \"cp1046\",\n \"csibm1046\": \"cp1046\",\n \"cp1124\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ\"\n },\n \"ibm1124\": \"cp1124\",\n \"csibm1124\": \"cp1124\",\n \"cp1125\": {\n \"type\": \"_sbcs\",\n \"chars\": \"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ \"\n },\n \"ibm1125\": \"cp1125\",\n \"csibm1125\": \"cp1125\",\n \"cp1129\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ\"\n },\n \"ibm1129\": \"cp1129\",\n \"csibm1129\": \"cp1129\",\n \"cp1133\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�\"\n },\n \"ibm1133\": \"cp1133\",\n \"csibm1133\": \"cp1133\",\n \"cp1161\": {\n \"type\": \"_sbcs\",\n \"chars\": \"��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ \"\n },\n \"ibm1161\": \"cp1161\",\n \"csibm1161\": \"cp1161\",\n \"cp1162\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����\"\n },\n \"ibm1162\": \"cp1162\",\n \"csibm1162\": \"cp1162\",\n \"cp1163\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ\"\n },\n \"ibm1163\": \"cp1163\",\n \"csibm1163\": \"cp1163\",\n \"maccroatian\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ\"\n },\n \"maccyrillic\": {\n \"type\": \"_sbcs\",\n \"chars\": \"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤\"\n },\n \"macgreek\": {\n \"type\": \"_sbcs\",\n \"chars\": \"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�\"\n },\n \"maciceland\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ\"\n },\n \"macroman\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ\"\n },\n \"macromania\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ\"\n },\n \"macthai\": {\n \"type\": \"_sbcs\",\n \"chars\": \"«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����\"\n },\n \"macturkish\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ\"\n },\n \"macukraine\": {\n \"type\": \"_sbcs\",\n \"chars\": \"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤\"\n },\n \"koi8r\": {\n \"type\": \"_sbcs\",\n \"chars\": \"─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ\"\n },\n \"koi8u\": {\n \"type\": \"_sbcs\",\n \"chars\": \"─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ\"\n },\n \"koi8ru\": {\n \"type\": \"_sbcs\",\n \"chars\": \"─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ\"\n },\n \"koi8t\": {\n \"type\": \"_sbcs\",\n \"chars\": \"қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ\"\n },\n \"armscii8\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�\"\n },\n \"rk1048\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя\"\n },\n \"tcvn\": {\n \"type\": \"_sbcs\",\n \"chars\": \"\\u0000ÚỤ\\u0003ỪỬỮ\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010ỨỰỲỶỸÝỴ\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ\"\n },\n \"georgianacademy\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ\"\n },\n \"georgianps\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\"\n },\n \"pt154\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя\"\n },\n \"viscii\": {\n \"type\": \"_sbcs\",\n \"chars\": \"\\u0000\\u0001Ẳ\\u0003\\u0004ẴẪ\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013Ỷ\\u0015\\u0016\\u0017\\u0018Ỹ\\u001a\\u001b\\u001c\\u001dỴ\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ\"\n },\n \"iso646cn\": {\n \"type\": \"_sbcs\",\n \"chars\": \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������\"\n },\n \"iso646jp\": {\n \"type\": \"_sbcs\",\n \"chars\": \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������\"\n },\n \"hproman8\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�\"\n },\n \"macintosh\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ\"\n },\n \"ascii\": {\n \"type\": \"_sbcs\",\n \"chars\": \"��������������������������������������������������������������������������������������������������������������������������������\"\n },\n \"tis620\": {\n \"type\": \"_sbcs\",\n \"chars\": \"���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����\"\n }\n}","\"use strict\";\n\n// Manually added data to be used by sbcs codec in addition to generated one.\n\nmodule.exports = {\n // Not supported by iconv, not sure why.\n \"10029\": \"maccenteuro\",\n \"maccenteuro\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ\"\n },\n\n \"808\": \"cp808\",\n \"ibm808\": \"cp808\",\n \"cp808\": {\n \"type\": \"_sbcs\",\n \"chars\": \"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ \"\n },\n\n \"mik\": {\n \"type\": \"_sbcs\",\n \"chars\": \"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n\n // Aliases of generated encodings.\n \"ascii8bit\": \"ascii\",\n \"usascii\": \"ascii\",\n \"ansix34\": \"ascii\",\n \"ansix341968\": \"ascii\",\n \"ansix341986\": \"ascii\",\n \"csascii\": \"ascii\",\n \"cp367\": \"ascii\",\n \"ibm367\": \"ascii\",\n \"isoir6\": \"ascii\",\n \"iso646us\": \"ascii\",\n \"iso646irv\": \"ascii\",\n \"us\": \"ascii\",\n\n \"latin1\": \"iso88591\",\n \"latin2\": \"iso88592\",\n \"latin3\": \"iso88593\",\n \"latin4\": \"iso88594\",\n \"latin5\": \"iso88599\",\n \"latin6\": \"iso885910\",\n \"latin7\": \"iso885913\",\n \"latin8\": \"iso885914\",\n \"latin9\": \"iso885915\",\n \"latin10\": \"iso885916\",\n\n \"csisolatin1\": \"iso88591\",\n \"csisolatin2\": \"iso88592\",\n \"csisolatin3\": \"iso88593\",\n \"csisolatin4\": \"iso88594\",\n \"csisolatincyrillic\": \"iso88595\",\n \"csisolatinarabic\": \"iso88596\",\n \"csisolatingreek\" : \"iso88597\",\n \"csisolatinhebrew\": \"iso88598\",\n \"csisolatin5\": \"iso88599\",\n \"csisolatin6\": \"iso885910\",\n\n \"l1\": \"iso88591\",\n \"l2\": \"iso88592\",\n \"l3\": \"iso88593\",\n \"l4\": \"iso88594\",\n \"l5\": \"iso88599\",\n \"l6\": \"iso885910\",\n \"l7\": \"iso885913\",\n \"l8\": \"iso885914\",\n \"l9\": \"iso885915\",\n \"l10\": \"iso885916\",\n\n \"isoir14\": \"iso646jp\",\n \"isoir57\": \"iso646cn\",\n \"isoir100\": \"iso88591\",\n \"isoir101\": \"iso88592\",\n \"isoir109\": \"iso88593\",\n \"isoir110\": \"iso88594\",\n \"isoir144\": \"iso88595\",\n \"isoir127\": \"iso88596\",\n \"isoir126\": \"iso88597\",\n \"isoir138\": \"iso88598\",\n \"isoir148\": \"iso88599\",\n \"isoir157\": \"iso885910\",\n \"isoir166\": \"tis620\",\n \"isoir179\": \"iso885913\",\n \"isoir199\": \"iso885914\",\n \"isoir203\": \"iso885915\",\n \"isoir226\": \"iso885916\",\n\n \"cp819\": \"iso88591\",\n \"ibm819\": \"iso88591\",\n\n \"cyrillic\": \"iso88595\",\n\n \"arabic\": \"iso88596\",\n \"arabic8\": \"iso88596\",\n \"ecma114\": \"iso88596\",\n \"asmo708\": \"iso88596\",\n\n \"greek\" : \"iso88597\",\n \"greek8\" : \"iso88597\",\n \"ecma118\" : \"iso88597\",\n \"elot928\" : \"iso88597\",\n\n \"hebrew\": \"iso88598\",\n \"hebrew8\": \"iso88598\",\n\n \"turkish\": \"iso88599\",\n \"turkish8\": \"iso88599\",\n\n \"thai\": \"iso885911\",\n \"thai8\": \"iso885911\",\n\n \"celtic\": \"iso885914\",\n \"celtic8\": \"iso885914\",\n \"isoceltic\": \"iso885914\",\n\n \"tis6200\": \"tis620\",\n \"tis62025291\": \"tis620\",\n \"tis62025330\": \"tis620\",\n\n \"10000\": \"macroman\",\n \"10006\": \"macgreek\",\n \"10007\": \"maccyrillic\",\n \"10079\": \"maciceland\",\n \"10081\": \"macturkish\",\n\n \"cspc8codepage437\": \"cp437\",\n \"cspc775baltic\": \"cp775\",\n \"cspc850multilingual\": \"cp850\",\n \"cspcp852\": \"cp852\",\n \"cspc862latinhebrew\": \"cp862\",\n \"cpgr\": \"cp869\",\n\n \"msee\": \"cp1250\",\n \"mscyrl\": \"cp1251\",\n \"msansi\": \"cp1252\",\n \"msgreek\": \"cp1253\",\n \"msturk\": \"cp1254\",\n \"mshebr\": \"cp1255\",\n \"msarab\": \"cp1256\",\n \"winbaltrim\": \"cp1257\",\n\n \"cp20866\": \"koi8r\",\n \"20866\": \"koi8r\",\n \"ibm878\": \"koi8r\",\n \"cskoi8r\": \"koi8r\",\n\n \"cp21866\": \"koi8u\",\n \"21866\": \"koi8u\",\n \"ibm1168\": \"koi8u\",\n\n \"strk10482002\": \"rk1048\",\n\n \"tcvn5712\": \"tcvn\",\n \"tcvn57121\": \"tcvn\",\n\n \"gb198880\": \"iso646cn\",\n \"cn\": \"iso646cn\",\n\n \"csiso14jisc6220ro\": \"iso646jp\",\n \"jisc62201969ro\": \"iso646jp\",\n \"jp\": \"iso646jp\",\n\n \"cshproman8\": \"hproman8\",\n \"r8\": \"hproman8\",\n \"roman8\": \"hproman8\",\n \"xroman8\": \"hproman8\",\n \"ibm1051\": \"hproman8\",\n\n \"mac\": \"macintosh\",\n \"csmacintosh\": \"macintosh\",\n};\n\n","\"use strict\";\nvar Buffer = require(\"safer-buffer\").Buffer;\n\n// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js\n\n// == UTF16-BE codec. ==========================================================\n\nexports.utf16be = Utf16BECodec;\nfunction Utf16BECodec() {\n}\n\nUtf16BECodec.prototype.encoder = Utf16BEEncoder;\nUtf16BECodec.prototype.decoder = Utf16BEDecoder;\nUtf16BECodec.prototype.bomAware = true;\n\n\n// -- Encoding\n\nfunction Utf16BEEncoder() {\n}\n\nUtf16BEEncoder.prototype.write = function(str) {\n var buf = Buffer.from(str, 'ucs2');\n for (var i = 0; i < buf.length; i += 2) {\n var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp;\n }\n return buf;\n}\n\nUtf16BEEncoder.prototype.end = function() {\n}\n\n\n// -- Decoding\n\nfunction Utf16BEDecoder() {\n this.overflowByte = -1;\n}\n\nUtf16BEDecoder.prototype.write = function(buf) {\n if (buf.length == 0)\n return '';\n\n var buf2 = Buffer.alloc(buf.length + 1),\n i = 0, j = 0;\n\n if (this.overflowByte !== -1) {\n buf2[0] = buf[0];\n buf2[1] = this.overflowByte;\n i = 1; j = 2;\n }\n\n for (; i < buf.length-1; i += 2, j+= 2) {\n buf2[j] = buf[i+1];\n buf2[j+1] = buf[i];\n }\n\n this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1;\n\n return buf2.slice(0, j).toString('ucs2');\n}\n\nUtf16BEDecoder.prototype.end = function() {\n}\n\n\n// == UTF-16 codec =============================================================\n// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic.\n// Defaults to UTF-16LE, as it's prevalent and default in Node.\n// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le\n// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'});\n\n// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false).\n\nexports.utf16 = Utf16Codec;\nfunction Utf16Codec(codecOptions, iconv) {\n this.iconv = iconv;\n}\n\nUtf16Codec.prototype.encoder = Utf16Encoder;\nUtf16Codec.prototype.decoder = Utf16Decoder;\n\n\n// -- Encoding (pass-through)\n\nfunction Utf16Encoder(options, codec) {\n options = options || {};\n if (options.addBOM === undefined)\n options.addBOM = true;\n this.encoder = codec.iconv.getEncoder('utf-16le', options);\n}\n\nUtf16Encoder.prototype.write = function(str) {\n return this.encoder.write(str);\n}\n\nUtf16Encoder.prototype.end = function() {\n return this.encoder.end();\n}\n\n\n// -- Decoding\n\nfunction Utf16Decoder(options, codec) {\n this.decoder = null;\n this.initialBytes = [];\n this.initialBytesLen = 0;\n\n this.options = options || {};\n this.iconv = codec.iconv;\n}\n\nUtf16Decoder.prototype.write = function(buf) {\n if (!this.decoder) {\n // Codec is not chosen yet. Accumulate initial bytes.\n this.initialBytes.push(buf);\n this.initialBytesLen += buf.length;\n \n if (this.initialBytesLen < 16) // We need more bytes to use space heuristic (see below)\n return '';\n\n // We have enough bytes -> detect endianness.\n var buf = Buffer.concat(this.initialBytes),\n encoding = detectEncoding(buf, this.options.defaultEncoding);\n this.decoder = this.iconv.getDecoder(encoding, this.options);\n this.initialBytes.length = this.initialBytesLen = 0;\n }\n\n return this.decoder.write(buf);\n}\n\nUtf16Decoder.prototype.end = function() {\n if (!this.decoder) {\n var buf = Buffer.concat(this.initialBytes),\n encoding = detectEncoding(buf, this.options.defaultEncoding);\n this.decoder = this.iconv.getDecoder(encoding, this.options);\n\n var res = this.decoder.write(buf),\n trail = this.decoder.end();\n\n return trail ? (res + trail) : res;\n }\n return this.decoder.end();\n}\n\nfunction detectEncoding(buf, defaultEncoding) {\n var enc = defaultEncoding || 'utf-16le';\n\n if (buf.length >= 2) {\n // Check BOM.\n if (buf[0] == 0xFE && buf[1] == 0xFF) // UTF-16BE BOM\n enc = 'utf-16be';\n else if (buf[0] == 0xFF && buf[1] == 0xFE) // UTF-16LE BOM\n enc = 'utf-16le';\n else {\n // No BOM found. Try to deduce encoding from initial content.\n // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon.\n // So, we count ASCII as if it was LE or BE, and decide from that.\n var asciiCharsLE = 0, asciiCharsBE = 0, // Counts of chars in both positions\n _len = Math.min(buf.length - (buf.length % 2), 64); // Len is always even.\n\n for (var i = 0; i < _len; i += 2) {\n if (buf[i] === 0 && buf[i+1] !== 0) asciiCharsBE++;\n if (buf[i] !== 0 && buf[i+1] === 0) asciiCharsLE++;\n }\n\n if (asciiCharsBE > asciiCharsLE)\n enc = 'utf-16be';\n else if (asciiCharsBE < asciiCharsLE)\n enc = 'utf-16le';\n }\n }\n\n return enc;\n}\n\n\n","\"use strict\";\nvar Buffer = require(\"safer-buffer\").Buffer;\n\n// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152\n// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3\n\nexports.utf7 = Utf7Codec;\nexports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7\nfunction Utf7Codec(codecOptions, iconv) {\n this.iconv = iconv;\n};\n\nUtf7Codec.prototype.encoder = Utf7Encoder;\nUtf7Codec.prototype.decoder = Utf7Decoder;\nUtf7Codec.prototype.bomAware = true;\n\n\n// -- Encoding\n\nvar nonDirectChars = /[^A-Za-z0-9'\\(\\),-\\.\\/:\\? \\n\\r\\t]+/g;\n\nfunction Utf7Encoder(options, codec) {\n this.iconv = codec.iconv;\n}\n\nUtf7Encoder.prototype.write = function(str) {\n // Naive implementation.\n // Non-direct chars are encoded as \"+-\"; single \"+\" char is encoded as \"+-\".\n return Buffer.from(str.replace(nonDirectChars, function(chunk) {\n return \"+\" + (chunk === '+' ? '' : \n this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) \n + \"-\";\n }.bind(this)));\n}\n\nUtf7Encoder.prototype.end = function() {\n}\n\n\n// -- Decoding\n\nfunction Utf7Decoder(options, codec) {\n this.iconv = codec.iconv;\n this.inBase64 = false;\n this.base64Accum = '';\n}\n\nvar base64Regex = /[A-Za-z0-9\\/+]/;\nvar base64Chars = [];\nfor (var i = 0; i < 256; i++)\n base64Chars[i] = base64Regex.test(String.fromCharCode(i));\n\nvar plusChar = '+'.charCodeAt(0), \n minusChar = '-'.charCodeAt(0),\n andChar = '&'.charCodeAt(0);\n\nUtf7Decoder.prototype.write = function(buf) {\n var res = \"\", lastI = 0,\n inBase64 = this.inBase64,\n base64Accum = this.base64Accum;\n\n // The decoder is more involved as we must handle chunks in stream.\n\n for (var i = 0; i < buf.length; i++) {\n if (!inBase64) { // We're in direct mode.\n // Write direct chars until '+'\n if (buf[i] == plusChar) {\n res += this.iconv.decode(buf.slice(lastI, i), \"ascii\"); // Write direct chars.\n lastI = i+1;\n inBase64 = true;\n }\n } else { // We decode base64.\n if (!base64Chars[buf[i]]) { // Base64 ended.\n if (i == lastI && buf[i] == minusChar) {// \"+-\" -> \"+\"\n res += \"+\";\n } else {\n var b64str = base64Accum + buf.slice(lastI, i).toString();\n res += this.iconv.decode(Buffer.from(b64str, 'base64'), \"utf16-be\");\n }\n\n if (buf[i] != minusChar) // Minus is absorbed after base64.\n i--;\n\n lastI = i+1;\n inBase64 = false;\n base64Accum = '';\n }\n }\n }\n\n if (!inBase64) {\n res += this.iconv.decode(buf.slice(lastI), \"ascii\"); // Write direct chars.\n } else {\n var b64str = base64Accum + buf.slice(lastI).toString();\n\n var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.\n base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.\n b64str = b64str.slice(0, canBeDecoded);\n\n res += this.iconv.decode(Buffer.from(b64str, 'base64'), \"utf16-be\");\n }\n\n this.inBase64 = inBase64;\n this.base64Accum = base64Accum;\n\n return res;\n}\n\nUtf7Decoder.prototype.end = function() {\n var res = \"\";\n if (this.inBase64 && this.base64Accum.length > 0)\n res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), \"utf16-be\");\n\n this.inBase64 = false;\n this.base64Accum = '';\n return res;\n}\n\n\n// UTF-7-IMAP codec.\n// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3)\n// Differences:\n// * Base64 part is started by \"&\" instead of \"+\"\n// * Direct characters are 0x20-0x7E, except \"&\" (0x26)\n// * In Base64, \",\" is used instead of \"/\"\n// * Base64 must not be used to represent direct characters.\n// * No implicit shift back from Base64 (should always end with '-')\n// * String must end in non-shifted position.\n// * \"-&\" while in base64 is not allowed.\n\n\nexports.utf7imap = Utf7IMAPCodec;\nfunction Utf7IMAPCodec(codecOptions, iconv) {\n this.iconv = iconv;\n};\n\nUtf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder;\nUtf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder;\nUtf7IMAPCodec.prototype.bomAware = true;\n\n\n// -- Encoding\n\nfunction Utf7IMAPEncoder(options, codec) {\n this.iconv = codec.iconv;\n this.inBase64 = false;\n this.base64Accum = Buffer.alloc(6);\n this.base64AccumIdx = 0;\n}\n\nUtf7IMAPEncoder.prototype.write = function(str) {\n var inBase64 = this.inBase64,\n base64Accum = this.base64Accum,\n base64AccumIdx = this.base64AccumIdx,\n buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0;\n\n for (var i = 0; i < str.length; i++) {\n var uChar = str.charCodeAt(i);\n if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'.\n if (inBase64) {\n if (base64AccumIdx > 0) {\n bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\\//g, ',').replace(/=+$/, ''), bufIdx);\n base64AccumIdx = 0;\n }\n\n buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.\n inBase64 = false;\n }\n\n if (!inBase64) {\n buf[bufIdx++] = uChar; // Write direct character\n\n if (uChar === andChar) // Ampersand -> '&-'\n buf[bufIdx++] = minusChar;\n }\n\n } else { // Non-direct character\n if (!inBase64) {\n buf[bufIdx++] = andChar; // Write '&', then go to base64 mode.\n inBase64 = true;\n }\n if (inBase64) {\n base64Accum[base64AccumIdx++] = uChar >> 8;\n base64Accum[base64AccumIdx++] = uChar & 0xFF;\n\n if (base64AccumIdx == base64Accum.length) {\n bufIdx += buf.write(base64Accum.toString('base64').replace(/\\//g, ','), bufIdx);\n base64AccumIdx = 0;\n }\n }\n }\n }\n\n this.inBase64 = inBase64;\n this.base64AccumIdx = base64AccumIdx;\n\n return buf.slice(0, bufIdx);\n}\n\nUtf7IMAPEncoder.prototype.end = function() {\n var buf = Buffer.alloc(10), bufIdx = 0;\n if (this.inBase64) {\n if (this.base64AccumIdx > 0) {\n bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\\//g, ',').replace(/=+$/, ''), bufIdx);\n this.base64AccumIdx = 0;\n }\n\n buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.\n this.inBase64 = false;\n }\n\n return buf.slice(0, bufIdx);\n}\n\n\n// -- Decoding\n\nfunction Utf7IMAPDecoder(options, codec) {\n this.iconv = codec.iconv;\n this.inBase64 = false;\n this.base64Accum = '';\n}\n\nvar base64IMAPChars = base64Chars.slice();\nbase64IMAPChars[','.charCodeAt(0)] = true;\n\nUtf7IMAPDecoder.prototype.write = function(buf) {\n var res = \"\", lastI = 0,\n inBase64 = this.inBase64,\n base64Accum = this.base64Accum;\n\n // The decoder is more involved as we must handle chunks in stream.\n // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end).\n\n for (var i = 0; i < buf.length; i++) {\n if (!inBase64) { // We're in direct mode.\n // Write direct chars until '&'\n if (buf[i] == andChar) {\n res += this.iconv.decode(buf.slice(lastI, i), \"ascii\"); // Write direct chars.\n lastI = i+1;\n inBase64 = true;\n }\n } else { // We decode base64.\n if (!base64IMAPChars[buf[i]]) { // Base64 ended.\n if (i == lastI && buf[i] == minusChar) { // \"&-\" -> \"&\"\n res += \"&\";\n } else {\n var b64str = base64Accum + buf.slice(lastI, i).toString().replace(/,/g, '/');\n res += this.iconv.decode(Buffer.from(b64str, 'base64'), \"utf16-be\");\n }\n\n if (buf[i] != minusChar) // Minus may be absorbed after base64.\n i--;\n\n lastI = i+1;\n inBase64 = false;\n base64Accum = '';\n }\n }\n }\n\n if (!inBase64) {\n res += this.iconv.decode(buf.slice(lastI), \"ascii\"); // Write direct chars.\n } else {\n var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, '/');\n\n var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.\n base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.\n b64str = b64str.slice(0, canBeDecoded);\n\n res += this.iconv.decode(Buffer.from(b64str, 'base64'), \"utf16-be\");\n }\n\n this.inBase64 = inBase64;\n this.base64Accum = base64Accum;\n\n return res;\n}\n\nUtf7IMAPDecoder.prototype.end = function() {\n var res = \"\";\n if (this.inBase64 && this.base64Accum.length > 0)\n res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), \"utf16-be\");\n\n this.inBase64 = false;\n this.base64Accum = '';\n return res;\n}\n\n\n","\"use strict\";\n\nvar BOMChar = '\\uFEFF';\n\nexports.PrependBOM = PrependBOMWrapper\nfunction PrependBOMWrapper(encoder, options) {\n this.encoder = encoder;\n this.addBOM = true;\n}\n\nPrependBOMWrapper.prototype.write = function(str) {\n if (this.addBOM) {\n str = BOMChar + str;\n this.addBOM = false;\n }\n\n return this.encoder.write(str);\n}\n\nPrependBOMWrapper.prototype.end = function() {\n return this.encoder.end();\n}\n\n\n//------------------------------------------------------------------------------\n\nexports.StripBOM = StripBOMWrapper;\nfunction StripBOMWrapper(decoder, options) {\n this.decoder = decoder;\n this.pass = false;\n this.options = options || {};\n}\n\nStripBOMWrapper.prototype.write = function(buf) {\n var res = this.decoder.write(buf);\n if (this.pass || !res)\n return res;\n\n if (res[0] === BOMChar) {\n res = res.slice(1);\n if (typeof this.options.stripBOM === 'function')\n this.options.stripBOM();\n }\n\n this.pass = true;\n return res;\n}\n\nStripBOMWrapper.prototype.end = function() {\n return this.decoder.end();\n}\n\n","\"use strict\";\nvar Buffer = require(\"buffer\").Buffer;\n// Note: not polyfilled with safer-buffer on a purpose, as overrides Buffer\n\n// == Extend Node primitives to use iconv-lite =================================\n\nmodule.exports = function (iconv) {\n var original = undefined; // Place to keep original methods.\n\n // Node authors rewrote Buffer internals to make it compatible with\n // Uint8Array and we cannot patch key functions since then.\n // Note: this does use older Buffer API on a purpose\n iconv.supportsNodeEncodingsExtension = !(Buffer.from || new Buffer(0) instanceof Uint8Array);\n\n iconv.extendNodeEncodings = function extendNodeEncodings() {\n if (original) return;\n original = {};\n\n if (!iconv.supportsNodeEncodingsExtension) {\n console.error(\"ACTION NEEDED: require('iconv-lite').extendNodeEncodings() is not supported in your version of Node\");\n console.error(\"See more info at https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility\");\n return;\n }\n\n var nodeNativeEncodings = {\n 'hex': true, 'utf8': true, 'utf-8': true, 'ascii': true, 'binary': true, \n 'base64': true, 'ucs2': true, 'ucs-2': true, 'utf16le': true, 'utf-16le': true,\n };\n\n Buffer.isNativeEncoding = function(enc) {\n return enc && nodeNativeEncodings[enc.toLowerCase()];\n }\n\n // -- SlowBuffer -----------------------------------------------------------\n var SlowBuffer = require('buffer').SlowBuffer;\n\n original.SlowBufferToString = SlowBuffer.prototype.toString;\n SlowBuffer.prototype.toString = function(encoding, start, end) {\n encoding = String(encoding || 'utf8').toLowerCase();\n\n // Use native conversion when possible\n if (Buffer.isNativeEncoding(encoding))\n return original.SlowBufferToString.call(this, encoding, start, end);\n\n // Otherwise, use our decoding method.\n if (typeof start == 'undefined') start = 0;\n if (typeof end == 'undefined') end = this.length;\n return iconv.decode(this.slice(start, end), encoding);\n }\n\n original.SlowBufferWrite = SlowBuffer.prototype.write;\n SlowBuffer.prototype.write = function(string, offset, length, encoding) {\n // Support both (string, offset, length, encoding)\n // and the legacy (string, encoding, offset, length)\n if (isFinite(offset)) {\n if (!isFinite(length)) {\n encoding = length;\n length = undefined;\n }\n } else { // legacy\n var swap = encoding;\n encoding = offset;\n offset = length;\n length = swap;\n }\n\n offset = +offset || 0;\n var remaining = this.length - offset;\n if (!length) {\n length = remaining;\n } else {\n length = +length;\n if (length > remaining) {\n length = remaining;\n }\n }\n encoding = String(encoding || 'utf8').toLowerCase();\n\n // Use native conversion when possible\n if (Buffer.isNativeEncoding(encoding))\n return original.SlowBufferWrite.call(this, string, offset, length, encoding);\n\n if (string.length > 0 && (length < 0 || offset < 0))\n throw new RangeError('attempt to write beyond buffer bounds');\n\n // Otherwise, use our encoding method.\n var buf = iconv.encode(string, encoding);\n if (buf.length < length) length = buf.length;\n buf.copy(this, offset, 0, length);\n return length;\n }\n\n // -- Buffer ---------------------------------------------------------------\n\n original.BufferIsEncoding = Buffer.isEncoding;\n Buffer.isEncoding = function(encoding) {\n return Buffer.isNativeEncoding(encoding) || iconv.encodingExists(encoding);\n }\n\n original.BufferByteLength = Buffer.byteLength;\n Buffer.byteLength = SlowBuffer.byteLength = function(str, encoding) {\n encoding = String(encoding || 'utf8').toLowerCase();\n\n // Use native conversion when possible\n if (Buffer.isNativeEncoding(encoding))\n return original.BufferByteLength.call(this, str, encoding);\n\n // Slow, I know, but we don't have a better way yet.\n return iconv.encode(str, encoding).length;\n }\n\n original.BufferToString = Buffer.prototype.toString;\n Buffer.prototype.toString = function(encoding, start, end) {\n encoding = String(encoding || 'utf8').toLowerCase();\n\n // Use native conversion when possible\n if (Buffer.isNativeEncoding(encoding))\n return original.BufferToString.call(this, encoding, start, end);\n\n // Otherwise, use our decoding method.\n if (typeof start == 'undefined') start = 0;\n if (typeof end == 'undefined') end = this.length;\n return iconv.decode(this.slice(start, end), encoding);\n }\n\n original.BufferWrite = Buffer.prototype.write;\n Buffer.prototype.write = function(string, offset, length, encoding) {\n var _offset = offset, _length = length, _encoding = encoding;\n // Support both (string, offset, length, encoding)\n // and the legacy (string, encoding, offset, length)\n if (isFinite(offset)) {\n if (!isFinite(length)) {\n encoding = length;\n length = undefined;\n }\n } else { // legacy\n var swap = encoding;\n encoding = offset;\n offset = length;\n length = swap;\n }\n\n encoding = String(encoding || 'utf8').toLowerCase();\n\n // Use native conversion when possible\n if (Buffer.isNativeEncoding(encoding))\n return original.BufferWrite.call(this, string, _offset, _length, _encoding);\n\n offset = +offset || 0;\n var remaining = this.length - offset;\n if (!length) {\n length = remaining;\n } else {\n length = +length;\n if (length > remaining) {\n length = remaining;\n }\n }\n\n if (string.length > 0 && (length < 0 || offset < 0))\n throw new RangeError('attempt to write beyond buffer bounds');\n\n // Otherwise, use our encoding method.\n var buf = iconv.encode(string, encoding);\n if (buf.length < length) length = buf.length;\n buf.copy(this, offset, 0, length);\n return length;\n\n // TODO: Set _charsWritten.\n }\n\n\n // -- Readable -------------------------------------------------------------\n if (iconv.supportsStreams) {\n var Readable = require('stream').Readable;\n\n original.ReadableSetEncoding = Readable.prototype.setEncoding;\n Readable.prototype.setEncoding = function setEncoding(enc, options) {\n // Use our own decoder, it has the same interface.\n // We cannot use original function as it doesn't handle BOM-s.\n this._readableState.decoder = iconv.getDecoder(enc, options);\n this._readableState.encoding = enc;\n }\n\n Readable.prototype.collect = iconv._collect;\n }\n }\n\n // Remove iconv-lite Node primitive extensions.\n iconv.undoExtendNodeEncodings = function undoExtendNodeEncodings() {\n if (!iconv.supportsNodeEncodingsExtension)\n return;\n if (!original)\n throw new Error(\"require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.\")\n\n delete Buffer.isNativeEncoding;\n\n var SlowBuffer = require('buffer').SlowBuffer;\n\n SlowBuffer.prototype.toString = original.SlowBufferToString;\n SlowBuffer.prototype.write = original.SlowBufferWrite;\n\n Buffer.isEncoding = original.BufferIsEncoding;\n Buffer.byteLength = original.BufferByteLength;\n Buffer.prototype.toString = original.BufferToString;\n Buffer.prototype.write = original.BufferWrite;\n\n if (iconv.supportsStreams) {\n var Readable = require('stream').Readable;\n\n Readable.prototype.setEncoding = original.ReadableSetEncoding;\n delete Readable.prototype.collect;\n }\n\n original = undefined;\n }\n}\n","\"use strict\";\n\n// Some environments don't have global Buffer (e.g. React Native).\n// Solution would be installing npm modules \"buffer\" and \"stream\" explicitly.\nvar Buffer = require(\"safer-buffer\").Buffer;\n\nvar bomHandling = require(\"./bom-handling\"),\n iconv = module.exports;\n\n// All codecs and aliases are kept here, keyed by encoding name/alias.\n// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`.\niconv.encodings = null;\n\n// Characters emitted in case of error.\niconv.defaultCharUnicode = '�';\niconv.defaultCharSingleByte = '?';\n\n// Public API.\niconv.encode = function encode(str, encoding, options) {\n str = \"\" + (str || \"\"); // Ensure string.\n\n var encoder = iconv.getEncoder(encoding, options);\n\n var res = encoder.write(str);\n var trail = encoder.end();\n \n return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res;\n}\n\niconv.decode = function decode(buf, encoding, options) {\n if (typeof buf === 'string') {\n if (!iconv.skipDecodeWarning) {\n console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding');\n iconv.skipDecodeWarning = true;\n }\n\n buf = Buffer.from(\"\" + (buf || \"\"), \"binary\"); // Ensure buffer.\n }\n\n var decoder = iconv.getDecoder(encoding, options);\n\n var res = decoder.write(buf);\n var trail = decoder.end();\n\n return trail ? (res + trail) : res;\n}\n\niconv.encodingExists = function encodingExists(enc) {\n try {\n iconv.getCodec(enc);\n return true;\n } catch (e) {\n return false;\n }\n}\n\n// Legacy aliases to convert functions\niconv.toEncoding = iconv.encode;\niconv.fromEncoding = iconv.decode;\n\n// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache.\niconv._codecDataCache = {};\niconv.getCodec = function getCodec(encoding) {\n if (!iconv.encodings)\n iconv.encodings = require(\"../encodings\"); // Lazy load all encoding definitions.\n \n // Canonicalize encoding name: strip all non-alphanumeric chars and appended year.\n var enc = iconv._canonicalizeEncoding(encoding);\n\n // Traverse iconv.encodings to find actual codec.\n var codecOptions = {};\n while (true) {\n var codec = iconv._codecDataCache[enc];\n if (codec)\n return codec;\n\n var codecDef = iconv.encodings[enc];\n\n switch (typeof codecDef) {\n case \"string\": // Direct alias to other encoding.\n enc = codecDef;\n break;\n\n case \"object\": // Alias with options. Can be layered.\n for (var key in codecDef)\n codecOptions[key] = codecDef[key];\n\n if (!codecOptions.encodingName)\n codecOptions.encodingName = enc;\n \n enc = codecDef.type;\n break;\n\n case \"function\": // Codec itself.\n if (!codecOptions.encodingName)\n codecOptions.encodingName = enc;\n\n // The codec function must load all tables and return object with .encoder and .decoder methods.\n // It'll be called only once (for each different options object).\n codec = new codecDef(codecOptions, iconv);\n\n iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later.\n return codec;\n\n default:\n throw new Error(\"Encoding not recognized: '\" + encoding + \"' (searched as: '\"+enc+\"')\");\n }\n }\n}\n\niconv._canonicalizeEncoding = function(encoding) {\n // Canonicalize encoding name: strip all non-alphanumeric chars and appended year.\n return (''+encoding).toLowerCase().replace(/:\\d{4}$|[^0-9a-z]/g, \"\");\n}\n\niconv.getEncoder = function getEncoder(encoding, options) {\n var codec = iconv.getCodec(encoding),\n encoder = new codec.encoder(options, codec);\n\n if (codec.bomAware && options && options.addBOM)\n encoder = new bomHandling.PrependBOM(encoder, options);\n\n return encoder;\n}\n\niconv.getDecoder = function getDecoder(encoding, options) {\n var codec = iconv.getCodec(encoding),\n decoder = new codec.decoder(options, codec);\n\n if (codec.bomAware && !(options && options.stripBOM === false))\n decoder = new bomHandling.StripBOM(decoder, options);\n\n return decoder;\n}\n\n\n// Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json.\nvar nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node;\nif (nodeVer) {\n\n // Load streaming support in Node v0.10+\n var nodeVerArr = nodeVer.split(\".\").map(Number);\n if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) {\n require(\"./streams\")(iconv);\n }\n\n // Load Node primitive extensions.\n require(\"./extend-node\")(iconv);\n}\n\nif (\"Ā\" != \"\\u0100\") {\n console.error(\"iconv-lite warning: javascript files use encoding different from utf-8. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info.\");\n}\n","\"use strict\";\n\nvar Buffer = require(\"buffer\").Buffer,\n Transform = require(\"stream\").Transform;\n\n\n// == Exports ==================================================================\nmodule.exports = function(iconv) {\n \n // Additional Public API.\n iconv.encodeStream = function encodeStream(encoding, options) {\n return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options);\n }\n\n iconv.decodeStream = function decodeStream(encoding, options) {\n return new IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options);\n }\n\n iconv.supportsStreams = true;\n\n\n // Not published yet.\n iconv.IconvLiteEncoderStream = IconvLiteEncoderStream;\n iconv.IconvLiteDecoderStream = IconvLiteDecoderStream;\n iconv._collect = IconvLiteDecoderStream.prototype.collect;\n};\n\n\n// == Encoder stream =======================================================\nfunction IconvLiteEncoderStream(conv, options) {\n this.conv = conv;\n options = options || {};\n options.decodeStrings = false; // We accept only strings, so we don't need to decode them.\n Transform.call(this, options);\n}\n\nIconvLiteEncoderStream.prototype = Object.create(Transform.prototype, {\n constructor: { value: IconvLiteEncoderStream }\n});\n\nIconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) {\n if (typeof chunk != 'string')\n return done(new Error(\"Iconv encoding stream needs strings as its input.\"));\n try {\n var res = this.conv.write(chunk);\n if (res && res.length) this.push(res);\n done();\n }\n catch (e) {\n done(e);\n }\n}\n\nIconvLiteEncoderStream.prototype._flush = function(done) {\n try {\n var res = this.conv.end();\n if (res && res.length) this.push(res);\n done();\n }\n catch (e) {\n done(e);\n }\n}\n\nIconvLiteEncoderStream.prototype.collect = function(cb) {\n var chunks = [];\n this.on('error', cb);\n this.on('data', function(chunk) { chunks.push(chunk); });\n this.on('end', function() {\n cb(null, Buffer.concat(chunks));\n });\n return this;\n}\n\n\n// == Decoder stream =======================================================\nfunction IconvLiteDecoderStream(conv, options) {\n this.conv = conv;\n options = options || {};\n options.encoding = this.encoding = 'utf8'; // We output strings.\n Transform.call(this, options);\n}\n\nIconvLiteDecoderStream.prototype = Object.create(Transform.prototype, {\n constructor: { value: IconvLiteDecoderStream }\n});\n\nIconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) {\n if (!Buffer.isBuffer(chunk))\n return done(new Error(\"Iconv decoding stream needs buffers as its input.\"));\n try {\n var res = this.conv.write(chunk);\n if (res && res.length) this.push(res, this.encoding);\n done();\n }\n catch (e) {\n done(e);\n }\n}\n\nIconvLiteDecoderStream.prototype._flush = function(done) {\n try {\n var res = this.conv.end();\n if (res && res.length) this.push(res, this.encoding); \n done();\n }\n catch (e) {\n done(e);\n }\n}\n\nIconvLiteDecoderStream.prototype.collect = function(cb) {\n var res = '';\n this.on('error', cb);\n this.on('data', function(chunk) { res += chunk; });\n this.on('end', function() {\n cb(null, res);\n });\n return this;\n}\n\n","'use strict';\n\nmodule.exports = (string, count = 1, options) => {\n\toptions = {\n\t\tindent: ' ',\n\t\tincludeEmptyLines: false,\n\t\t...options\n\t};\n\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError(\n\t\t\t`Expected \\`input\\` to be a \\`string\\`, got \\`${typeof string}\\``\n\t\t);\n\t}\n\n\tif (typeof count !== 'number') {\n\t\tthrow new TypeError(\n\t\t\t`Expected \\`count\\` to be a \\`number\\`, got \\`${typeof count}\\``\n\t\t);\n\t}\n\n\tif (typeof options.indent !== 'string') {\n\t\tthrow new TypeError(\n\t\t\t`Expected \\`options.indent\\` to be a \\`string\\`, got \\`${typeof options.indent}\\``\n\t\t);\n\t}\n\n\tif (count === 0) {\n\t\treturn string;\n\t}\n\n\tconst regex = options.includeEmptyLines ? /^/gm : /^(?!\\s*$)/gm;\n\n\treturn string.replace(regex, options.indent.repeat(count));\n};\n","var wrappy = require('wrappy')\nvar reqs = Object.create(null)\nvar once = require('once')\n\nmodule.exports = wrappy(inflight)\n\nfunction inflight (key, cb) {\n if (reqs[key]) {\n reqs[key].push(cb)\n return null\n } else {\n reqs[key] = [cb]\n return makeres(key)\n }\n}\n\nfunction makeres (key) {\n return once(function RES () {\n var cbs = reqs[key]\n var len = cbs.length\n var args = slice(arguments)\n\n // XXX It's somewhat ambiguous whether a new callback added in this\n // pass should be queued for later execution if something in the\n // list of callbacks throws, or if it should just be discarded.\n // However, it's such an edge case that it hardly matters, and either\n // choice is likely as surprising as the other.\n // As it happens, we do go ahead and schedule it for later execution.\n try {\n for (var i = 0; i < len; i++) {\n cbs[i].apply(null, args)\n }\n } finally {\n if (cbs.length > len) {\n // added more in the interim.\n // de-zalgo, just in case, but don't call again.\n cbs.splice(0, len)\n process.nextTick(function () {\n RES.apply(null, args)\n })\n } else {\n delete reqs[key]\n }\n }\n })\n}\n\nfunction slice (args) {\n var length = args.length\n var array = []\n\n for (var i = 0; i < length; i++) array[i] = args[i]\n return array\n}\n","try {\n var util = require('util');\n /* istanbul ignore next */\n if (typeof util.inherits !== 'function') throw '';\n module.exports = util.inherits;\n} catch (e) {\n /* istanbul ignore next */\n module.exports = require('./inherits_browser.js');\n}\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","// Generated using `npm run build`. Do not edit.\n\nvar regex = /^[a-z](?:[\\.0-9_a-z\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u203F\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])*-(?:[\\x2D\\.0-9_a-z\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u203F\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])*$/;\n\nvar isPotentialCustomElementName = function(string) {\n\treturn regex.test(string);\n};\n\nmodule.exports = isPotentialCustomElementName;\n","module.exports = isTypedArray\nisTypedArray.strict = isStrictTypedArray\nisTypedArray.loose = isLooseTypedArray\n\nvar toString = Object.prototype.toString\nvar names = {\n '[object Int8Array]': true\n , '[object Int16Array]': true\n , '[object Int32Array]': true\n , '[object Uint8Array]': true\n , '[object Uint8ClampedArray]': true\n , '[object Uint16Array]': true\n , '[object Uint32Array]': true\n , '[object Float32Array]': true\n , '[object Float64Array]': true\n}\n\nfunction isTypedArray(arr) {\n return (\n isStrictTypedArray(arr)\n || isLooseTypedArray(arr)\n )\n}\n\nfunction isStrictTypedArray(arr) {\n return (\n arr instanceof Int8Array\n || arr instanceof Int16Array\n || arr instanceof Int32Array\n || arr instanceof Uint8Array\n || arr instanceof Uint8ClampedArray\n || arr instanceof Uint16Array\n || arr instanceof Uint32Array\n || arr instanceof Float32Array\n || arr instanceof Float64Array\n )\n}\n\nfunction isLooseTypedArray(arr) {\n return names[toString.call(arr)]\n}\n","\"use strict\";\n\nmodule.exports = require('ws');","var stream = require('stream')\n\n\nfunction isStream (obj) {\n return obj instanceof stream.Stream\n}\n\n\nfunction isReadable (obj) {\n return isStream(obj) && typeof obj._read == 'function' && typeof obj._readableState == 'object'\n}\n\n\nfunction isWritable (obj) {\n return isStream(obj) && typeof obj._write == 'function' && typeof obj._writableState == 'object'\n}\n\n\nfunction isDuplex (obj) {\n return isReadable(obj) && isWritable(obj)\n}\n\n\nmodule.exports = isStream\nmodule.exports.isReadable = isReadable\nmodule.exports.isWritable = isWritable\nmodule.exports.isDuplex = isDuplex\n","(function(exports) {\n \"use strict\";\n\n function isArray(obj) {\n if (obj !== null) {\n return Object.prototype.toString.call(obj) === \"[object Array]\";\n } else {\n return false;\n }\n }\n\n function isObject(obj) {\n if (obj !== null) {\n return Object.prototype.toString.call(obj) === \"[object Object]\";\n } else {\n return false;\n }\n }\n\n function strictDeepEqual(first, second) {\n // Check the scalar case first.\n if (first === second) {\n return true;\n }\n\n // Check if they are the same type.\n var firstType = Object.prototype.toString.call(first);\n if (firstType !== Object.prototype.toString.call(second)) {\n return false;\n }\n // We know that first and second have the same type so we can just check the\n // first type from now on.\n if (isArray(first) === true) {\n // Short circuit if they're not the same length;\n if (first.length !== second.length) {\n return false;\n }\n for (var i = 0; i < first.length; i++) {\n if (strictDeepEqual(first[i], second[i]) === false) {\n return false;\n }\n }\n return true;\n }\n if (isObject(first) === true) {\n // An object is equal if it has the same key/value pairs.\n var keysSeen = {};\n for (var key in first) {\n if (hasOwnProperty.call(first, key)) {\n if (strictDeepEqual(first[key], second[key]) === false) {\n return false;\n }\n keysSeen[key] = true;\n }\n }\n // Now check that there aren't any keys in second that weren't\n // in first.\n for (var key2 in second) {\n if (hasOwnProperty.call(second, key2)) {\n if (keysSeen[key2] !== true) {\n return false;\n }\n }\n }\n return true;\n }\n return false;\n }\n\n function isFalse(obj) {\n // From the spec:\n // A false value corresponds to the following values:\n // Empty list\n // Empty object\n // Empty string\n // False boolean\n // null value\n\n // First check the scalar values.\n if (obj === \"\" || obj === false || obj === null) {\n return true;\n } else if (isArray(obj) && obj.length === 0) {\n // Check for an empty array.\n return true;\n } else if (isObject(obj)) {\n // Check for an empty object.\n for (var key in obj) {\n // If there are any keys, then\n // the object is not empty so the object\n // is not false.\n if (obj.hasOwnProperty(key)) {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n }\n\n function objValues(obj) {\n var keys = Object.keys(obj);\n var values = [];\n for (var i = 0; i < keys.length; i++) {\n values.push(obj[keys[i]]);\n }\n return values;\n }\n\n function merge(a, b) {\n var merged = {};\n for (var key in a) {\n merged[key] = a[key];\n }\n for (var key2 in b) {\n merged[key2] = b[key2];\n }\n return merged;\n }\n\n var trimLeft;\n if (typeof String.prototype.trimLeft === \"function\") {\n trimLeft = function(str) {\n return str.trimLeft();\n };\n } else {\n trimLeft = function(str) {\n return str.match(/^\\s*(.*)/)[1];\n };\n }\n\n // Type constants used to define functions.\n var TYPE_NUMBER = 0;\n var TYPE_ANY = 1;\n var TYPE_STRING = 2;\n var TYPE_ARRAY = 3;\n var TYPE_OBJECT = 4;\n var TYPE_BOOLEAN = 5;\n var TYPE_EXPREF = 6;\n var TYPE_NULL = 7;\n var TYPE_ARRAY_NUMBER = 8;\n var TYPE_ARRAY_STRING = 9;\n\n var TOK_EOF = \"EOF\";\n var TOK_UNQUOTEDIDENTIFIER = \"UnquotedIdentifier\";\n var TOK_QUOTEDIDENTIFIER = \"QuotedIdentifier\";\n var TOK_RBRACKET = \"Rbracket\";\n var TOK_RPAREN = \"Rparen\";\n var TOK_COMMA = \"Comma\";\n var TOK_COLON = \"Colon\";\n var TOK_RBRACE = \"Rbrace\";\n var TOK_NUMBER = \"Number\";\n var TOK_CURRENT = \"Current\";\n var TOK_EXPREF = \"Expref\";\n var TOK_PIPE = \"Pipe\";\n var TOK_OR = \"Or\";\n var TOK_AND = \"And\";\n var TOK_EQ = \"EQ\";\n var TOK_GT = \"GT\";\n var TOK_LT = \"LT\";\n var TOK_GTE = \"GTE\";\n var TOK_LTE = \"LTE\";\n var TOK_NE = \"NE\";\n var TOK_FLATTEN = \"Flatten\";\n var TOK_STAR = \"Star\";\n var TOK_FILTER = \"Filter\";\n var TOK_DOT = \"Dot\";\n var TOK_NOT = \"Not\";\n var TOK_LBRACE = \"Lbrace\";\n var TOK_LBRACKET = \"Lbracket\";\n var TOK_LPAREN= \"Lparen\";\n var TOK_LITERAL= \"Literal\";\n\n // The \"&\", \"[\", \"<\", \">\" tokens\n // are not in basicToken because\n // there are two token variants\n // (\"&&\", \"[?\", \"<=\", \">=\"). This is specially handled\n // below.\n\n var basicTokens = {\n \".\": TOK_DOT,\n \"*\": TOK_STAR,\n \",\": TOK_COMMA,\n \":\": TOK_COLON,\n \"{\": TOK_LBRACE,\n \"}\": TOK_RBRACE,\n \"]\": TOK_RBRACKET,\n \"(\": TOK_LPAREN,\n \")\": TOK_RPAREN,\n \"@\": TOK_CURRENT\n };\n\n var operatorStartToken = {\n \"<\": true,\n \">\": true,\n \"=\": true,\n \"!\": true\n };\n\n var skipChars = {\n \" \": true,\n \"\\t\": true,\n \"\\n\": true\n };\n\n\n function isAlpha(ch) {\n return (ch >= \"a\" && ch <= \"z\") ||\n (ch >= \"A\" && ch <= \"Z\") ||\n ch === \"_\";\n }\n\n function isNum(ch) {\n return (ch >= \"0\" && ch <= \"9\") ||\n ch === \"-\";\n }\n function isAlphaNum(ch) {\n return (ch >= \"a\" && ch <= \"z\") ||\n (ch >= \"A\" && ch <= \"Z\") ||\n (ch >= \"0\" && ch <= \"9\") ||\n ch === \"_\";\n }\n\n function Lexer() {\n }\n Lexer.prototype = {\n tokenize: function(stream) {\n var tokens = [];\n this._current = 0;\n var start;\n var identifier;\n var token;\n while (this._current < stream.length) {\n if (isAlpha(stream[this._current])) {\n start = this._current;\n identifier = this._consumeUnquotedIdentifier(stream);\n tokens.push({type: TOK_UNQUOTEDIDENTIFIER,\n value: identifier,\n start: start});\n } else if (basicTokens[stream[this._current]] !== undefined) {\n tokens.push({type: basicTokens[stream[this._current]],\n value: stream[this._current],\n start: this._current});\n this._current++;\n } else if (isNum(stream[this._current])) {\n token = this._consumeNumber(stream);\n tokens.push(token);\n } else if (stream[this._current] === \"[\") {\n // No need to increment this._current. This happens\n // in _consumeLBracket\n token = this._consumeLBracket(stream);\n tokens.push(token);\n } else if (stream[this._current] === \"\\\"\") {\n start = this._current;\n identifier = this._consumeQuotedIdentifier(stream);\n tokens.push({type: TOK_QUOTEDIDENTIFIER,\n value: identifier,\n start: start});\n } else if (stream[this._current] === \"'\") {\n start = this._current;\n identifier = this._consumeRawStringLiteral(stream);\n tokens.push({type: TOK_LITERAL,\n value: identifier,\n start: start});\n } else if (stream[this._current] === \"`\") {\n start = this._current;\n var literal = this._consumeLiteral(stream);\n tokens.push({type: TOK_LITERAL,\n value: literal,\n start: start});\n } else if (operatorStartToken[stream[this._current]] !== undefined) {\n tokens.push(this._consumeOperator(stream));\n } else if (skipChars[stream[this._current]] !== undefined) {\n // Ignore whitespace.\n this._current++;\n } else if (stream[this._current] === \"&\") {\n start = this._current;\n this._current++;\n if (stream[this._current] === \"&\") {\n this._current++;\n tokens.push({type: TOK_AND, value: \"&&\", start: start});\n } else {\n tokens.push({type: TOK_EXPREF, value: \"&\", start: start});\n }\n } else if (stream[this._current] === \"|\") {\n start = this._current;\n this._current++;\n if (stream[this._current] === \"|\") {\n this._current++;\n tokens.push({type: TOK_OR, value: \"||\", start: start});\n } else {\n tokens.push({type: TOK_PIPE, value: \"|\", start: start});\n }\n } else {\n var error = new Error(\"Unknown character:\" + stream[this._current]);\n error.name = \"LexerError\";\n throw error;\n }\n }\n return tokens;\n },\n\n _consumeUnquotedIdentifier: function(stream) {\n var start = this._current;\n this._current++;\n while (this._current < stream.length && isAlphaNum(stream[this._current])) {\n this._current++;\n }\n return stream.slice(start, this._current);\n },\n\n _consumeQuotedIdentifier: function(stream) {\n var start = this._current;\n this._current++;\n var maxLength = stream.length;\n while (stream[this._current] !== \"\\\"\" && this._current < maxLength) {\n // You can escape a double quote and you can escape an escape.\n var current = this._current;\n if (stream[current] === \"\\\\\" && (stream[current + 1] === \"\\\\\" ||\n stream[current + 1] === \"\\\"\")) {\n current += 2;\n } else {\n current++;\n }\n this._current = current;\n }\n this._current++;\n return JSON.parse(stream.slice(start, this._current));\n },\n\n _consumeRawStringLiteral: function(stream) {\n var start = this._current;\n this._current++;\n var maxLength = stream.length;\n while (stream[this._current] !== \"'\" && this._current < maxLength) {\n // You can escape a single quote and you can escape an escape.\n var current = this._current;\n if (stream[current] === \"\\\\\" && (stream[current + 1] === \"\\\\\" ||\n stream[current + 1] === \"'\")) {\n current += 2;\n } else {\n current++;\n }\n this._current = current;\n }\n this._current++;\n var literal = stream.slice(start + 1, this._current - 1);\n return literal.replace(\"\\\\'\", \"'\");\n },\n\n _consumeNumber: function(stream) {\n var start = this._current;\n this._current++;\n var maxLength = stream.length;\n while (isNum(stream[this._current]) && this._current < maxLength) {\n this._current++;\n }\n var value = parseInt(stream.slice(start, this._current));\n return {type: TOK_NUMBER, value: value, start: start};\n },\n\n _consumeLBracket: function(stream) {\n var start = this._current;\n this._current++;\n if (stream[this._current] === \"?\") {\n this._current++;\n return {type: TOK_FILTER, value: \"[?\", start: start};\n } else if (stream[this._current] === \"]\") {\n this._current++;\n return {type: TOK_FLATTEN, value: \"[]\", start: start};\n } else {\n return {type: TOK_LBRACKET, value: \"[\", start: start};\n }\n },\n\n _consumeOperator: function(stream) {\n var start = this._current;\n var startingChar = stream[start];\n this._current++;\n if (startingChar === \"!\") {\n if (stream[this._current] === \"=\") {\n this._current++;\n return {type: TOK_NE, value: \"!=\", start: start};\n } else {\n return {type: TOK_NOT, value: \"!\", start: start};\n }\n } else if (startingChar === \"<\") {\n if (stream[this._current] === \"=\") {\n this._current++;\n return {type: TOK_LTE, value: \"<=\", start: start};\n } else {\n return {type: TOK_LT, value: \"<\", start: start};\n }\n } else if (startingChar === \">\") {\n if (stream[this._current] === \"=\") {\n this._current++;\n return {type: TOK_GTE, value: \">=\", start: start};\n } else {\n return {type: TOK_GT, value: \">\", start: start};\n }\n } else if (startingChar === \"=\") {\n if (stream[this._current] === \"=\") {\n this._current++;\n return {type: TOK_EQ, value: \"==\", start: start};\n }\n }\n },\n\n _consumeLiteral: function(stream) {\n this._current++;\n var start = this._current;\n var maxLength = stream.length;\n var literal;\n while(stream[this._current] !== \"`\" && this._current < maxLength) {\n // You can escape a literal char or you can escape the escape.\n var current = this._current;\n if (stream[current] === \"\\\\\" && (stream[current + 1] === \"\\\\\" ||\n stream[current + 1] === \"`\")) {\n current += 2;\n } else {\n current++;\n }\n this._current = current;\n }\n var literalString = trimLeft(stream.slice(start, this._current));\n literalString = literalString.replace(\"\\\\`\", \"`\");\n if (this._looksLikeJSON(literalString)) {\n literal = JSON.parse(literalString);\n } else {\n // Try to JSON parse it as \"\"\n literal = JSON.parse(\"\\\"\" + literalString + \"\\\"\");\n }\n // +1 gets us to the ending \"`\", +1 to move on to the next char.\n this._current++;\n return literal;\n },\n\n _looksLikeJSON: function(literalString) {\n var startingChars = \"[{\\\"\";\n var jsonLiterals = [\"true\", \"false\", \"null\"];\n var numberLooking = \"-0123456789\";\n\n if (literalString === \"\") {\n return false;\n } else if (startingChars.indexOf(literalString[0]) >= 0) {\n return true;\n } else if (jsonLiterals.indexOf(literalString) >= 0) {\n return true;\n } else if (numberLooking.indexOf(literalString[0]) >= 0) {\n try {\n JSON.parse(literalString);\n return true;\n } catch (ex) {\n return false;\n }\n } else {\n return false;\n }\n }\n };\n\n var bindingPower = {};\n bindingPower[TOK_EOF] = 0;\n bindingPower[TOK_UNQUOTEDIDENTIFIER] = 0;\n bindingPower[TOK_QUOTEDIDENTIFIER] = 0;\n bindingPower[TOK_RBRACKET] = 0;\n bindingPower[TOK_RPAREN] = 0;\n bindingPower[TOK_COMMA] = 0;\n bindingPower[TOK_RBRACE] = 0;\n bindingPower[TOK_NUMBER] = 0;\n bindingPower[TOK_CURRENT] = 0;\n bindingPower[TOK_EXPREF] = 0;\n bindingPower[TOK_PIPE] = 1;\n bindingPower[TOK_OR] = 2;\n bindingPower[TOK_AND] = 3;\n bindingPower[TOK_EQ] = 5;\n bindingPower[TOK_GT] = 5;\n bindingPower[TOK_LT] = 5;\n bindingPower[TOK_GTE] = 5;\n bindingPower[TOK_LTE] = 5;\n bindingPower[TOK_NE] = 5;\n bindingPower[TOK_FLATTEN] = 9;\n bindingPower[TOK_STAR] = 20;\n bindingPower[TOK_FILTER] = 21;\n bindingPower[TOK_DOT] = 40;\n bindingPower[TOK_NOT] = 45;\n bindingPower[TOK_LBRACE] = 50;\n bindingPower[TOK_LBRACKET] = 55;\n bindingPower[TOK_LPAREN] = 60;\n\n function Parser() {\n }\n\n Parser.prototype = {\n parse: function(expression) {\n this._loadTokens(expression);\n this.index = 0;\n var ast = this.expression(0);\n if (this._lookahead(0) !== TOK_EOF) {\n var t = this._lookaheadToken(0);\n var error = new Error(\n \"Unexpected token type: \" + t.type + \", value: \" + t.value);\n error.name = \"ParserError\";\n throw error;\n }\n return ast;\n },\n\n _loadTokens: function(expression) {\n var lexer = new Lexer();\n var tokens = lexer.tokenize(expression);\n tokens.push({type: TOK_EOF, value: \"\", start: expression.length});\n this.tokens = tokens;\n },\n\n expression: function(rbp) {\n var leftToken = this._lookaheadToken(0);\n this._advance();\n var left = this.nud(leftToken);\n var currentToken = this._lookahead(0);\n while (rbp < bindingPower[currentToken]) {\n this._advance();\n left = this.led(currentToken, left);\n currentToken = this._lookahead(0);\n }\n return left;\n },\n\n _lookahead: function(number) {\n return this.tokens[this.index + number].type;\n },\n\n _lookaheadToken: function(number) {\n return this.tokens[this.index + number];\n },\n\n _advance: function() {\n this.index++;\n },\n\n nud: function(token) {\n var left;\n var right;\n var expression;\n switch (token.type) {\n case TOK_LITERAL:\n return {type: \"Literal\", value: token.value};\n case TOK_UNQUOTEDIDENTIFIER:\n return {type: \"Field\", name: token.value};\n case TOK_QUOTEDIDENTIFIER:\n var node = {type: \"Field\", name: token.value};\n if (this._lookahead(0) === TOK_LPAREN) {\n throw new Error(\"Quoted identifier not allowed for function names.\");\n } else {\n return node;\n }\n break;\n case TOK_NOT:\n right = this.expression(bindingPower.Not);\n return {type: \"NotExpression\", children: [right]};\n case TOK_STAR:\n left = {type: \"Identity\"};\n right = null;\n if (this._lookahead(0) === TOK_RBRACKET) {\n // This can happen in a multiselect,\n // [a, b, *]\n right = {type: \"Identity\"};\n } else {\n right = this._parseProjectionRHS(bindingPower.Star);\n }\n return {type: \"ValueProjection\", children: [left, right]};\n case TOK_FILTER:\n return this.led(token.type, {type: \"Identity\"});\n case TOK_LBRACE:\n return this._parseMultiselectHash();\n case TOK_FLATTEN:\n left = {type: TOK_FLATTEN, children: [{type: \"Identity\"}]};\n right = this._parseProjectionRHS(bindingPower.Flatten);\n return {type: \"Projection\", children: [left, right]};\n case TOK_LBRACKET:\n if (this._lookahead(0) === TOK_NUMBER || this._lookahead(0) === TOK_COLON) {\n right = this._parseIndexExpression();\n return this._projectIfSlice({type: \"Identity\"}, right);\n } else if (this._lookahead(0) === TOK_STAR &&\n this._lookahead(1) === TOK_RBRACKET) {\n this._advance();\n this._advance();\n right = this._parseProjectionRHS(bindingPower.Star);\n return {type: \"Projection\",\n children: [{type: \"Identity\"}, right]};\n } else {\n return this._parseMultiselectList();\n }\n break;\n case TOK_CURRENT:\n return {type: TOK_CURRENT};\n case TOK_EXPREF:\n expression = this.expression(bindingPower.Expref);\n return {type: \"ExpressionReference\", children: [expression]};\n case TOK_LPAREN:\n var args = [];\n while (this._lookahead(0) !== TOK_RPAREN) {\n if (this._lookahead(0) === TOK_CURRENT) {\n expression = {type: TOK_CURRENT};\n this._advance();\n } else {\n expression = this.expression(0);\n }\n args.push(expression);\n }\n this._match(TOK_RPAREN);\n return args[0];\n default:\n this._errorToken(token);\n }\n },\n\n led: function(tokenName, left) {\n var right;\n switch(tokenName) {\n case TOK_DOT:\n var rbp = bindingPower.Dot;\n if (this._lookahead(0) !== TOK_STAR) {\n right = this._parseDotRHS(rbp);\n return {type: \"Subexpression\", children: [left, right]};\n } else {\n // Creating a projection.\n this._advance();\n right = this._parseProjectionRHS(rbp);\n return {type: \"ValueProjection\", children: [left, right]};\n }\n break;\n case TOK_PIPE:\n right = this.expression(bindingPower.Pipe);\n return {type: TOK_PIPE, children: [left, right]};\n case TOK_OR:\n right = this.expression(bindingPower.Or);\n return {type: \"OrExpression\", children: [left, right]};\n case TOK_AND:\n right = this.expression(bindingPower.And);\n return {type: \"AndExpression\", children: [left, right]};\n case TOK_LPAREN:\n var name = left.name;\n var args = [];\n var expression, node;\n while (this._lookahead(0) !== TOK_RPAREN) {\n if (this._lookahead(0) === TOK_CURRENT) {\n expression = {type: TOK_CURRENT};\n this._advance();\n } else {\n expression = this.expression(0);\n }\n if (this._lookahead(0) === TOK_COMMA) {\n this._match(TOK_COMMA);\n }\n args.push(expression);\n }\n this._match(TOK_RPAREN);\n node = {type: \"Function\", name: name, children: args};\n return node;\n case TOK_FILTER:\n var condition = this.expression(0);\n this._match(TOK_RBRACKET);\n if (this._lookahead(0) === TOK_FLATTEN) {\n right = {type: \"Identity\"};\n } else {\n right = this._parseProjectionRHS(bindingPower.Filter);\n }\n return {type: \"FilterProjection\", children: [left, right, condition]};\n case TOK_FLATTEN:\n var leftNode = {type: TOK_FLATTEN, children: [left]};\n var rightNode = this._parseProjectionRHS(bindingPower.Flatten);\n return {type: \"Projection\", children: [leftNode, rightNode]};\n case TOK_EQ:\n case TOK_NE:\n case TOK_GT:\n case TOK_GTE:\n case TOK_LT:\n case TOK_LTE:\n return this._parseComparator(left, tokenName);\n case TOK_LBRACKET:\n var token = this._lookaheadToken(0);\n if (token.type === TOK_NUMBER || token.type === TOK_COLON) {\n right = this._parseIndexExpression();\n return this._projectIfSlice(left, right);\n } else {\n this._match(TOK_STAR);\n this._match(TOK_RBRACKET);\n right = this._parseProjectionRHS(bindingPower.Star);\n return {type: \"Projection\", children: [left, right]};\n }\n break;\n default:\n this._errorToken(this._lookaheadToken(0));\n }\n },\n\n _match: function(tokenType) {\n if (this._lookahead(0) === tokenType) {\n this._advance();\n } else {\n var t = this._lookaheadToken(0);\n var error = new Error(\"Expected \" + tokenType + \", got: \" + t.type);\n error.name = \"ParserError\";\n throw error;\n }\n },\n\n _errorToken: function(token) {\n var error = new Error(\"Invalid token (\" +\n token.type + \"): \\\"\" +\n token.value + \"\\\"\");\n error.name = \"ParserError\";\n throw error;\n },\n\n\n _parseIndexExpression: function() {\n if (this._lookahead(0) === TOK_COLON || this._lookahead(1) === TOK_COLON) {\n return this._parseSliceExpression();\n } else {\n var node = {\n type: \"Index\",\n value: this._lookaheadToken(0).value};\n this._advance();\n this._match(TOK_RBRACKET);\n return node;\n }\n },\n\n _projectIfSlice: function(left, right) {\n var indexExpr = {type: \"IndexExpression\", children: [left, right]};\n if (right.type === \"Slice\") {\n return {\n type: \"Projection\",\n children: [indexExpr, this._parseProjectionRHS(bindingPower.Star)]\n };\n } else {\n return indexExpr;\n }\n },\n\n _parseSliceExpression: function() {\n // [start:end:step] where each part is optional, as well as the last\n // colon.\n var parts = [null, null, null];\n var index = 0;\n var currentToken = this._lookahead(0);\n while (currentToken !== TOK_RBRACKET && index < 3) {\n if (currentToken === TOK_COLON) {\n index++;\n this._advance();\n } else if (currentToken === TOK_NUMBER) {\n parts[index] = this._lookaheadToken(0).value;\n this._advance();\n } else {\n var t = this._lookahead(0);\n var error = new Error(\"Syntax error, unexpected token: \" +\n t.value + \"(\" + t.type + \")\");\n error.name = \"Parsererror\";\n throw error;\n }\n currentToken = this._lookahead(0);\n }\n this._match(TOK_RBRACKET);\n return {\n type: \"Slice\",\n children: parts\n };\n },\n\n _parseComparator: function(left, comparator) {\n var right = this.expression(bindingPower[comparator]);\n return {type: \"Comparator\", name: comparator, children: [left, right]};\n },\n\n _parseDotRHS: function(rbp) {\n var lookahead = this._lookahead(0);\n var exprTokens = [TOK_UNQUOTEDIDENTIFIER, TOK_QUOTEDIDENTIFIER, TOK_STAR];\n if (exprTokens.indexOf(lookahead) >= 0) {\n return this.expression(rbp);\n } else if (lookahead === TOK_LBRACKET) {\n this._match(TOK_LBRACKET);\n return this._parseMultiselectList();\n } else if (lookahead === TOK_LBRACE) {\n this._match(TOK_LBRACE);\n return this._parseMultiselectHash();\n }\n },\n\n _parseProjectionRHS: function(rbp) {\n var right;\n if (bindingPower[this._lookahead(0)] < 10) {\n right = {type: \"Identity\"};\n } else if (this._lookahead(0) === TOK_LBRACKET) {\n right = this.expression(rbp);\n } else if (this._lookahead(0) === TOK_FILTER) {\n right = this.expression(rbp);\n } else if (this._lookahead(0) === TOK_DOT) {\n this._match(TOK_DOT);\n right = this._parseDotRHS(rbp);\n } else {\n var t = this._lookaheadToken(0);\n var error = new Error(\"Sytanx error, unexpected token: \" +\n t.value + \"(\" + t.type + \")\");\n error.name = \"ParserError\";\n throw error;\n }\n return right;\n },\n\n _parseMultiselectList: function() {\n var expressions = [];\n while (this._lookahead(0) !== TOK_RBRACKET) {\n var expression = this.expression(0);\n expressions.push(expression);\n if (this._lookahead(0) === TOK_COMMA) {\n this._match(TOK_COMMA);\n if (this._lookahead(0) === TOK_RBRACKET) {\n throw new Error(\"Unexpected token Rbracket\");\n }\n }\n }\n this._match(TOK_RBRACKET);\n return {type: \"MultiSelectList\", children: expressions};\n },\n\n _parseMultiselectHash: function() {\n var pairs = [];\n var identifierTypes = [TOK_UNQUOTEDIDENTIFIER, TOK_QUOTEDIDENTIFIER];\n var keyToken, keyName, value, node;\n for (;;) {\n keyToken = this._lookaheadToken(0);\n if (identifierTypes.indexOf(keyToken.type) < 0) {\n throw new Error(\"Expecting an identifier token, got: \" +\n keyToken.type);\n }\n keyName = keyToken.value;\n this._advance();\n this._match(TOK_COLON);\n value = this.expression(0);\n node = {type: \"KeyValuePair\", name: keyName, value: value};\n pairs.push(node);\n if (this._lookahead(0) === TOK_COMMA) {\n this._match(TOK_COMMA);\n } else if (this._lookahead(0) === TOK_RBRACE) {\n this._match(TOK_RBRACE);\n break;\n }\n }\n return {type: \"MultiSelectHash\", children: pairs};\n }\n };\n\n\n function TreeInterpreter(runtime) {\n this.runtime = runtime;\n }\n\n TreeInterpreter.prototype = {\n search: function(node, value) {\n return this.visit(node, value);\n },\n\n visit: function(node, value) {\n var matched, current, result, first, second, field, left, right, collected, i;\n switch (node.type) {\n case \"Field\":\n if (value === null ) {\n return null;\n } else if (isObject(value)) {\n field = value[node.name];\n if (field === undefined) {\n return null;\n } else {\n return field;\n }\n } else {\n return null;\n }\n break;\n case \"Subexpression\":\n result = this.visit(node.children[0], value);\n for (i = 1; i < node.children.length; i++) {\n result = this.visit(node.children[1], result);\n if (result === null) {\n return null;\n }\n }\n return result;\n case \"IndexExpression\":\n left = this.visit(node.children[0], value);\n right = this.visit(node.children[1], left);\n return right;\n case \"Index\":\n if (!isArray(value)) {\n return null;\n }\n var index = node.value;\n if (index < 0) {\n index = value.length + index;\n }\n result = value[index];\n if (result === undefined) {\n result = null;\n }\n return result;\n case \"Slice\":\n if (!isArray(value)) {\n return null;\n }\n var sliceParams = node.children.slice(0);\n var computed = this.computeSliceParams(value.length, sliceParams);\n var start = computed[0];\n var stop = computed[1];\n var step = computed[2];\n result = [];\n if (step > 0) {\n for (i = start; i < stop; i += step) {\n result.push(value[i]);\n }\n } else {\n for (i = start; i > stop; i += step) {\n result.push(value[i]);\n }\n }\n return result;\n case \"Projection\":\n // Evaluate left child.\n var base = this.visit(node.children[0], value);\n if (!isArray(base)) {\n return null;\n }\n collected = [];\n for (i = 0; i < base.length; i++) {\n current = this.visit(node.children[1], base[i]);\n if (current !== null) {\n collected.push(current);\n }\n }\n return collected;\n case \"ValueProjection\":\n // Evaluate left child.\n base = this.visit(node.children[0], value);\n if (!isObject(base)) {\n return null;\n }\n collected = [];\n var values = objValues(base);\n for (i = 0; i < values.length; i++) {\n current = this.visit(node.children[1], values[i]);\n if (current !== null) {\n collected.push(current);\n }\n }\n return collected;\n case \"FilterProjection\":\n base = this.visit(node.children[0], value);\n if (!isArray(base)) {\n return null;\n }\n var filtered = [];\n var finalResults = [];\n for (i = 0; i < base.length; i++) {\n matched = this.visit(node.children[2], base[i]);\n if (!isFalse(matched)) {\n filtered.push(base[i]);\n }\n }\n for (var j = 0; j < filtered.length; j++) {\n current = this.visit(node.children[1], filtered[j]);\n if (current !== null) {\n finalResults.push(current);\n }\n }\n return finalResults;\n case \"Comparator\":\n first = this.visit(node.children[0], value);\n second = this.visit(node.children[1], value);\n switch(node.name) {\n case TOK_EQ:\n result = strictDeepEqual(first, second);\n break;\n case TOK_NE:\n result = !strictDeepEqual(first, second);\n break;\n case TOK_GT:\n result = first > second;\n break;\n case TOK_GTE:\n result = first >= second;\n break;\n case TOK_LT:\n result = first < second;\n break;\n case TOK_LTE:\n result = first <= second;\n break;\n default:\n throw new Error(\"Unknown comparator: \" + node.name);\n }\n return result;\n case TOK_FLATTEN:\n var original = this.visit(node.children[0], value);\n if (!isArray(original)) {\n return null;\n }\n var merged = [];\n for (i = 0; i < original.length; i++) {\n current = original[i];\n if (isArray(current)) {\n merged.push.apply(merged, current);\n } else {\n merged.push(current);\n }\n }\n return merged;\n case \"Identity\":\n return value;\n case \"MultiSelectList\":\n if (value === null) {\n return null;\n }\n collected = [];\n for (i = 0; i < node.children.length; i++) {\n collected.push(this.visit(node.children[i], value));\n }\n return collected;\n case \"MultiSelectHash\":\n if (value === null) {\n return null;\n }\n collected = {};\n var child;\n for (i = 0; i < node.children.length; i++) {\n child = node.children[i];\n collected[child.name] = this.visit(child.value, value);\n }\n return collected;\n case \"OrExpression\":\n matched = this.visit(node.children[0], value);\n if (isFalse(matched)) {\n matched = this.visit(node.children[1], value);\n }\n return matched;\n case \"AndExpression\":\n first = this.visit(node.children[0], value);\n\n if (isFalse(first) === true) {\n return first;\n }\n return this.visit(node.children[1], value);\n case \"NotExpression\":\n first = this.visit(node.children[0], value);\n return isFalse(first);\n case \"Literal\":\n return node.value;\n case TOK_PIPE:\n left = this.visit(node.children[0], value);\n return this.visit(node.children[1], left);\n case TOK_CURRENT:\n return value;\n case \"Function\":\n var resolvedArgs = [];\n for (i = 0; i < node.children.length; i++) {\n resolvedArgs.push(this.visit(node.children[i], value));\n }\n return this.runtime.callFunction(node.name, resolvedArgs);\n case \"ExpressionReference\":\n var refNode = node.children[0];\n // Tag the node with a specific attribute so the type\n // checker verify the type.\n refNode.jmespathType = TOK_EXPREF;\n return refNode;\n default:\n throw new Error(\"Unknown node type: \" + node.type);\n }\n },\n\n computeSliceParams: function(arrayLength, sliceParams) {\n var start = sliceParams[0];\n var stop = sliceParams[1];\n var step = sliceParams[2];\n var computed = [null, null, null];\n if (step === null) {\n step = 1;\n } else if (step === 0) {\n var error = new Error(\"Invalid slice, step cannot be 0\");\n error.name = \"RuntimeError\";\n throw error;\n }\n var stepValueNegative = step < 0 ? true : false;\n\n if (start === null) {\n start = stepValueNegative ? arrayLength - 1 : 0;\n } else {\n start = this.capSliceRange(arrayLength, start, step);\n }\n\n if (stop === null) {\n stop = stepValueNegative ? -1 : arrayLength;\n } else {\n stop = this.capSliceRange(arrayLength, stop, step);\n }\n computed[0] = start;\n computed[1] = stop;\n computed[2] = step;\n return computed;\n },\n\n capSliceRange: function(arrayLength, actualValue, step) {\n if (actualValue < 0) {\n actualValue += arrayLength;\n if (actualValue < 0) {\n actualValue = step < 0 ? -1 : 0;\n }\n } else if (actualValue >= arrayLength) {\n actualValue = step < 0 ? arrayLength - 1 : arrayLength;\n }\n return actualValue;\n }\n\n };\n\n function Runtime(interpreter) {\n this._interpreter = interpreter;\n this.functionTable = {\n // name: [function, ]\n // The can be:\n //\n // {\n // args: [[type1, type2], [type1, type2]],\n // variadic: true|false\n // }\n //\n // Each arg in the arg list is a list of valid types\n // (if the function is overloaded and supports multiple\n // types. If the type is \"any\" then no type checking\n // occurs on the argument. Variadic is optional\n // and if not provided is assumed to be false.\n abs: {_func: this._functionAbs, _signature: [{types: [TYPE_NUMBER]}]},\n avg: {_func: this._functionAvg, _signature: [{types: [TYPE_ARRAY_NUMBER]}]},\n ceil: {_func: this._functionCeil, _signature: [{types: [TYPE_NUMBER]}]},\n contains: {\n _func: this._functionContains,\n _signature: [{types: [TYPE_STRING, TYPE_ARRAY]},\n {types: [TYPE_ANY]}]},\n \"ends_with\": {\n _func: this._functionEndsWith,\n _signature: [{types: [TYPE_STRING]}, {types: [TYPE_STRING]}]},\n floor: {_func: this._functionFloor, _signature: [{types: [TYPE_NUMBER]}]},\n length: {\n _func: this._functionLength,\n _signature: [{types: [TYPE_STRING, TYPE_ARRAY, TYPE_OBJECT]}]},\n map: {\n _func: this._functionMap,\n _signature: [{types: [TYPE_EXPREF]}, {types: [TYPE_ARRAY]}]},\n max: {\n _func: this._functionMax,\n _signature: [{types: [TYPE_ARRAY_NUMBER, TYPE_ARRAY_STRING]}]},\n \"merge\": {\n _func: this._functionMerge,\n _signature: [{types: [TYPE_OBJECT], variadic: true}]\n },\n \"max_by\": {\n _func: this._functionMaxBy,\n _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}]\n },\n sum: {_func: this._functionSum, _signature: [{types: [TYPE_ARRAY_NUMBER]}]},\n \"starts_with\": {\n _func: this._functionStartsWith,\n _signature: [{types: [TYPE_STRING]}, {types: [TYPE_STRING]}]},\n min: {\n _func: this._functionMin,\n _signature: [{types: [TYPE_ARRAY_NUMBER, TYPE_ARRAY_STRING]}]},\n \"min_by\": {\n _func: this._functionMinBy,\n _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}]\n },\n type: {_func: this._functionType, _signature: [{types: [TYPE_ANY]}]},\n keys: {_func: this._functionKeys, _signature: [{types: [TYPE_OBJECT]}]},\n values: {_func: this._functionValues, _signature: [{types: [TYPE_OBJECT]}]},\n sort: {_func: this._functionSort, _signature: [{types: [TYPE_ARRAY_STRING, TYPE_ARRAY_NUMBER]}]},\n \"sort_by\": {\n _func: this._functionSortBy,\n _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}]\n },\n join: {\n _func: this._functionJoin,\n _signature: [\n {types: [TYPE_STRING]},\n {types: [TYPE_ARRAY_STRING]}\n ]\n },\n reverse: {\n _func: this._functionReverse,\n _signature: [{types: [TYPE_STRING, TYPE_ARRAY]}]},\n \"to_array\": {_func: this._functionToArray, _signature: [{types: [TYPE_ANY]}]},\n \"to_string\": {_func: this._functionToString, _signature: [{types: [TYPE_ANY]}]},\n \"to_number\": {_func: this._functionToNumber, _signature: [{types: [TYPE_ANY]}]},\n \"not_null\": {\n _func: this._functionNotNull,\n _signature: [{types: [TYPE_ANY], variadic: true}]\n }\n };\n }\n\n Runtime.prototype = {\n callFunction: function(name, resolvedArgs) {\n var functionEntry = this.functionTable[name];\n if (functionEntry === undefined) {\n throw new Error(\"Unknown function: \" + name + \"()\");\n }\n this._validateArgs(name, resolvedArgs, functionEntry._signature);\n return functionEntry._func.call(this, resolvedArgs);\n },\n\n _validateArgs: function(name, args, signature) {\n // Validating the args requires validating\n // the correct arity and the correct type of each arg.\n // If the last argument is declared as variadic, then we need\n // a minimum number of args to be required. Otherwise it has to\n // be an exact amount.\n var pluralized;\n if (signature[signature.length - 1].variadic) {\n if (args.length < signature.length) {\n pluralized = signature.length === 1 ? \" argument\" : \" arguments\";\n throw new Error(\"ArgumentError: \" + name + \"() \" +\n \"takes at least\" + signature.length + pluralized +\n \" but received \" + args.length);\n }\n } else if (args.length !== signature.length) {\n pluralized = signature.length === 1 ? \" argument\" : \" arguments\";\n throw new Error(\"ArgumentError: \" + name + \"() \" +\n \"takes \" + signature.length + pluralized +\n \" but received \" + args.length);\n }\n var currentSpec;\n var actualType;\n var typeMatched;\n for (var i = 0; i < signature.length; i++) {\n typeMatched = false;\n currentSpec = signature[i].types;\n actualType = this._getTypeName(args[i]);\n for (var j = 0; j < currentSpec.length; j++) {\n if (this._typeMatches(actualType, currentSpec[j], args[i])) {\n typeMatched = true;\n break;\n }\n }\n if (!typeMatched) {\n throw new Error(\"TypeError: \" + name + \"() \" +\n \"expected argument \" + (i + 1) +\n \" to be type \" + currentSpec +\n \" but received type \" + actualType +\n \" instead.\");\n }\n }\n },\n\n _typeMatches: function(actual, expected, argValue) {\n if (expected === TYPE_ANY) {\n return true;\n }\n if (expected === TYPE_ARRAY_STRING ||\n expected === TYPE_ARRAY_NUMBER ||\n expected === TYPE_ARRAY) {\n // The expected type can either just be array,\n // or it can require a specific subtype (array of numbers).\n //\n // The simplest case is if \"array\" with no subtype is specified.\n if (expected === TYPE_ARRAY) {\n return actual === TYPE_ARRAY;\n } else if (actual === TYPE_ARRAY) {\n // Otherwise we need to check subtypes.\n // I think this has potential to be improved.\n var subtype;\n if (expected === TYPE_ARRAY_NUMBER) {\n subtype = TYPE_NUMBER;\n } else if (expected === TYPE_ARRAY_STRING) {\n subtype = TYPE_STRING;\n }\n for (var i = 0; i < argValue.length; i++) {\n if (!this._typeMatches(\n this._getTypeName(argValue[i]), subtype,\n argValue[i])) {\n return false;\n }\n }\n return true;\n }\n } else {\n return actual === expected;\n }\n },\n _getTypeName: function(obj) {\n switch (Object.prototype.toString.call(obj)) {\n case \"[object String]\":\n return TYPE_STRING;\n case \"[object Number]\":\n return TYPE_NUMBER;\n case \"[object Array]\":\n return TYPE_ARRAY;\n case \"[object Boolean]\":\n return TYPE_BOOLEAN;\n case \"[object Null]\":\n return TYPE_NULL;\n case \"[object Object]\":\n // Check if it's an expref. If it has, it's been\n // tagged with a jmespathType attr of 'Expref';\n if (obj.jmespathType === TOK_EXPREF) {\n return TYPE_EXPREF;\n } else {\n return TYPE_OBJECT;\n }\n }\n },\n\n _functionStartsWith: function(resolvedArgs) {\n return resolvedArgs[0].lastIndexOf(resolvedArgs[1]) === 0;\n },\n\n _functionEndsWith: function(resolvedArgs) {\n var searchStr = resolvedArgs[0];\n var suffix = resolvedArgs[1];\n return searchStr.indexOf(suffix, searchStr.length - suffix.length) !== -1;\n },\n\n _functionReverse: function(resolvedArgs) {\n var typeName = this._getTypeName(resolvedArgs[0]);\n if (typeName === TYPE_STRING) {\n var originalStr = resolvedArgs[0];\n var reversedStr = \"\";\n for (var i = originalStr.length - 1; i >= 0; i--) {\n reversedStr += originalStr[i];\n }\n return reversedStr;\n } else {\n var reversedArray = resolvedArgs[0].slice(0);\n reversedArray.reverse();\n return reversedArray;\n }\n },\n\n _functionAbs: function(resolvedArgs) {\n return Math.abs(resolvedArgs[0]);\n },\n\n _functionCeil: function(resolvedArgs) {\n return Math.ceil(resolvedArgs[0]);\n },\n\n _functionAvg: function(resolvedArgs) {\n var sum = 0;\n var inputArray = resolvedArgs[0];\n for (var i = 0; i < inputArray.length; i++) {\n sum += inputArray[i];\n }\n return sum / inputArray.length;\n },\n\n _functionContains: function(resolvedArgs) {\n return resolvedArgs[0].indexOf(resolvedArgs[1]) >= 0;\n },\n\n _functionFloor: function(resolvedArgs) {\n return Math.floor(resolvedArgs[0]);\n },\n\n _functionLength: function(resolvedArgs) {\n if (!isObject(resolvedArgs[0])) {\n return resolvedArgs[0].length;\n } else {\n // As far as I can tell, there's no way to get the length\n // of an object without O(n) iteration through the object.\n return Object.keys(resolvedArgs[0]).length;\n }\n },\n\n _functionMap: function(resolvedArgs) {\n var mapped = [];\n var interpreter = this._interpreter;\n var exprefNode = resolvedArgs[0];\n var elements = resolvedArgs[1];\n for (var i = 0; i < elements.length; i++) {\n mapped.push(interpreter.visit(exprefNode, elements[i]));\n }\n return mapped;\n },\n\n _functionMerge: function(resolvedArgs) {\n var merged = {};\n for (var i = 0; i < resolvedArgs.length; i++) {\n var current = resolvedArgs[i];\n for (var key in current) {\n merged[key] = current[key];\n }\n }\n return merged;\n },\n\n _functionMax: function(resolvedArgs) {\n if (resolvedArgs[0].length > 0) {\n var typeName = this._getTypeName(resolvedArgs[0][0]);\n if (typeName === TYPE_NUMBER) {\n return Math.max.apply(Math, resolvedArgs[0]);\n } else {\n var elements = resolvedArgs[0];\n var maxElement = elements[0];\n for (var i = 1; i < elements.length; i++) {\n if (maxElement.localeCompare(elements[i]) < 0) {\n maxElement = elements[i];\n }\n }\n return maxElement;\n }\n } else {\n return null;\n }\n },\n\n _functionMin: function(resolvedArgs) {\n if (resolvedArgs[0].length > 0) {\n var typeName = this._getTypeName(resolvedArgs[0][0]);\n if (typeName === TYPE_NUMBER) {\n return Math.min.apply(Math, resolvedArgs[0]);\n } else {\n var elements = resolvedArgs[0];\n var minElement = elements[0];\n for (var i = 1; i < elements.length; i++) {\n if (elements[i].localeCompare(minElement) < 0) {\n minElement = elements[i];\n }\n }\n return minElement;\n }\n } else {\n return null;\n }\n },\n\n _functionSum: function(resolvedArgs) {\n var sum = 0;\n var listToSum = resolvedArgs[0];\n for (var i = 0; i < listToSum.length; i++) {\n sum += listToSum[i];\n }\n return sum;\n },\n\n _functionType: function(resolvedArgs) {\n switch (this._getTypeName(resolvedArgs[0])) {\n case TYPE_NUMBER:\n return \"number\";\n case TYPE_STRING:\n return \"string\";\n case TYPE_ARRAY:\n return \"array\";\n case TYPE_OBJECT:\n return \"object\";\n case TYPE_BOOLEAN:\n return \"boolean\";\n case TYPE_EXPREF:\n return \"expref\";\n case TYPE_NULL:\n return \"null\";\n }\n },\n\n _functionKeys: function(resolvedArgs) {\n return Object.keys(resolvedArgs[0]);\n },\n\n _functionValues: function(resolvedArgs) {\n var obj = resolvedArgs[0];\n var keys = Object.keys(obj);\n var values = [];\n for (var i = 0; i < keys.length; i++) {\n values.push(obj[keys[i]]);\n }\n return values;\n },\n\n _functionJoin: function(resolvedArgs) {\n var joinChar = resolvedArgs[0];\n var listJoin = resolvedArgs[1];\n return listJoin.join(joinChar);\n },\n\n _functionToArray: function(resolvedArgs) {\n if (this._getTypeName(resolvedArgs[0]) === TYPE_ARRAY) {\n return resolvedArgs[0];\n } else {\n return [resolvedArgs[0]];\n }\n },\n\n _functionToString: function(resolvedArgs) {\n if (this._getTypeName(resolvedArgs[0]) === TYPE_STRING) {\n return resolvedArgs[0];\n } else {\n return JSON.stringify(resolvedArgs[0]);\n }\n },\n\n _functionToNumber: function(resolvedArgs) {\n var typeName = this._getTypeName(resolvedArgs[0]);\n var convertedValue;\n if (typeName === TYPE_NUMBER) {\n return resolvedArgs[0];\n } else if (typeName === TYPE_STRING) {\n convertedValue = +resolvedArgs[0];\n if (!isNaN(convertedValue)) {\n return convertedValue;\n }\n }\n return null;\n },\n\n _functionNotNull: function(resolvedArgs) {\n for (var i = 0; i < resolvedArgs.length; i++) {\n if (this._getTypeName(resolvedArgs[i]) !== TYPE_NULL) {\n return resolvedArgs[i];\n }\n }\n return null;\n },\n\n _functionSort: function(resolvedArgs) {\n var sortedArray = resolvedArgs[0].slice(0);\n sortedArray.sort();\n return sortedArray;\n },\n\n _functionSortBy: function(resolvedArgs) {\n var sortedArray = resolvedArgs[0].slice(0);\n if (sortedArray.length === 0) {\n return sortedArray;\n }\n var interpreter = this._interpreter;\n var exprefNode = resolvedArgs[1];\n var requiredType = this._getTypeName(\n interpreter.visit(exprefNode, sortedArray[0]));\n if ([TYPE_NUMBER, TYPE_STRING].indexOf(requiredType) < 0) {\n throw new Error(\"TypeError\");\n }\n var that = this;\n // In order to get a stable sort out of an unstable\n // sort algorithm, we decorate/sort/undecorate (DSU)\n // by creating a new list of [index, element] pairs.\n // In the cmp function, if the evaluated elements are\n // equal, then the index will be used as the tiebreaker.\n // After the decorated list has been sorted, it will be\n // undecorated to extract the original elements.\n var decorated = [];\n for (var i = 0; i < sortedArray.length; i++) {\n decorated.push([i, sortedArray[i]]);\n }\n decorated.sort(function(a, b) {\n var exprA = interpreter.visit(exprefNode, a[1]);\n var exprB = interpreter.visit(exprefNode, b[1]);\n if (that._getTypeName(exprA) !== requiredType) {\n throw new Error(\n \"TypeError: expected \" + requiredType + \", received \" +\n that._getTypeName(exprA));\n } else if (that._getTypeName(exprB) !== requiredType) {\n throw new Error(\n \"TypeError: expected \" + requiredType + \", received \" +\n that._getTypeName(exprB));\n }\n if (exprA > exprB) {\n return 1;\n } else if (exprA < exprB) {\n return -1;\n } else {\n // If they're equal compare the items by their\n // order to maintain relative order of equal keys\n // (i.e. to get a stable sort).\n return a[0] - b[0];\n }\n });\n // Undecorate: extract out the original list elements.\n for (var j = 0; j < decorated.length; j++) {\n sortedArray[j] = decorated[j][1];\n }\n return sortedArray;\n },\n\n _functionMaxBy: function(resolvedArgs) {\n var exprefNode = resolvedArgs[1];\n var resolvedArray = resolvedArgs[0];\n var keyFunction = this.createKeyFunction(exprefNode, [TYPE_NUMBER, TYPE_STRING]);\n var maxNumber = -Infinity;\n var maxRecord;\n var current;\n for (var i = 0; i < resolvedArray.length; i++) {\n current = keyFunction(resolvedArray[i]);\n if (current > maxNumber) {\n maxNumber = current;\n maxRecord = resolvedArray[i];\n }\n }\n return maxRecord;\n },\n\n _functionMinBy: function(resolvedArgs) {\n var exprefNode = resolvedArgs[1];\n var resolvedArray = resolvedArgs[0];\n var keyFunction = this.createKeyFunction(exprefNode, [TYPE_NUMBER, TYPE_STRING]);\n var minNumber = Infinity;\n var minRecord;\n var current;\n for (var i = 0; i < resolvedArray.length; i++) {\n current = keyFunction(resolvedArray[i]);\n if (current < minNumber) {\n minNumber = current;\n minRecord = resolvedArray[i];\n }\n }\n return minRecord;\n },\n\n createKeyFunction: function(exprefNode, allowedTypes) {\n var that = this;\n var interpreter = this._interpreter;\n var keyFunc = function(x) {\n var current = interpreter.visit(exprefNode, x);\n if (allowedTypes.indexOf(that._getTypeName(current)) < 0) {\n var msg = \"TypeError: expected one of \" + allowedTypes +\n \", received \" + that._getTypeName(current);\n throw new Error(msg);\n }\n return current;\n };\n return keyFunc;\n }\n\n };\n\n function compile(stream) {\n var parser = new Parser();\n var ast = parser.parse(stream);\n return ast;\n }\n\n function tokenize(stream) {\n var lexer = new Lexer();\n return lexer.tokenize(stream);\n }\n\n function search(data, expression) {\n var parser = new Parser();\n // This needs to be improved. Both the interpreter and runtime depend on\n // each other. The runtime needs the interpreter to support exprefs.\n // There's likely a clean way to avoid the cyclic dependency.\n var runtime = new Runtime();\n var interpreter = new TreeInterpreter(runtime);\n runtime._interpreter = interpreter;\n var node = parser.parse(expression);\n return interpreter.search(node, data);\n }\n\n exports.tokenize = tokenize;\n exports.compile = compile;\n exports.search = search;\n exports.strictDeepEqual = strictDeepEqual;\n})(typeof exports === \"undefined\" ? this.jmespath = {} : exports);\n","const CODES = {\n JOSEAlgNotWhitelisted: 'ERR_JOSE_ALG_NOT_WHITELISTED',\n JOSECritNotUnderstood: 'ERR_JOSE_CRIT_NOT_UNDERSTOOD',\n JOSEInvalidEncoding: 'ERR_JOSE_INVALID_ENCODING',\n JOSEMultiError: 'ERR_JOSE_MULTIPLE_ERRORS',\n JOSENotSupported: 'ERR_JOSE_NOT_SUPPORTED',\n JWEDecryptionFailed: 'ERR_JWE_DECRYPTION_FAILED',\n JWEInvalid: 'ERR_JWE_INVALID',\n JWKImportFailed: 'ERR_JWK_IMPORT_FAILED',\n JWKInvalid: 'ERR_JWK_INVALID',\n JWKKeySupport: 'ERR_JWK_KEY_SUPPORT',\n JWKSNoMatchingKey: 'ERR_JWKS_NO_MATCHING_KEY',\n JWSInvalid: 'ERR_JWS_INVALID',\n JWSVerificationFailed: 'ERR_JWS_VERIFICATION_FAILED',\n JWTClaimInvalid: 'ERR_JWT_CLAIM_INVALID',\n JWTExpired: 'ERR_JWT_EXPIRED',\n JWTMalformed: 'ERR_JWT_MALFORMED'\n}\n\nconst DEFAULT_MESSAGES = {\n JWEDecryptionFailed: 'decryption operation failed',\n JWEInvalid: 'JWE invalid',\n JWKSNoMatchingKey: 'no matching key found in the KeyStore',\n JWSInvalid: 'JWS invalid',\n JWSVerificationFailed: 'signature verification failed'\n}\n\nclass JOSEError extends Error {\n constructor (message) {\n super(message)\n if (message === undefined) {\n this.message = DEFAULT_MESSAGES[this.constructor.name]\n }\n this.name = this.constructor.name\n this.code = CODES[this.constructor.name]\n Error.captureStackTrace(this, this.constructor)\n }\n}\n\nconst isMulti = e => e instanceof JOSEMultiError\nclass JOSEMultiError extends JOSEError {\n constructor (errors) {\n super()\n let i\n while ((i = errors.findIndex(isMulti)) && i !== -1) {\n errors.splice(i, 1, ...errors[i])\n }\n Object.defineProperty(this, 'errors', { value: errors })\n }\n\n * [Symbol.iterator] () {\n for (const error of this.errors) {\n yield error\n }\n }\n}\nmodule.exports.JOSEError = JOSEError\n\nmodule.exports.JOSEAlgNotWhitelisted = class JOSEAlgNotWhitelisted extends JOSEError {}\nmodule.exports.JOSECritNotUnderstood = class JOSECritNotUnderstood extends JOSEError {}\nmodule.exports.JOSEInvalidEncoding = class JOSEInvalidEncoding extends JOSEError {}\nmodule.exports.JOSEMultiError = JOSEMultiError\nmodule.exports.JOSENotSupported = class JOSENotSupported extends JOSEError {}\n\nmodule.exports.JWEDecryptionFailed = class JWEDecryptionFailed extends JOSEError {}\nmodule.exports.JWEInvalid = class JWEInvalid extends JOSEError {}\n\nmodule.exports.JWKImportFailed = class JWKImportFailed extends JOSEError {}\nmodule.exports.JWKInvalid = class JWKInvalid extends JOSEError {}\nmodule.exports.JWKKeySupport = class JWKKeySupport extends JOSEError {}\n\nmodule.exports.JWKSNoMatchingKey = class JWKSNoMatchingKey extends JOSEError {}\n\nmodule.exports.JWSInvalid = class JWSInvalid extends JOSEError {}\nmodule.exports.JWSVerificationFailed = class JWSVerificationFailed extends JOSEError {}\n\nclass JWTClaimInvalid extends JOSEError {\n constructor (message, claim = 'unspecified', reason = 'unspecified') {\n super(message)\n this.claim = claim\n this.reason = reason\n }\n}\nmodule.exports.JWTClaimInvalid = JWTClaimInvalid\nmodule.exports.JWTExpired = class JWTExpired extends JWTClaimInvalid {}\nmodule.exports.JWTMalformed = class JWTMalformed extends JOSEError {}\n","const oids = require('./oids')\n\nmodule.exports = function () {\n this.seq().obj(\n this.key('algorithm').objid(oids),\n this.key('parameters').optional().choice({ namedCurve: this.objid(oids), null: this.null_() })\n )\n}\n","const oids = require('./oids')\n\nmodule.exports = function () {\n this.seq().obj(\n this.key('version').int(),\n this.key('privateKey').octstr(),\n this.key('parameters').explicit(0).optional().choice({ namedCurve: this.objid(oids) }),\n this.key('publicKey').explicit(1).optional().bitstr()\n )\n}\n","const asn1 = require('@panva/asn1.js')\n\nconst types = new Map()\n\nconst AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', require('./algorithm_identifier'))\ntypes.set('AlgorithmIdentifier', AlgorithmIdentifier)\n\nconst ECPrivateKey = asn1.define('ECPrivateKey', require('./ec_private_key'))\ntypes.set('ECPrivateKey', ECPrivateKey)\n\nconst PrivateKeyInfo = asn1.define('PrivateKeyInfo', require('./private_key_info')(AlgorithmIdentifier))\ntypes.set('PrivateKeyInfo', PrivateKeyInfo)\n\nconst PublicKeyInfo = asn1.define('PublicKeyInfo', require('./public_key_info')(AlgorithmIdentifier))\ntypes.set('PublicKeyInfo', PublicKeyInfo)\n\nconst PrivateKey = asn1.define('PrivateKey', require('./private_key'))\ntypes.set('PrivateKey', PrivateKey)\n\nconst OneAsymmetricKey = asn1.define('OneAsymmetricKey', require('./one_asymmetric_key')(AlgorithmIdentifier, PrivateKey))\ntypes.set('OneAsymmetricKey', OneAsymmetricKey)\n\nconst RSAPrivateKey = asn1.define('RSAPrivateKey', require('./rsa_private_key'))\ntypes.set('RSAPrivateKey', RSAPrivateKey)\n\nconst RSAPublicKey = asn1.define('RSAPublicKey', require('./rsa_public_key'))\ntypes.set('RSAPublicKey', RSAPublicKey)\n\nmodule.exports = types\n","const { name: secp256k1 } = require('../../jwk/key/secp256k1_crv')\n\nconst oids = {\n '1 2 840 10045 3 1 7': 'P-256',\n '1 3 132 0 10': secp256k1,\n '1 3 132 0 34': 'P-384',\n '1 3 132 0 35': 'P-521',\n '1 2 840 10045 2 1': 'ecPublicKey',\n '1 2 840 113549 1 1 1': 'rsaEncryption',\n '1 3 101 110': 'X25519',\n '1 3 101 111': 'X448',\n '1 3 101 112': 'Ed25519',\n '1 3 101 113': 'Ed448'\n}\n\nmodule.exports = oids\n","module.exports = (AlgorithmIdentifier, PrivateKey) => function () {\n this.seq().obj(\n this.key('version').int(),\n this.key('algorithm').use(AlgorithmIdentifier),\n this.key('privateKey').use(PrivateKey)\n )\n}\n","module.exports = function () {\n this.octstr().contains().obj(\n this.key('privateKey').octstr()\n )\n}\n","module.exports = (AlgorithmIdentifier) => function () {\n this.seq().obj(\n this.key('version').int(),\n this.key('algorithm').use(AlgorithmIdentifier),\n this.key('privateKey').octstr()\n )\n}\n","module.exports = AlgorithmIdentifier => function () {\n this.seq().obj(\n this.key('algorithm').use(AlgorithmIdentifier),\n this.key('publicKey').bitstr()\n )\n}\n","module.exports = function () {\n this.seq().obj(\n this.key('version').int({ 0: 'two-prime', 1: 'multi' }),\n this.key('n').int(),\n this.key('e').int(),\n this.key('d').int(),\n this.key('p').int(),\n this.key('q').int(),\n this.key('dp').int(),\n this.key('dq').int(),\n this.key('qi').int()\n )\n}\n","module.exports = function () {\n this.seq().obj(\n this.key('n').int(),\n this.key('e').int()\n )\n}\n","/* global BigInt */\n\nconst fromBase64 = (base64) => {\n return base64.replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_')\n}\n\nconst encode = (input, encoding = 'utf8') => {\n return fromBase64(Buffer.from(input, encoding).toString('base64'))\n}\n\nconst encodeBuffer = (buf) => {\n return fromBase64(buf.toString('base64'))\n}\n\nconst decodeToBuffer = (input) => {\n return Buffer.from(input, 'base64')\n}\n\nconst decode = (input, encoding = 'utf8') => {\n return decodeToBuffer(input).toString(encoding)\n}\n\nconst b64uJSON = {\n encode: (input) => {\n return encode(JSON.stringify(input))\n },\n decode: (input, encoding = 'utf8') => {\n return JSON.parse(decode(input, encoding))\n }\n}\n\nb64uJSON.decode.try = (input, encoding = 'utf8') => {\n try {\n return b64uJSON.decode(input, encoding)\n } catch (err) {\n return decode(input, encoding)\n }\n}\n\nconst bnToBuf = (bn) => {\n let hex = BigInt(bn).toString(16)\n if (hex.length % 2) {\n hex = `0${hex}`\n }\n\n const len = hex.length / 2\n const u8 = new Uint8Array(len)\n\n let i = 0\n let j = 0\n while (i < len) {\n u8[i] = parseInt(hex.slice(j, j + 2), 16)\n i += 1\n j += 2\n }\n\n return u8\n}\n\nconst encodeBigInt = (bn) => encodeBuffer(Buffer.from(bnToBuf(bn)))\n\nmodule.exports.decode = decode\nmodule.exports.decodeToBuffer = decodeToBuffer\nmodule.exports.encode = encode\nmodule.exports.encodeBuffer = encodeBuffer\nmodule.exports.JSON = b64uJSON\nmodule.exports.encodeBigInt = encodeBigInt\n","module.exports.KEYOBJECT = Symbol('KEYOBJECT')\nmodule.exports.PRIVATE_MEMBERS = Symbol('PRIVATE_MEMBERS')\nmodule.exports.PUBLIC_MEMBERS = Symbol('PUBLIC_MEMBERS')\nmodule.exports.THUMBPRINT_MATERIAL = Symbol('THUMBPRINT_MATERIAL')\nmodule.exports.JWK_MEMBERS = Symbol('JWK_MEMBERS')\nmodule.exports.KEY_MANAGEMENT_ENCRYPT = Symbol('KEY_MANAGEMENT_ENCRYPT')\nmodule.exports.KEY_MANAGEMENT_DECRYPT = Symbol('KEY_MANAGEMENT_DECRYPT')\n\nconst USES_MAPPING = {\n sig: new Set(['sign', 'verify']),\n enc: new Set(['encrypt', 'decrypt', 'wrapKey', 'unwrapKey', 'deriveKey'])\n}\nconst OPS = new Set([...USES_MAPPING.sig, ...USES_MAPPING.enc])\nconst USES = new Set(Object.keys(USES_MAPPING))\n\nmodule.exports.USES_MAPPING = USES_MAPPING\nmodule.exports.OPS = OPS\nmodule.exports.USES = USES\n","module.exports = obj => JSON.parse(JSON.stringify(obj))\n","const MAX_OCTET = 0x80\nconst CLASS_UNIVERSAL = 0\nconst PRIMITIVE_BIT = 0x20\nconst TAG_SEQ = 0x10\nconst TAG_INT = 0x02\nconst ENCODED_TAG_SEQ = (TAG_SEQ | PRIMITIVE_BIT) | (CLASS_UNIVERSAL << 6)\nconst ENCODED_TAG_INT = TAG_INT | (CLASS_UNIVERSAL << 6)\n\nconst getParamSize = keySize => ((keySize / 8) | 0) + (keySize % 8 === 0 ? 0 : 1)\n\nconst paramBytesForAlg = {\n ES256: getParamSize(256),\n ES256K: getParamSize(256),\n ES384: getParamSize(384),\n ES512: getParamSize(521)\n}\n\nconst countPadding = (buf, start, stop) => {\n let padding = 0\n while (start + padding < stop && buf[start + padding] === 0) {\n ++padding\n }\n\n const needsSign = buf[start + padding] >= MAX_OCTET\n if (needsSign) {\n --padding\n }\n\n return padding\n}\n\nmodule.exports.derToJose = (signature, alg) => {\n if (!Buffer.isBuffer(signature)) {\n throw new TypeError('ECDSA signature must be a Buffer')\n }\n\n if (!paramBytesForAlg[alg]) {\n throw new Error(`Unknown algorithm \"${alg}\"`)\n }\n\n const paramBytes = paramBytesForAlg[alg]\n\n // the DER encoded param should at most be the param size, plus a padding\n // zero, since due to being a signed integer\n const maxEncodedParamLength = paramBytes + 1\n\n const inputLength = signature.length\n\n let offset = 0\n if (signature[offset++] !== ENCODED_TAG_SEQ) {\n throw new Error('Could not find expected \"seq\"')\n }\n\n let seqLength = signature[offset++]\n if (seqLength === (MAX_OCTET | 1)) {\n seqLength = signature[offset++]\n }\n\n if (inputLength - offset < seqLength) {\n throw new Error(`\"seq\" specified length of ${seqLength}\", only ${inputLength - offset}\" remaining`)\n }\n\n if (signature[offset++] !== ENCODED_TAG_INT) {\n throw new Error('Could not find expected \"int\" for \"r\"')\n }\n\n const rLength = signature[offset++]\n\n if (inputLength - offset - 2 < rLength) {\n throw new Error(`\"r\" specified length of \"${rLength}\", only \"${inputLength - offset - 2}\" available`)\n }\n\n if (maxEncodedParamLength < rLength) {\n throw new Error(`\"r\" specified length of \"${rLength}\", max of \"${maxEncodedParamLength}\" is acceptable`)\n }\n\n const rOffset = offset\n offset += rLength\n\n if (signature[offset++] !== ENCODED_TAG_INT) {\n throw new Error('Could not find expected \"int\" for \"s\"')\n }\n\n const sLength = signature[offset++]\n\n if (inputLength - offset !== sLength) {\n throw new Error(`\"s\" specified length of \"${sLength}\", expected \"${inputLength - offset}\"`)\n }\n\n if (maxEncodedParamLength < sLength) {\n throw new Error(`\"s\" specified length of \"${sLength}\", max of \"${maxEncodedParamLength}\" is acceptable`)\n }\n\n const sOffset = offset\n offset += sLength\n\n if (offset !== inputLength) {\n throw new Error(`Expected to consume entire buffer, but \"${inputLength - offset}\" bytes remain`)\n }\n\n const rPadding = paramBytes - rLength\n\n const sPadding = paramBytes - sLength\n\n const dst = Buffer.allocUnsafe(rPadding + rLength + sPadding + sLength)\n\n for (offset = 0; offset < rPadding; ++offset) {\n dst[offset] = 0\n }\n signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength)\n\n offset = paramBytes\n\n for (const o = offset; offset < o + sPadding; ++offset) {\n dst[offset] = 0\n }\n signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength)\n\n return dst\n}\n\nmodule.exports.joseToDer = (signature, alg) => {\n if (!Buffer.isBuffer(signature)) {\n throw new TypeError('ECDSA signature must be a Buffer')\n }\n\n if (!paramBytesForAlg[alg]) {\n throw new TypeError(`Unknown algorithm \"${alg}\"`)\n }\n\n const paramBytes = paramBytesForAlg[alg]\n\n const signatureBytes = signature.length\n if (signatureBytes !== paramBytes * 2) {\n throw new Error(`\"${alg}\" signatures must be \"${paramBytes * 2}\" bytes, saw \"${signatureBytes}\"`)\n }\n\n const rPadding = countPadding(signature, 0, paramBytes)\n const sPadding = countPadding(signature, paramBytes, signature.length)\n const rLength = paramBytes - rPadding\n const sLength = paramBytes - sPadding\n\n const rsBytes = 1 + 1 + rLength + 1 + 1 + sLength\n\n const shortLength = rsBytes < MAX_OCTET\n\n const dst = Buffer.allocUnsafe((shortLength ? 2 : 3) + rsBytes)\n\n let offset = 0\n dst[offset++] = ENCODED_TAG_SEQ\n if (shortLength) {\n // Bit 8 has value \"0\"\n // bits 7-1 give the length.\n dst[offset++] = rsBytes\n } else {\n // Bit 8 of first octet has value \"1\"\n // bits 7-1 give the number of additional length octets.\n dst[offset++] = MAX_OCTET\t| 1 // eslint-disable-line no-tabs\n // length, base 256\n dst[offset++] = rsBytes & 0xff\n }\n dst[offset++] = ENCODED_TAG_INT\n dst[offset++] = rLength\n if (rPadding < 0) {\n dst[offset++] = 0\n offset += signature.copy(dst, offset, 0, paramBytes)\n } else {\n offset += signature.copy(dst, offset, rPadding, paramBytes)\n }\n dst[offset++] = ENCODED_TAG_INT\n dst[offset++] = sLength\n if (sPadding < 0) {\n dst[offset++] = 0\n signature.copy(dst, offset, paramBytes)\n } else {\n signature.copy(dst, offset, paramBytes + sPadding)\n }\n\n return dst\n}\n","module.exports = (date) => Math.floor(date.getTime() / 1000)\n","const { randomBytes } = require('crypto')\n\nconst { IVLENGTHS } = require('../registry')\n\nmodule.exports = alg => randomBytes(IVLENGTHS.get(alg) / 8)\n","const errors = require('../errors')\nconst Key = require('../jwk/key/base')\nconst importKey = require('../jwk/import')\nconst { KeyStore } = require('../jwks/keystore')\n\nmodule.exports = (input, keyStoreAllowed = false) => {\n if (input instanceof Key) {\n return input\n }\n\n if (input instanceof KeyStore) {\n if (!keyStoreAllowed) {\n throw new TypeError('key argument for this operation must not be a JWKS.KeyStore instance')\n }\n\n return input\n }\n\n try {\n return importKey(input)\n } catch (err) {\n if (err instanceof errors.JOSEError && !(err instanceof errors.JWKImportFailed)) {\n throw err\n }\n\n let msg\n if (keyStoreAllowed) {\n msg = 'key must be an instance of a key instantiated by JWK.asKey, a valid JWK.asKey input, or a JWKS.KeyStore instance'\n } else {\n msg = 'key must be an instance of a key instantiated by JWK.asKey, or a valid JWK.asKey input'\n }\n\n throw new TypeError(msg)\n }\n}\n","module.exports = (a = {}, b = {}) => {\n const keysA = Object.keys(a)\n const keysB = new Set(Object.keys(b))\n return !keysA.some((ka) => keysB.has(ka))\n}\n","module.exports = a => !!a && a.constructor === Object\n","/* global BigInt */\n\nconst { keyObjectSupported } = require('./runtime_support')\n\nlet createPublicKey\nlet createPrivateKey\nlet createSecretKey\nlet KeyObject\nlet asInput\n\nif (keyObjectSupported) {\n ({ createPublicKey, createPrivateKey, createSecretKey, KeyObject } = require('crypto'))\n asInput = (input) => input\n} else {\n const { EOL } = require('os')\n\n const errors = require('../errors')\n const isObject = require('./is_object')\n const asn1 = require('./asn1')\n const toInput = Symbol('toInput')\n\n const namedCurve = Symbol('namedCurve')\n\n asInput = (keyObject, needsPublic) => {\n if (keyObject instanceof KeyObject) {\n return keyObject[toInput](needsPublic)\n }\n\n return createSecretKey(keyObject)[toInput](needsPublic)\n }\n\n const pemToDer = pem => Buffer.from(pem.replace(/(?:-----(?:BEGIN|END)(?: (?:RSA|EC))? (?:PRIVATE|PUBLIC) KEY-----|\\s)/g, ''), 'base64')\n const derToPem = (der, label) => `-----BEGIN ${label}-----${EOL}${(der.toString('base64').match(/.{1,64}/g) || []).join(EOL)}${EOL}-----END ${label}-----`\n const unsupported = (input) => {\n const label = typeof input === 'string' ? input : `OID ${input.join('.')}`\n throw new errors.JOSENotSupported(`${label} is not supported in your Node.js runtime version`)\n }\n\n KeyObject = class KeyObject {\n export ({ cipher, passphrase, type, format } = {}) {\n if (this._type === 'secret') {\n return this._buffer\n }\n\n if (this._type === 'public') {\n if (this.asymmetricKeyType === 'rsa') {\n switch (type) {\n case 'pkcs1':\n if (format === 'pem') {\n return this._pem\n }\n\n return pemToDer(this._pem)\n case 'spki': {\n const PublicKeyInfo = asn1.get('PublicKeyInfo')\n const pem = PublicKeyInfo.encode({\n algorithm: {\n algorithm: 'rsaEncryption',\n parameters: { type: 'null' }\n },\n publicKey: {\n unused: 0,\n data: pemToDer(this._pem)\n }\n }, 'pem', { label: 'PUBLIC KEY' })\n\n return format === 'pem' ? pem : pemToDer(pem)\n }\n default:\n throw new TypeError(`The value ${type} is invalid for option \"type\"`)\n }\n }\n\n if (this.asymmetricKeyType === 'ec') {\n if (type !== 'spki') {\n throw new TypeError(`The value ${type} is invalid for option \"type\"`)\n }\n\n if (format === 'pem') {\n return this._pem\n }\n\n return pemToDer(this._pem)\n }\n }\n\n if (this._type === 'private') {\n if (passphrase !== undefined || cipher !== undefined) {\n throw new errors.JOSENotSupported('encrypted private keys are not supported in your Node.js runtime version')\n }\n\n if (type === 'pkcs8') {\n if (this._pkcs8) {\n if (format === 'der' && typeof this._pkcs8 === 'string') {\n return pemToDer(this._pkcs8)\n }\n\n if (format === 'pem' && Buffer.isBuffer(this._pkcs8)) {\n return derToPem(this._pkcs8, 'PRIVATE KEY')\n }\n\n return this._pkcs8\n }\n\n if (this.asymmetricKeyType === 'rsa') {\n const parsed = this._asn1\n const RSAPrivateKey = asn1.get('RSAPrivateKey')\n const privateKey = RSAPrivateKey.encode(parsed)\n const PrivateKeyInfo = asn1.get('PrivateKeyInfo')\n const pkcs8 = PrivateKeyInfo.encode({\n version: 0,\n privateKey,\n algorithm: {\n algorithm: 'rsaEncryption',\n parameters: { type: 'null' }\n }\n })\n\n this._pkcs8 = pkcs8\n\n return this.export({ type, format })\n }\n\n if (this.asymmetricKeyType === 'ec') {\n const parsed = this._asn1\n const ECPrivateKey = asn1.get('ECPrivateKey')\n const privateKey = ECPrivateKey.encode({\n version: parsed.version,\n privateKey: parsed.privateKey,\n publicKey: parsed.publicKey\n })\n const PrivateKeyInfo = asn1.get('PrivateKeyInfo')\n const pkcs8 = PrivateKeyInfo.encode({\n version: 0,\n privateKey,\n algorithm: {\n algorithm: 'ecPublicKey',\n parameters: this._asn1.parameters\n }\n })\n\n this._pkcs8 = pkcs8\n\n return this.export({ type, format })\n }\n }\n\n if (this.asymmetricKeyType === 'rsa' && type === 'pkcs1') {\n if (format === 'pem') {\n return this._pem\n }\n\n return pemToDer(this._pem)\n } else if (this.asymmetricKeyType === 'ec' && type === 'sec1') {\n if (format === 'pem') {\n return this._pem\n }\n\n return pemToDer(this._pem)\n } else {\n throw new TypeError(`The value ${type} is invalid for option \"type\"`)\n }\n }\n }\n\n get type () {\n return this._type\n }\n\n get asymmetricKeyType () {\n return this._asymmetricKeyType\n }\n\n get symmetricKeySize () {\n return this._symmetricKeySize\n }\n\n [toInput] (needsPublic) {\n switch (this._type) {\n case 'secret':\n return this._buffer\n case 'public':\n return this._pem\n default:\n if (needsPublic) {\n if (!('_pub' in this)) {\n this._pub = createPublicKey(this)\n }\n\n return this._pub[toInput](false)\n }\n\n return this._pem\n }\n }\n }\n\n createSecretKey = (buffer) => {\n if (!Buffer.isBuffer(buffer) || !buffer.length) {\n throw new TypeError('input must be a non-empty Buffer instance')\n }\n\n const keyObject = new KeyObject()\n keyObject._buffer = Buffer.from(buffer)\n keyObject._symmetricKeySize = buffer.length\n keyObject._type = 'secret'\n\n return keyObject\n }\n\n createPublicKey = (input) => {\n if (input instanceof KeyObject) {\n if (input.type !== 'private') {\n throw new TypeError(`Invalid key object type ${input.type}, expected private.`)\n }\n\n switch (input.asymmetricKeyType) {\n case 'ec': {\n const PublicKeyInfo = asn1.get('PublicKeyInfo')\n const key = PublicKeyInfo.encode({\n algorithm: {\n algorithm: 'ecPublicKey',\n parameters: input._asn1.parameters\n },\n publicKey: input._asn1.publicKey\n })\n\n return createPublicKey({ key, format: 'der', type: 'spki' })\n }\n case 'rsa': {\n const RSAPublicKey = asn1.get('RSAPublicKey')\n const key = RSAPublicKey.encode(input._asn1)\n return createPublicKey({ key, format: 'der', type: 'pkcs1' })\n }\n }\n }\n\n if (typeof input === 'string' || Buffer.isBuffer(input)) {\n input = { key: input, format: 'pem' }\n }\n\n if (!isObject(input)) {\n throw new TypeError('input must be a string, Buffer or an object')\n }\n\n const { format, passphrase } = input\n let { key, type } = input\n\n if (typeof key !== 'string' && !Buffer.isBuffer(key)) {\n throw new TypeError('key must be a string or Buffer')\n }\n\n if (format !== 'pem' && format !== 'der') {\n throw new TypeError('format must be one of \"pem\" or \"der\"')\n }\n\n let label\n if (format === 'pem') {\n key = key.toString()\n switch (key.split(/\\r?\\n/g)[0].toString()) {\n case '-----BEGIN PUBLIC KEY-----':\n type = 'spki'\n label = 'PUBLIC KEY'\n break\n case '-----BEGIN RSA PUBLIC KEY-----':\n type = 'pkcs1'\n label = 'RSA PUBLIC KEY'\n break\n case '-----BEGIN CERTIFICATE-----':\n throw new errors.JOSENotSupported('X.509 certificates are not supported in your Node.js runtime version')\n case '-----BEGIN PRIVATE KEY-----':\n case '-----BEGIN EC PRIVATE KEY-----':\n case '-----BEGIN RSA PRIVATE KEY-----':\n return createPublicKey(createPrivateKey(key))\n default:\n throw new TypeError('unknown/unsupported PEM type')\n }\n }\n\n switch (type) {\n case 'spki': {\n const PublicKeyInfo = asn1.get('PublicKeyInfo')\n const parsed = PublicKeyInfo.decode(key, format, { label })\n\n let type, keyObject\n switch (parsed.algorithm.algorithm) {\n case 'ecPublicKey': {\n keyObject = new KeyObject()\n keyObject._asn1 = parsed\n keyObject._asymmetricKeyType = 'ec'\n keyObject._type = 'public'\n keyObject._pem = PublicKeyInfo.encode(parsed, 'pem', { label: 'PUBLIC KEY' })\n\n break\n }\n case 'rsaEncryption': {\n type = 'pkcs1'\n keyObject = createPublicKey({ type, key: parsed.publicKey.data, format: 'der' })\n break\n }\n default:\n unsupported(parsed.algorithm.algorithm)\n }\n\n return keyObject\n }\n case 'pkcs1': {\n const RSAPublicKey = asn1.get('RSAPublicKey')\n const parsed = RSAPublicKey.decode(key, format, { label })\n\n // special case when private pkcs1 PEM / DER is used with createPublicKey\n if (parsed.n === BigInt(0)) {\n return createPublicKey(createPrivateKey({ key, format, type, passphrase }))\n }\n\n const keyObject = new KeyObject()\n keyObject._asn1 = parsed\n keyObject._asymmetricKeyType = 'rsa'\n keyObject._type = 'public'\n keyObject._pem = RSAPublicKey.encode(parsed, 'pem', { label: 'RSA PUBLIC KEY' })\n\n return keyObject\n }\n case 'pkcs8':\n case 'sec1':\n return createPublicKey(createPrivateKey({ format, key, type, passphrase }))\n default:\n throw new TypeError(`The value ${type} is invalid for option \"type\"`)\n }\n }\n\n createPrivateKey = (input, hints) => {\n if (typeof input === 'string' || Buffer.isBuffer(input)) {\n input = { key: input, format: 'pem' }\n }\n\n if (!isObject(input)) {\n throw new TypeError('input must be a string, Buffer or an object')\n }\n\n const { format, passphrase } = input\n let { key, type } = input\n\n if (typeof key !== 'string' && !Buffer.isBuffer(key)) {\n throw new TypeError('key must be a string or Buffer')\n }\n\n if (passphrase !== undefined) {\n throw new errors.JOSENotSupported('encrypted private keys are not supported in your Node.js runtime version')\n }\n\n if (format !== 'pem' && format !== 'der') {\n throw new TypeError('format must be one of \"pem\" or \"der\"')\n }\n\n let label\n if (format === 'pem') {\n key = key.toString()\n switch (key.split(/\\r?\\n/g)[0].toString()) {\n case '-----BEGIN PRIVATE KEY-----':\n type = 'pkcs8'\n label = 'PRIVATE KEY'\n break\n case '-----BEGIN EC PRIVATE KEY-----':\n type = 'sec1'\n label = 'EC PRIVATE KEY'\n break\n case '-----BEGIN RSA PRIVATE KEY-----':\n type = 'pkcs1'\n label = 'RSA PRIVATE KEY'\n break\n default:\n throw new TypeError('unknown/unsupported PEM type')\n }\n }\n\n switch (type) {\n case 'pkcs8': {\n const PrivateKeyInfo = asn1.get('PrivateKeyInfo')\n const parsed = PrivateKeyInfo.decode(key, format, { label })\n\n let type, keyObject\n switch (parsed.algorithm.algorithm) {\n case 'ecPublicKey': {\n type = 'sec1'\n keyObject = createPrivateKey({ type, key: parsed.privateKey, format: 'der' }, { [namedCurve]: parsed.algorithm.parameters.value })\n break\n }\n case 'rsaEncryption': {\n type = 'pkcs1'\n keyObject = createPrivateKey({ type, key: parsed.privateKey, format: 'der' })\n break\n }\n default:\n unsupported(parsed.algorithm.algorithm)\n }\n\n keyObject._pkcs8 = key\n return keyObject\n }\n case 'pkcs1': {\n const RSAPrivateKey = asn1.get('RSAPrivateKey')\n const parsed = RSAPrivateKey.decode(key, format, { label })\n\n const keyObject = new KeyObject()\n keyObject._asn1 = parsed\n keyObject._asymmetricKeyType = 'rsa'\n keyObject._type = 'private'\n keyObject._pem = RSAPrivateKey.encode(parsed, 'pem', { label: 'RSA PRIVATE KEY' })\n\n return keyObject\n }\n case 'sec1': {\n const ECPrivateKey = asn1.get('ECPrivateKey')\n let parsed = ECPrivateKey.decode(key, format, { label })\n\n if (!('parameters' in parsed) && !hints[namedCurve]) {\n throw new Error('invalid sec1')\n } else if (!('parameters' in parsed)) {\n parsed = { ...parsed, parameters: { type: 'namedCurve', value: hints[namedCurve] } }\n }\n\n const keyObject = new KeyObject()\n keyObject._asn1 = parsed\n keyObject._asymmetricKeyType = 'ec'\n keyObject._type = 'private'\n keyObject._pem = ECPrivateKey.encode(parsed, 'pem', { label: 'EC PRIVATE KEY' })\n\n return keyObject\n }\n default:\n throw new TypeError(`The value ${type} is invalid for option \"type\"`)\n }\n }\n}\n\nmodule.exports = { createPublicKey, createPrivateKey, createSecretKey, KeyObject, asInput }\n","/* global BigInt */\n\nconst { EOL } = require('os')\n\nconst errors = require('../errors')\n\nconst { keyObjectSupported } = require('./runtime_support')\nconst { createPublicKey } = require('./key_object')\nconst base64url = require('./base64url')\nconst asn1 = require('./asn1')\nconst computePrimes = require('./rsa_primes')\nconst { OKP_CURVES, EC_CURVES } = require('../registry')\n\nconst formatPem = (base64pem, descriptor) => `-----BEGIN ${descriptor} KEY-----${EOL}${(base64pem.match(/.{1,64}/g) || []).join(EOL)}${EOL}-----END ${descriptor} KEY-----`\n\nconst okpToJWK = {\n private (crv, keyObject) {\n const der = keyObject.export({ type: 'pkcs8', format: 'der' })\n const OneAsymmetricKey = asn1.get('OneAsymmetricKey')\n const { privateKey: { privateKey: d } } = OneAsymmetricKey.decode(der)\n\n return {\n ...okpToJWK.public(crv, createPublicKey(keyObject)),\n d: base64url.encodeBuffer(d)\n }\n },\n public (crv, keyObject) {\n const der = keyObject.export({ type: 'spki', format: 'der' })\n\n const PublicKeyInfo = asn1.get('PublicKeyInfo')\n\n const { publicKey: { data: x } } = PublicKeyInfo.decode(der)\n\n return {\n kty: 'OKP',\n crv,\n x: base64url.encodeBuffer(x)\n }\n }\n}\n\nconst keyObjectToJWK = {\n rsa: {\n private (keyObject) {\n const der = keyObject.export({ type: 'pkcs8', format: 'der' })\n\n const PrivateKeyInfo = asn1.get('PrivateKeyInfo')\n const RSAPrivateKey = asn1.get('RSAPrivateKey')\n\n const { privateKey } = PrivateKeyInfo.decode(der)\n const { version, n, e, d, p, q, dp, dq, qi } = RSAPrivateKey.decode(privateKey)\n\n if (version !== 'two-prime') {\n throw new errors.JOSENotSupported('Private RSA keys with more than two primes are not supported')\n }\n\n return {\n kty: 'RSA',\n n: base64url.encodeBigInt(n),\n e: base64url.encodeBigInt(e),\n d: base64url.encodeBigInt(d),\n p: base64url.encodeBigInt(p),\n q: base64url.encodeBigInt(q),\n dp: base64url.encodeBigInt(dp),\n dq: base64url.encodeBigInt(dq),\n qi: base64url.encodeBigInt(qi)\n }\n },\n public (keyObject) {\n const der = keyObject.export({ type: 'spki', format: 'der' })\n\n const PublicKeyInfo = asn1.get('PublicKeyInfo')\n const RSAPublicKey = asn1.get('RSAPublicKey')\n\n const { publicKey: { data: publicKey } } = PublicKeyInfo.decode(der)\n const { n, e } = RSAPublicKey.decode(publicKey)\n\n return {\n kty: 'RSA',\n n: base64url.encodeBigInt(n),\n e: base64url.encodeBigInt(e)\n }\n }\n },\n ec: {\n private (keyObject) {\n const der = keyObject.export({ type: 'pkcs8', format: 'der' })\n\n const PrivateKeyInfo = asn1.get('PrivateKeyInfo')\n const ECPrivateKey = asn1.get('ECPrivateKey')\n\n const { privateKey, algorithm: { parameters: { value: crv } } } = PrivateKeyInfo.decode(der)\n const { privateKey: d, publicKey } = ECPrivateKey.decode(privateKey)\n\n if (typeof publicKey === 'undefined') {\n if (keyObjectSupported) {\n return {\n ...keyObjectToJWK.ec.public(createPublicKey(keyObject)),\n d: base64url.encodeBuffer(d)\n }\n }\n\n throw new errors.JOSENotSupported('Private EC keys without the public key embedded are not supported in your Node.js runtime version')\n }\n\n const x = publicKey.data.slice(1, ((publicKey.data.length - 1) / 2) + 1)\n const y = publicKey.data.slice(((publicKey.data.length - 1) / 2) + 1)\n\n return {\n kty: 'EC',\n crv,\n d: base64url.encodeBuffer(d),\n x: base64url.encodeBuffer(x),\n y: base64url.encodeBuffer(y)\n }\n },\n public (keyObject) {\n const der = keyObject.export({ type: 'spki', format: 'der' })\n\n const PublicKeyInfo = asn1.get('PublicKeyInfo')\n\n const { publicKey: { data: publicKey }, algorithm: { parameters: { value: crv } } } = PublicKeyInfo.decode(der)\n\n const x = publicKey.slice(1, ((publicKey.length - 1) / 2) + 1)\n const y = publicKey.slice(((publicKey.length - 1) / 2) + 1)\n\n return {\n kty: 'EC',\n crv,\n x: base64url.encodeBuffer(x),\n y: base64url.encodeBuffer(y)\n }\n }\n },\n ed25519: {\n private (keyObject) {\n return okpToJWK.private('Ed25519', keyObject)\n },\n public (keyObject) {\n return okpToJWK.public('Ed25519', keyObject)\n }\n },\n ed448: {\n private (keyObject) {\n return okpToJWK.private('Ed448', keyObject)\n },\n public (keyObject) {\n return okpToJWK.public('Ed448', keyObject)\n }\n },\n x25519: {\n private (keyObject) {\n return okpToJWK.private('X25519', keyObject)\n },\n public (keyObject) {\n return okpToJWK.public('X25519', keyObject)\n }\n },\n x448: {\n private (keyObject) {\n return okpToJWK.private('X448', keyObject)\n },\n public (keyObject) {\n return okpToJWK.public('X448', keyObject)\n }\n }\n}\n\nmodule.exports.keyObjectToJWK = (keyObject) => {\n if (keyObject.type === 'private') {\n return keyObjectToJWK[keyObject.asymmetricKeyType].private(keyObject)\n }\n\n return keyObjectToJWK[keyObject.asymmetricKeyType].public(keyObject)\n}\n\nconst concatEcPublicKey = (x, y) => ({\n unused: 0,\n data: Buffer.concat([\n Buffer.alloc(1, 4),\n base64url.decodeToBuffer(x),\n base64url.decodeToBuffer(y)\n ])\n})\n\nconst jwkToPem = {\n RSA: {\n private (jwk, { calculateMissingRSAPrimes }) {\n const RSAPrivateKey = asn1.get('RSAPrivateKey')\n\n if ('oth' in jwk) {\n throw new errors.JOSENotSupported('Private RSA keys with more than two primes are not supported')\n }\n\n if (jwk.p || jwk.q || jwk.dp || jwk.dq || jwk.qi) {\n if (!(jwk.p && jwk.q && jwk.dp && jwk.dq && jwk.qi)) {\n throw new errors.JWKInvalid('all other private key parameters must be present when any one of them is present')\n }\n } else if (calculateMissingRSAPrimes) {\n jwk = computePrimes(jwk)\n } else if (!calculateMissingRSAPrimes) {\n throw new errors.JOSENotSupported('importing private RSA keys without all other private key parameters is not enabled, see documentation and its advisory on how and when its ok to enable it')\n }\n\n return RSAPrivateKey.encode({\n version: 0,\n n: BigInt(`0x${base64url.decodeToBuffer(jwk.n).toString('hex')}`),\n e: BigInt(`0x${base64url.decodeToBuffer(jwk.e).toString('hex')}`),\n d: BigInt(`0x${base64url.decodeToBuffer(jwk.d).toString('hex')}`),\n p: BigInt(`0x${base64url.decodeToBuffer(jwk.p).toString('hex')}`),\n q: BigInt(`0x${base64url.decodeToBuffer(jwk.q).toString('hex')}`),\n dp: BigInt(`0x${base64url.decodeToBuffer(jwk.dp).toString('hex')}`),\n dq: BigInt(`0x${base64url.decodeToBuffer(jwk.dq).toString('hex')}`),\n qi: BigInt(`0x${base64url.decodeToBuffer(jwk.qi).toString('hex')}`)\n }, 'pem', { label: 'RSA PRIVATE KEY' })\n },\n public (jwk) {\n const RSAPublicKey = asn1.get('RSAPublicKey')\n\n return RSAPublicKey.encode({\n version: 0,\n n: BigInt(`0x${base64url.decodeToBuffer(jwk.n).toString('hex')}`),\n e: BigInt(`0x${base64url.decodeToBuffer(jwk.e).toString('hex')}`)\n }, 'pem', { label: 'RSA PUBLIC KEY' })\n }\n },\n EC: {\n private (jwk) {\n const ECPrivateKey = asn1.get('ECPrivateKey')\n\n return ECPrivateKey.encode({\n version: 1,\n privateKey: base64url.decodeToBuffer(jwk.d),\n parameters: { type: 'namedCurve', value: jwk.crv },\n publicKey: concatEcPublicKey(jwk.x, jwk.y)\n }, 'pem', { label: 'EC PRIVATE KEY' })\n },\n public (jwk) {\n const PublicKeyInfo = asn1.get('PublicKeyInfo')\n\n return PublicKeyInfo.encode({\n algorithm: {\n algorithm: 'ecPublicKey',\n parameters: { type: 'namedCurve', value: jwk.crv }\n },\n publicKey: concatEcPublicKey(jwk.x, jwk.y)\n }, 'pem', { label: 'PUBLIC KEY' })\n }\n },\n OKP: {\n private (jwk) {\n const OneAsymmetricKey = asn1.get('OneAsymmetricKey')\n\n const b64 = OneAsymmetricKey.encode({\n version: 0,\n privateKey: { privateKey: base64url.decodeToBuffer(jwk.d) },\n algorithm: { algorithm: jwk.crv }\n }, 'der')\n\n // TODO: WHYYY? https://github.com/indutny/asn1.js/issues/110\n b64.write('04', 12, 1, 'hex')\n\n return formatPem(b64.toString('base64'), 'PRIVATE')\n },\n public (jwk) {\n const PublicKeyInfo = asn1.get('PublicKeyInfo')\n\n return PublicKeyInfo.encode({\n algorithm: { algorithm: jwk.crv },\n publicKey: {\n unused: 0,\n data: base64url.decodeToBuffer(jwk.x)\n }\n }, 'pem', { label: 'PUBLIC KEY' })\n }\n }\n}\n\nmodule.exports.jwkToPem = (jwk, { calculateMissingRSAPrimes = false } = {}) => {\n switch (jwk.kty) {\n case 'EC':\n if (!EC_CURVES.has(jwk.crv)) {\n throw new errors.JOSENotSupported(`unsupported EC key curve: ${jwk.crv}`)\n }\n break\n case 'OKP':\n if (!OKP_CURVES.has(jwk.crv)) {\n throw new errors.JOSENotSupported(`unsupported OKP key curve: ${jwk.crv}`)\n }\n break\n case 'RSA':\n break\n default:\n throw new errors.JOSENotSupported(`unsupported key type: ${jwk.kty}`)\n }\n\n if (jwk.d) {\n return jwkToPem[jwk.kty].private(jwk, { calculateMissingRSAPrimes })\n }\n\n return jwkToPem[jwk.kty].public(jwk)\n}\n","module.exports = alg => `sha${alg.substr(2, 3)}`\n","/* global BigInt */\n\nconst { randomBytes } = require('crypto')\n\nconst base64url = require('./base64url')\nconst errors = require('../errors')\n\nconst ZERO = BigInt(0)\nconst ONE = BigInt(1)\nconst TWO = BigInt(2)\n\nconst toJWKParameter = (n) => {\n const hex = n.toString(16)\n return base64url.encodeBuffer(Buffer.from(hex.length % 2 ? `0${hex}` : hex, 'hex'))\n}\nconst fromBuffer = buf => BigInt(`0x${buf.toString('hex')}`)\nconst bitLength = n => n.toString(2).length\n\nconst eGcdX = (a, b) => {\n let x = ZERO\n let y = ONE\n let u = ONE\n let v = ZERO\n\n while (a !== ZERO) {\n const q = b / a\n const r = b % a\n const m = x - (u * q)\n const n = y - (v * q)\n b = a\n a = r\n x = u\n y = v\n u = m\n v = n\n }\n return x\n}\n\nconst gcd = (a, b) => {\n let shift = ZERO\n while (!((a | b) & ONE)) {\n a >>= ONE\n b >>= ONE\n shift++\n }\n while (!(a & ONE)) {\n a >>= ONE\n }\n do {\n while (!(b & ONE)) {\n b >>= ONE\n }\n if (a > b) {\n const x = a\n a = b\n b = x\n }\n b -= a\n } while (b)\n\n return a << shift\n}\n\nconst modPow = (a, b, n) => {\n a = toZn(a, n)\n let result = ONE\n let x = a\n while (b > 0) {\n var leastSignificantBit = b % TWO\n b = b / TWO\n if (leastSignificantBit === ONE) {\n result = result * x\n result = result % n\n }\n x = x * x\n x = x % n\n }\n return result\n}\n\nconst randBetween = (min, max) => {\n const interval = max - min\n const bitLen = bitLength(interval)\n let rnd\n do {\n rnd = fromBuffer(randBits(bitLen))\n } while (rnd > interval)\n return rnd + min\n}\n\nconst randBits = (bitLength) => {\n const byteLength = Math.ceil(bitLength / 8)\n const rndBytes = randomBytes(byteLength)\n // Fill with 0's the extra bits\n rndBytes[0] = rndBytes[0] & (2 ** (bitLength % 8) - 1)\n return rndBytes\n}\n\nconst toZn = (a, n) => {\n a = a % n\n return (a < 0) ? a + n : a\n}\n\nconst odd = (n) => {\n let r = n\n while (r % TWO === ZERO) {\n r = r / TWO\n }\n return r\n}\n\n// not sold on these values\nconst maxCountWhileNoY = 30\nconst maxCountWhileInot0 = 22\n\nconst getPrimeFactors = (e, d, n) => {\n const r = odd(e * d - ONE)\n\n let countWhileNoY = 0\n let y\n do {\n countWhileNoY++\n if (countWhileNoY === maxCountWhileNoY) {\n throw new errors.JWKImportFailed('failed to calculate missing primes')\n }\n\n let countWhileInot0 = 0\n let i = modPow(randBetween(TWO, n), r, n)\n let o = ZERO\n while (i !== ONE) {\n countWhileInot0++\n if (countWhileInot0 === maxCountWhileInot0) {\n throw new errors.JWKImportFailed('failed to calculate missing primes')\n }\n o = i\n i = (i * i) % n\n }\n if (o !== (n - ONE)) {\n y = o\n }\n } while (!y)\n\n const p = gcd(y - ONE, n)\n const q = n / p\n\n return p > q ? { p, q } : { p: q, q: p }\n}\n\nmodule.exports = (jwk) => {\n const e = fromBuffer(base64url.decodeToBuffer(jwk.e))\n const d = fromBuffer(base64url.decodeToBuffer(jwk.d))\n const n = fromBuffer(base64url.decodeToBuffer(jwk.n))\n\n if (d >= n) {\n throw new errors.JWKInvalid('invalid RSA private exponent')\n }\n\n const { p, q } = getPrimeFactors(e, d, n)\n const dp = d % (p - ONE)\n const dq = d % (q - ONE)\n const qi = toZn(eGcdX(toZn(q, p), p), p)\n\n return {\n ...jwk,\n p: toJWKParameter(p),\n q: toJWKParameter(q),\n dp: toJWKParameter(dp),\n dq: toJWKParameter(dq),\n qi: toJWKParameter(qi)\n }\n}\n","const { diffieHellman, KeyObject, sign, verify } = require('crypto')\n\nconst [major, minor] = process.version.substr(1).split('.').map(x => parseInt(x, 10))\n\nmodule.exports = {\n oaepHashSupported: major > 12 || (major === 12 && minor >= 9),\n keyObjectSupported: !!KeyObject && major >= 12,\n edDSASupported: !!sign && !!verify,\n dsaEncodingSupported: major > 13 || (major === 13 && minor >= 2) || (major === 12 && minor >= 16),\n improvedDH: !!diffieHellman\n}\n","const minute = 60\nconst hour = minute * 60\nconst day = hour * 24\nconst week = day * 7\nconst year = day * 365.25\n\nconst REGEX = /^(\\d+|\\d+\\.\\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i\n\nmodule.exports = (str) => {\n const matched = REGEX.exec(str)\n\n if (!matched) {\n throw new TypeError(`invalid time period format (\"${str}\")`)\n }\n\n const value = parseFloat(matched[1])\n const unit = matched[2].toLowerCase()\n\n switch (unit) {\n case 'sec':\n case 'secs':\n case 'second':\n case 'seconds':\n case 's':\n return Math.round(value)\n case 'minute':\n case 'minutes':\n case 'min':\n case 'mins':\n case 'm':\n return Math.round(value * minute)\n case 'hour':\n case 'hours':\n case 'hr':\n case 'hrs':\n case 'h':\n return Math.round(value * hour)\n case 'day':\n case 'days':\n case 'd':\n return Math.round(value * day)\n case 'week':\n case 'weeks':\n case 'w':\n return Math.round(value * week)\n case 'year':\n case 'years':\n case 'yr':\n case 'yrs':\n case 'y':\n return Math.round(value * year)\n }\n}\n","const { timingSafeEqual: TSE } = require('crypto')\n\nconst paddedBuffer = (input, length) => {\n if (input.length === length) {\n return input\n }\n\n const buffer = Buffer.alloc(length)\n input.copy(buffer)\n return buffer\n}\n\nconst timingSafeEqual = (a, b) => {\n const length = Math.max(a.length, b.length)\n return TSE(paddedBuffer(a, length), paddedBuffer(b, length))\n}\n\nmodule.exports = timingSafeEqual\n","const MAX_INT32 = Math.pow(2, 32)\n\nmodule.exports = (value, buf = Buffer.allocUnsafe(8)) => {\n const high = Math.floor(value / MAX_INT32)\n const low = value % MAX_INT32\n\n buf.writeUInt32BE(high, 0)\n buf.writeUInt32BE(low, 4)\n return buf\n}\n","const { JOSECritNotUnderstood, JWSInvalid } = require('../errors')\n\nconst DEFINED = new Set([\n 'alg', 'jku', 'jwk', 'kid', 'x5u', 'x5c', 'x5t', 'x5t#S256', 'typ', 'cty',\n 'crit', 'enc', 'zip', 'epk', 'apu', 'apv', 'iv', 'tag', 'p2s', 'p2c'\n])\n\nmodule.exports = function validateCrit (Err, protectedHeader, unprotectedHeader, understood) {\n if (protectedHeader && 'crit' in protectedHeader) {\n if (\n !Array.isArray(protectedHeader.crit) ||\n protectedHeader.crit.length === 0 ||\n protectedHeader.crit.some(s => typeof s !== 'string' || !s)\n ) {\n throw new Err('\"crit\" Header Parameter MUST be an array of non-empty strings when present')\n }\n const whitelisted = new Set(understood)\n const combined = { ...protectedHeader, ...unprotectedHeader }\n protectedHeader.crit.forEach((parameter) => {\n if (DEFINED.has(parameter)) {\n throw new Err(`The critical list contains a non-extension Header Parameter ${parameter}`)\n }\n if (!whitelisted.has(parameter)) {\n throw new JOSECritNotUnderstood(`critical \"${parameter}\" is not understood`)\n }\n if (parameter === 'b64') {\n if (!('b64' in protectedHeader)) {\n throw new JWSInvalid('\"b64\" critical parameter must be integrity protected')\n }\n if (typeof protectedHeader.b64 !== 'boolean') {\n throw new JWSInvalid('\"b64\" critical parameter must be a boolean')\n }\n } else if (!(parameter in combined)) {\n throw new Err(`critical parameter \"${parameter}\" is missing`)\n }\n })\n }\n if (unprotectedHeader && 'crit' in unprotectedHeader) {\n throw new Err('\"crit\" Header Parameter MUST be integrity protected when present')\n }\n}\n","module.exports = {\n JWE: require('./jwe'),\n JWK: require('./jwk'),\n JWKS: require('./jwks'),\n JWS: require('./jws'),\n JWT: require('./jwt'),\n errors: require('./errors')\n}\n","const { createCipheriv, createDecipheriv, getCiphers } = require('crypto')\n\nconst uint64be = require('../help/uint64be')\nconst timingSafeEqual = require('../help/timing_safe_equal')\nconst { KEYOBJECT } = require('../help/consts')\nconst { JWEInvalid, JWEDecryptionFailed } = require('../errors')\n\nconst checkInput = function (size, iv, tag) {\n if (iv.length !== 16) {\n throw new JWEInvalid('invalid iv')\n }\n if (arguments.length === 3) {\n if (tag.length !== size / 8) {\n throw new JWEInvalid('invalid tag')\n }\n }\n}\n\nconst encrypt = (size, sign, { [KEYOBJECT]: keyObject }, cleartext, { iv, aad = Buffer.alloc(0) }) => {\n const key = keyObject.export()\n checkInput(size, iv)\n\n const keySize = size / 8\n const encKey = key.slice(keySize)\n const cipher = createCipheriv(`aes-${size}-cbc`, encKey, iv)\n const ciphertext = Buffer.concat([cipher.update(cleartext), cipher.final()])\n const macData = Buffer.concat([aad, iv, ciphertext, uint64be(aad.length * 8)])\n\n const macKey = key.slice(0, keySize)\n const tag = sign({ [KEYOBJECT]: macKey }, macData).slice(0, keySize)\n\n return { ciphertext, tag }\n}\n\nconst decrypt = (size, sign, { [KEYOBJECT]: keyObject }, ciphertext, { iv, tag = Buffer.alloc(0), aad = Buffer.alloc(0) }) => {\n checkInput(size, iv, tag)\n\n const keySize = size / 8\n const key = keyObject.export()\n const encKey = key.slice(keySize)\n const macKey = key.slice(0, keySize)\n\n const macData = Buffer.concat([aad, iv, ciphertext, uint64be(aad.length * 8)])\n const expectedTag = sign({ [KEYOBJECT]: macKey }, macData, tag).slice(0, keySize)\n const macCheckPassed = timingSafeEqual(tag, expectedTag)\n\n if (!macCheckPassed) {\n throw new JWEDecryptionFailed()\n }\n\n let cleartext\n try {\n const cipher = createDecipheriv(`aes-${size}-cbc`, encKey, iv)\n cleartext = Buffer.concat([cipher.update(ciphertext), cipher.final()])\n } catch (err) {}\n\n if (!cleartext) {\n throw new JWEDecryptionFailed()\n }\n\n return cleartext\n}\n\nmodule.exports = (JWA, JWK) => {\n ['A128CBC-HS256', 'A192CBC-HS384', 'A256CBC-HS512'].forEach((jwaAlg) => {\n const size = parseInt(jwaAlg.substr(1, 3), 10)\n const sign = JWA.sign.get(`HS${size * 2}`)\n if (getCiphers().includes(`aes-${size}-cbc`)) {\n JWA.encrypt.set(jwaAlg, encrypt.bind(undefined, size, sign))\n JWA.decrypt.set(jwaAlg, decrypt.bind(undefined, size, sign))\n JWK.oct.encrypt[jwaAlg] = JWK.oct.decrypt[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length / 2 === size\n }\n })\n}\n","const { createCipheriv, createDecipheriv, getCiphers } = require('crypto')\n\nconst { KEYOBJECT } = require('../help/consts')\nconst { JWEInvalid, JWEDecryptionFailed } = require('../errors')\nconst { asInput } = require('../help/key_object')\n\nconst checkInput = function (size, iv, tag) {\n if (iv.length !== 12) {\n throw new JWEInvalid('invalid iv')\n }\n if (arguments.length === 3) {\n if (tag.length !== 16) {\n throw new JWEInvalid('invalid tag')\n }\n }\n}\n\nconst encrypt = (size, { [KEYOBJECT]: keyObject }, cleartext, { iv, aad = Buffer.alloc(0) }) => {\n const key = asInput(keyObject, false)\n checkInput(size, iv)\n\n const cipher = createCipheriv(`aes-${size}-gcm`, key, iv, { authTagLength: 16 })\n cipher.setAAD(aad)\n\n const ciphertext = Buffer.concat([cipher.update(cleartext), cipher.final()])\n const tag = cipher.getAuthTag()\n\n return { ciphertext, tag }\n}\n\nconst decrypt = (size, { [KEYOBJECT]: keyObject }, ciphertext, { iv, tag = Buffer.alloc(0), aad = Buffer.alloc(0) }) => {\n const key = asInput(keyObject, false)\n checkInput(size, iv, tag)\n\n try {\n const cipher = createDecipheriv(`aes-${size}-gcm`, key, iv, { authTagLength: 16 })\n cipher.setAuthTag(tag)\n cipher.setAAD(aad)\n\n return Buffer.concat([cipher.update(ciphertext), cipher.final()])\n } catch (err) {\n throw new JWEDecryptionFailed()\n }\n}\n\nmodule.exports = (JWA, JWK) => {\n ['A128GCM', 'A192GCM', 'A256GCM'].forEach((jwaAlg) => {\n const size = parseInt(jwaAlg.substr(1, 3), 10)\n if (getCiphers().includes(`aes-${size}-gcm`)) {\n JWA.encrypt.set(jwaAlg, encrypt.bind(undefined, size))\n JWA.decrypt.set(jwaAlg, decrypt.bind(undefined, size))\n JWK.oct.encrypt[jwaAlg] = JWK.oct.decrypt[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length === size\n }\n })\n}\n","const generateIV = require('../help/generate_iv')\nconst base64url = require('../help/base64url')\n\nmodule.exports = (JWA, JWK) => {\n ['A128GCMKW', 'A192GCMKW', 'A256GCMKW'].forEach((jwaAlg) => {\n const encAlg = jwaAlg.substr(0, 7)\n const size = parseInt(jwaAlg.substr(1, 3), 10)\n const encrypt = JWA.encrypt.get(encAlg)\n const decrypt = JWA.decrypt.get(encAlg)\n\n if (encrypt && decrypt) {\n JWA.keyManagementEncrypt.set(jwaAlg, (key, payload) => {\n const iv = generateIV(jwaAlg)\n const { ciphertext, tag } = encrypt(key, payload, { iv })\n return {\n wrapped: ciphertext,\n header: { tag: base64url.encodeBuffer(tag), iv: base64url.encodeBuffer(iv) }\n }\n })\n JWA.keyManagementDecrypt.set(jwaAlg, decrypt)\n JWK.oct.wrapKey[jwaAlg] = JWK.oct.unwrapKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length === size\n }\n })\n}\n","const { createCipheriv, createDecipheriv, getCiphers } = require('crypto')\n\nconst { KEYOBJECT } = require('../help/consts')\nconst { asInput } = require('../help/key_object')\n\nconst checkInput = (data) => {\n if (data !== undefined && data.length % 8 !== 0) {\n throw new Error('invalid data length')\n }\n}\n\nconst wrapKey = (alg, { [KEYOBJECT]: keyObject }, payload) => {\n const key = asInput(keyObject, false)\n const cipher = createCipheriv(alg, key, Buffer.alloc(8, 'a6', 'hex'))\n\n return { wrapped: Buffer.concat([cipher.update(payload), cipher.final()]) }\n}\n\nconst unwrapKey = (alg, { [KEYOBJECT]: keyObject }, payload) => {\n const key = asInput(keyObject, false)\n checkInput(payload)\n const cipher = createDecipheriv(alg, key, Buffer.alloc(8, 'a6', 'hex'))\n\n return Buffer.concat([cipher.update(payload), cipher.final()])\n}\n\nmodule.exports = (JWA, JWK) => {\n ['A128KW', 'A192KW', 'A256KW'].forEach((jwaAlg) => {\n const size = parseInt(jwaAlg.substr(1, 3), 10)\n const alg = `aes${size}-wrap`\n if (getCiphers().includes(alg)) {\n JWA.keyManagementEncrypt.set(jwaAlg, wrapKey.bind(undefined, alg))\n JWA.keyManagementDecrypt.set(jwaAlg, unwrapKey.bind(undefined, alg))\n JWK.oct.wrapKey[jwaAlg] = JWK.oct.unwrapKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length === size\n }\n })\n}\n","const { improvedDH } = require('../../help/runtime_support')\n\nif (improvedDH) {\n const { diffieHellman } = require('crypto')\n\n const { KeyObject } = require('../../help/key_object')\n const importKey = require('../../jwk/import')\n\n module.exports = ({ keyObject: privateKey }, publicKey) => {\n if (!(publicKey instanceof KeyObject)) {\n ({ keyObject: publicKey } = importKey(publicKey))\n }\n\n return diffieHellman({ privateKey, publicKey })\n }\n} else {\n const { createECDH, constants: { POINT_CONVERSION_UNCOMPRESSED } } = require('crypto')\n\n const base64url = require('../../help/base64url')\n\n const crvToCurve = (crv) => {\n switch (crv) {\n case 'P-256':\n return 'prime256v1'\n case 'P-384':\n return 'secp384r1'\n case 'P-521':\n return 'secp521r1'\n }\n }\n\n const UNCOMPRESSED = Buffer.alloc(1, POINT_CONVERSION_UNCOMPRESSED)\n const pubToBuffer = (x, y) => Buffer.concat([UNCOMPRESSED, base64url.decodeToBuffer(x), base64url.decodeToBuffer(y)])\n\n module.exports = ({ crv, d }, { x, y }) => {\n const curve = crvToCurve(crv)\n const exchange = createECDH(curve)\n\n exchange.setPrivateKey(base64url.decodeToBuffer(d))\n\n return exchange.computeSecret(pubToBuffer(x, y))\n }\n}\n","const { createHash } = require('crypto')\nconst ecdhComputeSecret = require('./compute_secret')\n\nconst concat = (key, length, value) => {\n const iterations = Math.ceil(length / 32)\n let res\n\n for (let iter = 1; iter <= iterations; iter++) {\n const buf = Buffer.allocUnsafe(4 + key.length + value.length)\n buf.writeUInt32BE(iter, 0)\n key.copy(buf, 4)\n value.copy(buf, 4 + key.length)\n if (!res) {\n res = createHash('sha256').update(buf).digest()\n } else {\n res = Buffer.concat([res, createHash('sha256').update(buf).digest()])\n }\n }\n\n return res.slice(0, length)\n}\n\nconst uint32be = (value, buf = Buffer.allocUnsafe(4)) => {\n buf.writeUInt32BE(value)\n return buf\n}\n\nconst lengthAndInput = input => Buffer.concat([uint32be(input.length), input])\n\nmodule.exports = (alg, keyLen, privKey, pubKey, { apu = Buffer.alloc(0), apv = Buffer.alloc(0) } = {}, computeSecret = ecdhComputeSecret) => {\n const value = Buffer.concat([\n lengthAndInput(Buffer.from(alg)),\n lengthAndInput(apu),\n lengthAndInput(apv),\n uint32be(keyLen)\n ])\n\n const sharedSecret = computeSecret(privKey, pubKey)\n return concat(sharedSecret, keyLen / 8, value)\n}\n","const { improvedDH } = require('../../help/runtime_support')\nconst { KEYLENGTHS } = require('../../registry')\nconst { generateSync } = require('../../jwk/generate')\nconst { name: secp256k1 } = require('../../jwk/key/secp256k1_crv')\n\nconst derive = require('./derive')\n\nconst wrapKey = (key, payload, { enc }) => {\n const epk = generateSync(key.kty, key.crv)\n\n const derivedKey = derive(enc, KEYLENGTHS.get(enc), epk, key)\n\n return {\n wrapped: derivedKey,\n header: { epk: { kty: key.kty, crv: key.crv, x: epk.x, y: epk.y } }\n }\n}\n\nconst unwrapKey = (key, payload, header) => {\n const { enc, epk } = header\n return derive(enc, KEYLENGTHS.get(enc), key, epk, header)\n}\n\nmodule.exports = (JWA, JWK) => {\n JWA.keyManagementEncrypt.set('ECDH-ES', wrapKey)\n JWA.keyManagementDecrypt.set('ECDH-ES', unwrapKey)\n JWK.EC.deriveKey['ECDH-ES'] = key => (key.use === 'enc' || key.use === undefined) && key.crv !== secp256k1\n\n if (improvedDH) {\n JWK.OKP.deriveKey['ECDH-ES'] = key => (key.use === 'enc' || key.use === undefined) && key.keyObject.asymmetricKeyType.startsWith('x')\n }\n}\n","const { improvedDH } = require('../../help/runtime_support')\nconst { KEYOBJECT } = require('../../help/consts')\nconst { generateSync } = require('../../jwk/generate')\nconst { name: secp256k1 } = require('../../jwk/key/secp256k1_crv')\nconst { ECDH_DERIVE_LENGTHS } = require('../../registry')\n\nconst derive = require('./derive')\n\nconst wrapKey = (wrap, derive, key, payload) => {\n const epk = generateSync(key.kty, key.crv)\n\n const derivedKey = derive(epk, key, payload)\n\n const result = wrap({ [KEYOBJECT]: derivedKey }, payload)\n result.header = result.header || {}\n Object.assign(result.header, { epk: { kty: key.kty, crv: key.crv, x: epk.x, y: epk.y } })\n\n return result\n}\n\nconst unwrapKey = (unwrap, derive, key, payload, header) => {\n const { epk } = header\n const derivedKey = derive(key, epk, header)\n\n return unwrap({ [KEYOBJECT]: derivedKey }, payload, header)\n}\n\nmodule.exports = (JWA, JWK) => {\n ['ECDH-ES+A128KW', 'ECDH-ES+A192KW', 'ECDH-ES+A256KW'].forEach((jwaAlg) => {\n const kw = jwaAlg.substr(-6)\n const kwWrap = JWA.keyManagementEncrypt.get(kw)\n const kwUnwrap = JWA.keyManagementDecrypt.get(kw)\n const keylen = parseInt(jwaAlg.substr(9, 3), 10)\n ECDH_DERIVE_LENGTHS.set(jwaAlg, keylen)\n\n if (kwWrap && kwUnwrap) {\n JWA.keyManagementEncrypt.set(jwaAlg, wrapKey.bind(undefined, kwWrap, derive.bind(undefined, jwaAlg, keylen)))\n JWA.keyManagementDecrypt.set(jwaAlg, unwrapKey.bind(undefined, kwUnwrap, derive.bind(undefined, jwaAlg, keylen)))\n JWK.EC.deriveKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.crv !== secp256k1\n\n if (improvedDH) {\n JWK.OKP.deriveKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.keyObject.asymmetricKeyType.startsWith('x')\n }\n }\n })\n}\nmodule.exports.wrapKey = wrapKey\nmodule.exports.unwrapKey = unwrapKey\n","const { sign: signOneShot, verify: verifyOneShot, createSign, createVerify, getCurves } = require('crypto')\n\nconst { derToJose, joseToDer } = require('../help/ecdsa_signatures')\nconst { KEYOBJECT } = require('../help/consts')\nconst resolveNodeAlg = require('../help/node_alg')\nconst { asInput } = require('../help/key_object')\nconst { dsaEncodingSupported } = require('../help/runtime_support')\nconst { name: secp256k1 } = require('../jwk/key/secp256k1_crv')\n\nlet sign, verify\n\nif (dsaEncodingSupported) {\n sign = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload) => {\n if (typeof payload === 'string') {\n payload = Buffer.from(payload)\n }\n return signOneShot(nodeAlg, payload, { key: asInput(keyObject, false), dsaEncoding: 'ieee-p1363' })\n }\n verify = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload, signature) => {\n try {\n return verifyOneShot(nodeAlg, payload, { key: asInput(keyObject, true), dsaEncoding: 'ieee-p1363' }, signature)\n } catch (err) {\n return false\n }\n }\n} else {\n sign = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload) => {\n return derToJose(createSign(nodeAlg).update(payload).sign(asInput(keyObject, false)), jwaAlg)\n }\n verify = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload, signature) => {\n try {\n return createVerify(nodeAlg).update(payload).verify(asInput(keyObject, true), joseToDer(signature, jwaAlg))\n } catch (err) {\n return false\n }\n }\n}\n\nconst crvToAlg = (crv) => {\n switch (crv) {\n case 'P-256':\n return 'ES256'\n case secp256k1:\n return 'ES256K'\n case 'P-384':\n return 'ES384'\n case 'P-521':\n return 'ES512'\n }\n}\n\nmodule.exports = (JWA, JWK) => {\n const algs = []\n\n if (getCurves().includes('prime256v1')) {\n algs.push('ES256')\n }\n\n if (getCurves().includes('secp256k1')) {\n algs.push('ES256K')\n }\n\n if (getCurves().includes('secp384r1')) {\n algs.push('ES384')\n }\n\n if (getCurves().includes('secp521r1')) {\n algs.push('ES512')\n }\n\n algs.forEach((jwaAlg) => {\n const nodeAlg = resolveNodeAlg(jwaAlg)\n JWA.sign.set(jwaAlg, sign.bind(undefined, jwaAlg, nodeAlg))\n JWA.verify.set(jwaAlg, verify.bind(undefined, jwaAlg, nodeAlg))\n JWK.EC.sign[jwaAlg] = key => key.private && JWK.EC.verify[jwaAlg](key)\n JWK.EC.verify[jwaAlg] = key => (key.use === 'sig' || key.use === undefined) && crvToAlg(key.crv) === jwaAlg\n })\n}\n","const { sign: signOneShot, verify: verifyOneShot } = require('crypto')\n\nconst { KEYOBJECT } = require('../help/consts')\nconst { edDSASupported } = require('../help/runtime_support')\n\nconst sign = ({ [KEYOBJECT]: keyObject }, payload) => {\n if (typeof payload === 'string') {\n payload = Buffer.from(payload)\n }\n return signOneShot(undefined, payload, keyObject)\n}\n\nconst verify = ({ [KEYOBJECT]: keyObject }, payload, signature) => {\n return verifyOneShot(undefined, payload, keyObject, signature)\n}\n\nmodule.exports = (JWA, JWK) => {\n if (edDSASupported) {\n JWA.sign.set('EdDSA', sign)\n JWA.verify.set('EdDSA', verify)\n JWK.OKP.sign.EdDSA = key => key.private && JWK.OKP.verify.EdDSA(key)\n JWK.OKP.verify.EdDSA = key => (key.use === 'sig' || key.use === undefined) && key.keyObject.asymmetricKeyType.startsWith('ed')\n }\n}\n","const { createHmac } = require('crypto')\n\nconst { KEYOBJECT } = require('../help/consts')\nconst timingSafeEqual = require('../help/timing_safe_equal')\nconst resolveNodeAlg = require('../help/node_alg')\nconst { asInput } = require('../help/key_object')\n\nconst sign = (jwaAlg, hmacAlg, { [KEYOBJECT]: keyObject }, payload) => {\n const hmac = createHmac(hmacAlg, asInput(keyObject, false))\n hmac.update(payload)\n return hmac.digest()\n}\n\nconst verify = (jwaAlg, hmacAlg, key, payload, signature) => {\n const expected = sign(jwaAlg, hmacAlg, key, payload)\n const actual = signature\n\n return timingSafeEqual(actual, expected)\n}\n\nmodule.exports = (JWA, JWK) => {\n ['HS256', 'HS384', 'HS512'].forEach((jwaAlg) => {\n const hmacAlg = resolveNodeAlg(jwaAlg)\n JWA.sign.set(jwaAlg, sign.bind(undefined, jwaAlg, hmacAlg))\n JWA.verify.set(jwaAlg, verify.bind(undefined, jwaAlg, hmacAlg))\n JWK.oct.sign[jwaAlg] = JWK.oct.verify[jwaAlg] = key => key.use === 'sig' || key.use === undefined\n })\n}\n","const { JWKKeySupport, JOSENotSupported } = require('../errors')\nconst { KEY_MANAGEMENT_ENCRYPT, KEY_MANAGEMENT_DECRYPT } = require('../help/consts')\n\nconst { JWA, JWK } = require('../registry')\n\n// sign, verify\nrequire('./hmac')(JWA, JWK)\nrequire('./ecdsa')(JWA, JWK)\nrequire('./eddsa')(JWA, JWK)\nrequire('./rsassa_pss')(JWA, JWK)\nrequire('./rsassa')(JWA, JWK)\nrequire('./none')(JWA)\n\n// encrypt, decrypt\nrequire('./aes_cbc_hmac_sha2')(JWA, JWK)\nrequire('./aes_gcm')(JWA, JWK)\n\n// wrapKey, unwrapKey\nrequire('./rsaes')(JWA, JWK)\nrequire('./aes_kw')(JWA, JWK)\nrequire('./aes_gcm_kw')(JWA, JWK)\n\n// deriveKey\nrequire('./pbes2')(JWA, JWK)\nrequire('./ecdh/dir')(JWA, JWK)\nrequire('./ecdh/kw')(JWA, JWK)\n\nconst check = (key, op, alg) => {\n const cache = `_${op}_${alg}`\n\n let label\n let keyOp\n if (op === 'keyManagementEncrypt') {\n label = 'key management (encryption)'\n keyOp = KEY_MANAGEMENT_ENCRYPT\n } else if (op === 'keyManagementDecrypt') {\n label = 'key management (decryption)'\n keyOp = KEY_MANAGEMENT_DECRYPT\n }\n\n if (cache in key) {\n if (key[cache]) {\n return\n }\n throw new JWKKeySupport(`the key does not support ${alg} ${label || op} algorithm`)\n }\n\n let value = true\n if (!JWA[op].has(alg)) {\n throw new JOSENotSupported(`unsupported ${label || op} alg: ${alg}`)\n } else if (!key.algorithms(keyOp).has(alg)) {\n value = false\n }\n\n Object.defineProperty(key, cache, { value, enumerable: false })\n\n if (!value) {\n return check(key, op, alg)\n }\n}\n\nmodule.exports = {\n check,\n sign: (alg, key, payload) => {\n check(key, 'sign', alg)\n return JWA.sign.get(alg)(key, payload)\n },\n verify: (alg, key, payload, signature) => {\n check(key, 'verify', alg)\n return JWA.verify.get(alg)(key, payload, signature)\n },\n keyManagementEncrypt: (alg, key, payload, opts) => {\n check(key, 'keyManagementEncrypt', alg)\n return JWA.keyManagementEncrypt.get(alg)(key, payload, opts)\n },\n keyManagementDecrypt: (alg, key, payload, opts) => {\n check(key, 'keyManagementDecrypt', alg)\n return JWA.keyManagementDecrypt.get(alg)(key, payload, opts)\n },\n encrypt: (alg, key, cleartext, opts) => {\n check(key, 'encrypt', alg)\n return JWA.encrypt.get(alg)(key, cleartext, opts)\n },\n decrypt: (alg, key, ciphertext, opts) => {\n check(key, 'decrypt', alg)\n return JWA.decrypt.get(alg)(key, ciphertext, opts)\n }\n}\n","const sign = () => Buffer.from('')\nconst verify = (key, payload, signature) => !signature.length\n\nmodule.exports = (JWA, JWK) => {\n JWA.sign.set('none', sign)\n JWA.verify.set('none', verify)\n}\n","const { pbkdf2Sync: pbkdf2, randomBytes } = require('crypto')\n\nconst { KEYOBJECT } = require('../help/consts')\nconst base64url = require('../help/base64url')\n\nconst SALT_LENGTH = 16\nconst NULL_BUFFER = Buffer.alloc(1, 0)\n\nconst concatSalt = (alg, p2s) => {\n return Buffer.concat([\n Buffer.from(alg, 'utf8'),\n NULL_BUFFER,\n p2s\n ])\n}\n\nconst wrapKey = (keylen, sha, concat, wrap, { [KEYOBJECT]: keyObject }, payload) => {\n // Note that if password-based encryption is used for multiple\n // recipients, it is expected that each recipient use different values\n // for the PBES2 parameters \"p2s\" and \"p2c\".\n // here we generate p2c between 2048 and 4096 and random p2s\n const p2c = Math.floor((Math.random() * 2049) + 2048)\n const p2s = randomBytes(SALT_LENGTH)\n const salt = concat(p2s)\n\n const derivedKey = pbkdf2(keyObject.export(), salt, p2c, keylen, sha)\n\n const result = wrap({ [KEYOBJECT]: derivedKey }, payload)\n result.header = result.header || {}\n Object.assign(result.header, { p2c, p2s: base64url.encodeBuffer(p2s) })\n\n return result\n}\n\nconst unwrapKey = (keylen, sha, concat, unwrap, { [KEYOBJECT]: keyObject }, payload, header) => {\n const { p2s, p2c } = header\n const salt = concat(p2s)\n const derivedKey = pbkdf2(keyObject.export(), salt, p2c, keylen, sha)\n return unwrap({ [KEYOBJECT]: derivedKey }, payload, header)\n}\n\nmodule.exports = (JWA, JWK) => {\n ['PBES2-HS256+A128KW', 'PBES2-HS384+A192KW', 'PBES2-HS512+A256KW'].forEach((jwaAlg) => {\n const kw = jwaAlg.substr(-6)\n const kwWrap = JWA.keyManagementEncrypt.get(kw)\n const kwUnwrap = JWA.keyManagementDecrypt.get(kw)\n const keylen = parseInt(jwaAlg.substr(13, 3), 10) / 8\n const sha = `sha${jwaAlg.substr(8, 3)}`\n\n if (kwWrap && kwUnwrap) {\n JWA.keyManagementEncrypt.set(jwaAlg, wrapKey.bind(undefined, keylen, sha, concatSalt.bind(undefined, jwaAlg), kwWrap))\n JWA.keyManagementDecrypt.set(jwaAlg, unwrapKey.bind(undefined, keylen, sha, concatSalt.bind(undefined, jwaAlg), kwUnwrap))\n JWK.oct.deriveKey[jwaAlg] = key => key.use === 'enc' || key.use === undefined\n }\n })\n}\n","const { publicEncrypt, privateDecrypt, constants } = require('crypto')\n\nconst { oaepHashSupported } = require('../help/runtime_support')\nconst { KEYOBJECT } = require('../help/consts')\nconst { asInput } = require('../help/key_object')\n\nconst resolvePadding = (alg) => {\n switch (alg) {\n case 'RSA-OAEP':\n case 'RSA-OAEP-256':\n case 'RSA-OAEP-384':\n case 'RSA-OAEP-512':\n return constants.RSA_PKCS1_OAEP_PADDING\n case 'RSA1_5':\n return constants.RSA_PKCS1_PADDING\n }\n}\n\nconst resolveOaepHash = (alg) => {\n switch (alg) {\n case 'RSA-OAEP':\n return 'sha1'\n case 'RSA-OAEP-256':\n return 'sha256'\n case 'RSA-OAEP-384':\n return 'sha384'\n case 'RSA-OAEP-512':\n return 'sha512'\n default:\n return undefined\n }\n}\n\nconst wrapKey = (padding, oaepHash, { [KEYOBJECT]: keyObject }, payload) => {\n const key = asInput(keyObject, true)\n return { wrapped: publicEncrypt({ key, oaepHash, padding }, payload) }\n}\n\nconst unwrapKey = (padding, oaepHash, { [KEYOBJECT]: keyObject }, payload) => {\n const key = asInput(keyObject, false)\n return privateDecrypt({ key, oaepHash, padding }, payload)\n}\n\nconst LENGTHS = {\n RSA1_5: 0,\n 'RSA-OAEP': 592,\n 'RSA-OAEP-256': 784,\n 'RSA-OAEP-384': 1040,\n 'RSA-OAEP-512': 1296\n}\n\nmodule.exports = (JWA, JWK) => {\n const algs = ['RSA-OAEP', 'RSA1_5']\n\n if (oaepHashSupported) {\n algs.splice(1, 0, 'RSA-OAEP-256', 'RSA-OAEP-384', 'RSA-OAEP-512')\n }\n\n algs.forEach((jwaAlg) => {\n const padding = resolvePadding(jwaAlg)\n const oaepHash = resolveOaepHash(jwaAlg)\n JWA.keyManagementEncrypt.set(jwaAlg, wrapKey.bind(undefined, padding, oaepHash))\n JWA.keyManagementDecrypt.set(jwaAlg, unwrapKey.bind(undefined, padding, oaepHash))\n JWK.RSA.wrapKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length >= LENGTHS[jwaAlg]\n JWK.RSA.unwrapKey[jwaAlg] = key => key.private && (key.use === 'enc' || key.use === undefined) && key.length >= LENGTHS[jwaAlg]\n })\n}\n","const { createSign, createVerify } = require('crypto')\n\nconst { KEYOBJECT } = require('../help/consts')\nconst resolveNodeAlg = require('../help/node_alg')\nconst { asInput } = require('../help/key_object')\n\nconst sign = (nodeAlg, { [KEYOBJECT]: keyObject }, payload) => {\n return createSign(nodeAlg).update(payload).sign(asInput(keyObject, false))\n}\n\nconst verify = (nodeAlg, { [KEYOBJECT]: keyObject }, payload, signature) => {\n return createVerify(nodeAlg).update(payload).verify(asInput(keyObject, true), signature)\n}\n\nconst LENGTHS = {\n RS256: 0,\n RS384: 624,\n RS512: 752\n}\n\nmodule.exports = (JWA, JWK) => {\n ['RS256', 'RS384', 'RS512'].forEach((jwaAlg) => {\n const nodeAlg = resolveNodeAlg(jwaAlg)\n JWA.sign.set(jwaAlg, sign.bind(undefined, nodeAlg))\n JWA.verify.set(jwaAlg, verify.bind(undefined, nodeAlg))\n JWK.RSA.sign[jwaAlg] = key => key.private && JWK.RSA.verify[jwaAlg](key)\n JWK.RSA.verify[jwaAlg] = key => (key.use === 'sig' || key.use === undefined) && key.length >= LENGTHS[jwaAlg]\n })\n}\n","const {\n createSign,\n createVerify,\n constants\n} = require('crypto')\n\nconst { KEYOBJECT } = require('../help/consts')\nconst resolveNodeAlg = require('../help/node_alg')\nconst { asInput } = require('../help/key_object')\n\nconst sign = (nodeAlg, { [KEYOBJECT]: keyObject }, payload) => {\n const key = asInput(keyObject, false)\n return createSign(nodeAlg).update(payload).sign({\n key,\n padding: constants.RSA_PKCS1_PSS_PADDING,\n saltLength: constants.RSA_PSS_SALTLEN_DIGEST\n })\n}\n\nconst verify = (nodeAlg, { [KEYOBJECT]: keyObject }, payload, signature) => {\n const key = asInput(keyObject, true)\n return createVerify(nodeAlg).update(payload).verify({\n key,\n padding: constants.RSA_PKCS1_PSS_PADDING,\n saltLength: constants.RSA_PSS_SALTLEN_DIGEST\n }, signature)\n}\n\nconst LENGTHS = {\n PS256: 528,\n PS384: 784,\n PS512: 1040\n}\n\nmodule.exports = (JWA, JWK) => {\n ['PS256', 'PS384', 'PS512'].forEach((jwaAlg) => {\n const nodeAlg = resolveNodeAlg(jwaAlg)\n JWA.sign.set(jwaAlg, sign.bind(undefined, nodeAlg))\n JWA.verify.set(jwaAlg, verify.bind(undefined, nodeAlg))\n JWK.RSA.sign[jwaAlg] = key => key.private && JWK.RSA.verify[jwaAlg](key)\n JWK.RSA.verify[jwaAlg] = key => (key.use === 'sig' || key.use === undefined) && key.length >= LENGTHS[jwaAlg]\n })\n}\n","const { inflateRawSync } = require('zlib')\n\nconst base64url = require('../help/base64url')\nconst getKey = require('../help/get_key')\nconst { KeyStore } = require('../jwks')\nconst errors = require('../errors')\nconst { check, decrypt, keyManagementDecrypt } = require('../jwa')\nconst JWK = require('../jwk')\n\nconst { createSecretKey } = require('../help/key_object')\nconst generateCEK = require('./generate_cek')\nconst validateHeaders = require('./validate_headers')\nconst { detect: resolveSerialization } = require('./serializers')\n\nconst SINGLE_RECIPIENT = new Set(['compact', 'flattened'])\n\nconst combineHeader = (prot = {}, unprotected = {}, header = {}) => {\n if (typeof prot === 'string') {\n prot = base64url.JSON.decode(prot)\n }\n\n const p2s = prot.p2s || unprotected.p2s || header.p2s\n const apu = prot.apu || unprotected.apu || header.apu\n const apv = prot.apv || unprotected.apv || header.apv\n const iv = prot.iv || unprotected.iv || header.iv\n const tag = prot.tag || unprotected.tag || header.tag\n\n return {\n ...prot,\n ...unprotected,\n ...header,\n ...(typeof p2s === 'string' ? { p2s: base64url.decodeToBuffer(p2s) } : undefined),\n ...(typeof apu === 'string' ? { apu: base64url.decodeToBuffer(apu) } : undefined),\n ...(typeof apv === 'string' ? { apv: base64url.decodeToBuffer(apv) } : undefined),\n ...(typeof iv === 'string' ? { iv: base64url.decodeToBuffer(iv) } : undefined),\n ...(typeof tag === 'string' ? { tag: base64url.decodeToBuffer(tag) } : undefined)\n }\n}\n\n/*\n * @public\n */\nconst jweDecrypt = (skipValidateHeaders, serialization, jwe, key, { crit = [], complete = false, algorithms } = {}) => {\n key = getKey(key, true)\n\n if (algorithms !== undefined && (!Array.isArray(algorithms) || algorithms.some(s => typeof s !== 'string' || !s))) {\n throw new TypeError('\"algorithms\" option must be an array of non-empty strings')\n } else if (algorithms) {\n algorithms = new Set(algorithms)\n }\n\n if (!Array.isArray(crit) || crit.some(s => typeof s !== 'string' || !s)) {\n throw new TypeError('\"crit\" option must be an array of non-empty strings')\n }\n\n if (!serialization) {\n serialization = resolveSerialization(jwe)\n }\n\n let alg, ciphertext, enc, encryptedKey, iv, opts, prot, tag, unprotected, cek, aad, header\n\n // treat general format with one recipient as flattened\n // skips iteration and avoids multi errors in this case\n if (serialization === 'general' && jwe.recipients.length === 1) {\n serialization = 'flattened'\n const { recipients, ...root } = jwe\n jwe = { ...root, ...recipients[0] }\n }\n\n if (SINGLE_RECIPIENT.has(serialization)) {\n if (serialization === 'compact') { // compact serialization format\n ([prot, encryptedKey, iv, ciphertext, tag] = jwe.split('.'))\n } else { // flattened serialization format\n ({ protected: prot, encrypted_key: encryptedKey, iv, ciphertext, tag, unprotected, aad, header } = jwe)\n }\n\n if (!skipValidateHeaders) {\n validateHeaders(prot, unprotected, [{ header }], true, crit)\n }\n\n opts = combineHeader(prot, unprotected, header)\n\n ;({ alg, enc } = opts)\n\n if (algorithms && !algorithms.has(alg === 'dir' ? enc : alg)) {\n throw new errors.JOSEAlgNotWhitelisted('alg not whitelisted')\n }\n\n if (key instanceof KeyStore) {\n const keystore = key\n let keys\n if (opts.alg === 'dir') {\n keys = keystore.all({ kid: opts.kid, alg: opts.enc, key_ops: ['decrypt'] })\n } else {\n keys = keystore.all({ kid: opts.kid, alg: opts.alg, key_ops: ['unwrapKey'] })\n }\n switch (keys.length) {\n case 0:\n throw new errors.JWKSNoMatchingKey()\n case 1:\n // treat the call as if a Key instance was passed in\n // skips iteration and avoids multi errors in this case\n key = keys[0]\n break\n default: {\n const errs = []\n for (const key of keys) {\n try {\n return jweDecrypt(true, serialization, jwe, key, { crit, complete, algorithms: algorithms ? [...algorithms] : undefined })\n } catch (err) {\n errs.push(err)\n continue\n }\n }\n\n const multi = new errors.JOSEMultiError(errs)\n if ([...multi].some(e => e instanceof errors.JWEDecryptionFailed)) {\n throw new errors.JWEDecryptionFailed()\n }\n throw multi\n }\n }\n }\n\n check(key, ...(alg === 'dir' ? ['decrypt', enc] : ['keyManagementDecrypt', alg]))\n\n try {\n if (alg === 'dir') {\n cek = JWK.asKey(key, { alg: enc, use: 'enc' })\n } else if (alg === 'ECDH-ES') {\n const unwrapped = keyManagementDecrypt(alg, key, undefined, opts)\n cek = JWK.asKey(createSecretKey(unwrapped), { alg: enc, use: 'enc' })\n } else {\n const unwrapped = keyManagementDecrypt(alg, key, base64url.decodeToBuffer(encryptedKey), opts)\n cek = JWK.asKey(createSecretKey(unwrapped), { alg: enc, use: 'enc' })\n }\n } catch (err) {\n // To mitigate the attacks described in RFC 3218, the\n // recipient MUST NOT distinguish between format, padding, and length\n // errors of encrypted keys. It is strongly recommended, in the event\n // of receiving an improperly formatted key, that the recipient\n // substitute a randomly generated CEK and proceed to the next step, to\n // mitigate timing attacks.\n cek = generateCEK(enc)\n }\n\n let adata\n if (aad) {\n adata = Buffer.concat([\n Buffer.from(prot || ''),\n Buffer.from('.'),\n Buffer.from(aad)\n ])\n } else {\n adata = Buffer.from(prot || '')\n }\n\n try {\n iv = base64url.decodeToBuffer(iv)\n } catch (err) {}\n try {\n tag = base64url.decodeToBuffer(tag)\n } catch (err) {}\n\n let cleartext = decrypt(enc, cek, base64url.decodeToBuffer(ciphertext), { iv, tag, aad: adata })\n\n if (opts.zip) {\n cleartext = inflateRawSync(cleartext)\n }\n\n if (complete) {\n const result = { cleartext, key, cek }\n if (aad) result.aad = aad\n if (header) result.header = header\n if (unprotected) result.unprotected = unprotected\n if (prot) result.protected = base64url.JSON.decode(prot)\n return result\n }\n\n return cleartext\n }\n\n validateHeaders(jwe.protected, jwe.unprotected, jwe.recipients.map(({ header }) => ({ header })), true, crit)\n\n // general serialization format\n const { recipients, ...root } = jwe\n const errs = []\n for (const recipient of recipients) {\n try {\n return jweDecrypt(true, 'flattened', { ...root, ...recipient }, key, { crit, complete, algorithms: algorithms ? [...algorithms] : undefined })\n } catch (err) {\n errs.push(err)\n continue\n }\n }\n\n const multi = new errors.JOSEMultiError(errs)\n if ([...multi].some(e => e instanceof errors.JWEDecryptionFailed)) {\n throw new errors.JWEDecryptionFailed()\n } else if ([...multi].every(e => e instanceof errors.JWKSNoMatchingKey)) {\n throw new errors.JWKSNoMatchingKey()\n }\n throw multi\n}\n\nmodule.exports = jweDecrypt.bind(undefined, false, undefined)\n","const { deflateRawSync } = require('zlib')\n\nconst { KEYOBJECT } = require('../help/consts')\nconst generateIV = require('../help/generate_iv')\nconst base64url = require('../help/base64url')\nconst getKey = require('../help/get_key')\nconst isObject = require('../help/is_object')\nconst { createSecretKey } = require('../help/key_object')\nconst deepClone = require('../help/deep_clone')\nconst importKey = require('../jwk/import')\nconst { JWEInvalid } = require('../errors')\nconst { check, keyManagementEncrypt, encrypt } = require('../jwa')\n\nconst serializers = require('./serializers')\nconst generateCEK = require('./generate_cek')\nconst validateHeaders = require('./validate_headers')\n\nconst PROCESS_RECIPIENT = Symbol('PROCESS_RECIPIENT')\n\nclass Encrypt {\n // TODO: in v2.x swap unprotectedHeader and aad\n constructor (cleartext, protectedHeader, unprotectedHeader, aad) {\n if (!Buffer.isBuffer(cleartext) && typeof cleartext !== 'string') {\n throw new TypeError('cleartext argument must be a Buffer or a string')\n }\n cleartext = Buffer.from(cleartext)\n\n if (aad !== undefined && !Buffer.isBuffer(aad) && typeof aad !== 'string') {\n throw new TypeError('aad argument must be a Buffer or a string when provided')\n }\n aad = aad ? Buffer.from(aad) : undefined\n\n if (protectedHeader !== undefined && !isObject(protectedHeader)) {\n throw new TypeError('protectedHeader argument must be a plain object when provided')\n }\n\n if (unprotectedHeader !== undefined && !isObject(unprotectedHeader)) {\n throw new TypeError('unprotectedHeader argument must be a plain object when provided')\n }\n\n this._recipients = []\n this._cleartext = cleartext\n this._aad = aad\n this._unprotected = unprotectedHeader ? deepClone(unprotectedHeader) : undefined\n this._protected = protectedHeader ? deepClone(protectedHeader) : undefined\n }\n\n /*\n * @public\n */\n recipient (key, header) {\n key = getKey(key)\n\n if (header !== undefined && !isObject(header)) {\n throw new TypeError('header argument must be a plain object when provided')\n }\n\n this._recipients.push({\n key,\n header: header ? deepClone(header) : undefined\n })\n\n return this\n }\n\n /*\n * @private\n */\n [PROCESS_RECIPIENT] (recipient) {\n const unprotectedHeader = this._unprotected\n const protectedHeader = this._protected\n const { length: recipientCount } = this._recipients\n\n const jweHeader = {\n ...protectedHeader,\n ...unprotectedHeader,\n ...recipient.header\n }\n const { key } = recipient\n\n const enc = jweHeader.enc\n let alg = jweHeader.alg\n\n if (key.use === 'sig') {\n throw new TypeError('a key with \"use\":\"sig\" is not usable for encryption')\n }\n\n if (alg === 'dir') {\n check(key, 'encrypt', enc)\n } else if (alg) {\n check(key, 'keyManagementEncrypt', alg)\n } else {\n alg = key.alg || [...key.algorithms('wrapKey')][0] || [...key.algorithms('deriveKey')][0]\n\n if (alg === 'ECDH-ES' && recipientCount !== 1) {\n alg = [...key.algorithms('deriveKey')][1]\n }\n\n if (!alg) {\n throw new JWEInvalid('could not resolve a usable \"alg\" for a recipient')\n }\n\n if (recipientCount === 1) {\n if (protectedHeader) {\n protectedHeader.alg = alg\n } else {\n this._protected = { alg }\n }\n } else {\n if (recipient.header) {\n recipient.header.alg = alg\n } else {\n recipient.header = { alg }\n }\n }\n }\n\n let wrapped\n let generatedHeader\n\n if (key.kty === 'oct' && alg === 'dir') {\n this._cek = importKey(key[KEYOBJECT], { use: 'enc', alg: enc })\n } else {\n check(this._cek, 'encrypt', enc)\n ;({ wrapped, header: generatedHeader } = keyManagementEncrypt(alg, key, this._cek[KEYOBJECT].export(), { enc, alg }))\n if (alg === 'ECDH-ES') {\n this._cek = importKey(createSecretKey(wrapped), { use: 'enc', alg: enc })\n }\n }\n\n if (alg === 'dir' || alg === 'ECDH-ES') {\n recipient.encrypted_key = ''\n } else {\n recipient.encrypted_key = base64url.encodeBuffer(wrapped)\n }\n\n if (generatedHeader) {\n recipient.generatedHeader = generatedHeader\n }\n }\n\n /*\n * @public\n */\n encrypt (serialization) {\n const serializer = serializers[serialization]\n if (!serializer) {\n throw new TypeError('serialization must be one of \"compact\", \"flattened\", \"general\"')\n }\n\n if (!this._recipients.length) {\n throw new JWEInvalid('missing recipients')\n }\n\n serializer.validate(this._protected, this._unprotected, this._aad, this._recipients)\n\n let enc = validateHeaders(this._protected, this._unprotected, this._recipients, false, this._protected ? this._protected.crit : undefined)\n if (!enc) {\n enc = 'A128CBC-HS256'\n if (this._protected) {\n this._protected.enc = enc\n } else {\n this._protected = { enc }\n }\n }\n const final = {}\n this._cek = generateCEK(enc)\n\n for (const recipient of this._recipients) {\n this[PROCESS_RECIPIENT](recipient)\n }\n\n const iv = generateIV(enc)\n final.iv = base64url.encodeBuffer(iv)\n\n if (this._recipients.length === 1 && this._recipients[0].generatedHeader) {\n const [{ generatedHeader }] = this._recipients\n delete this._recipients[0].generatedHeader\n this._protected = {\n ...this._protected,\n ...generatedHeader\n }\n }\n\n if (this._protected) {\n final.protected = base64url.JSON.encode(this._protected)\n }\n final.unprotected = this._unprotected\n\n let aad\n if (this._aad) {\n final.aad = base64url.encode(this._aad)\n aad = Buffer.concat([\n Buffer.from(final.protected || ''),\n Buffer.from('.'),\n Buffer.from(final.aad)\n ])\n } else {\n aad = Buffer.from(final.protected || '')\n }\n\n let cleartext = this._cleartext\n if (this._protected && 'zip' in this._protected) {\n cleartext = deflateRawSync(cleartext)\n }\n\n const { ciphertext, tag } = encrypt(enc, this._cek, cleartext, { iv, aad })\n final.tag = base64url.encodeBuffer(tag)\n final.ciphertext = base64url.encodeBuffer(ciphertext)\n\n return serializer(final, this._recipients)\n }\n}\n\nmodule.exports = Encrypt\n","const { randomBytes } = require('crypto')\n\nconst { createSecretKey } = require('../help/key_object')\nconst { KEYLENGTHS } = require('../registry')\nconst Key = require('../jwk/key/oct')\n\nmodule.exports = (alg) => {\n const keyLength = KEYLENGTHS.get(alg)\n\n if (!keyLength) {\n return new Key({ type: 'secret' })\n }\n\n return new Key(createSecretKey(randomBytes(keyLength / 8)), { use: 'enc', alg })\n}\n","const Encrypt = require('./encrypt')\nconst decrypt = require('./decrypt')\n\n// TODO: in v2.x swap unprotectedHeader and aad\nconst single = (serialization, cleartext, key, protectedHeader, unprotectedHeader, aad) => {\n return new Encrypt(cleartext, protectedHeader, unprotectedHeader, aad)\n .recipient(key)\n .encrypt(serialization)\n}\n\nmodule.exports.Encrypt = Encrypt\nmodule.exports.encrypt = single.bind(undefined, 'compact')\nmodule.exports.encrypt.flattened = single.bind(undefined, 'flattened')\nmodule.exports.encrypt.general = single.bind(undefined, 'general')\n\nmodule.exports.decrypt = decrypt\n","const isObject = require('../help/is_object')\nlet validateCrit = require('../help/validate_crit')\n\nconst { JWEInvalid } = require('../errors')\n\nvalidateCrit = validateCrit.bind(undefined, JWEInvalid)\n\nconst compactSerializer = (final, [recipient]) => {\n return `${final.protected}.${recipient.encrypted_key}.${final.iv}.${final.ciphertext}.${final.tag}`\n}\ncompactSerializer.validate = (protectedHeader, unprotectedHeader, aad, { 0: { header }, length }) => {\n if (length !== 1 || aad || unprotectedHeader || header) {\n throw new JWEInvalid('JWE Compact Serialization doesn\\'t support multiple recipients, JWE unprotected headers or AAD')\n }\n validateCrit(protectedHeader, unprotectedHeader, protectedHeader ? protectedHeader.crit : undefined)\n}\n\nconst flattenedSerializer = (final, [recipient]) => {\n const { header, encrypted_key: encryptedKey } = recipient\n\n return {\n ...(final.protected ? { protected: final.protected } : undefined),\n ...(final.unprotected ? { unprotected: final.unprotected } : undefined),\n ...(header ? { header } : undefined),\n ...(encryptedKey ? { encrypted_key: encryptedKey } : undefined),\n ...(final.aad ? { aad: final.aad } : undefined),\n iv: final.iv,\n ciphertext: final.ciphertext,\n tag: final.tag\n }\n}\nflattenedSerializer.validate = (protectedHeader, unprotectedHeader, aad, { 0: { header }, length }) => {\n if (length !== 1) {\n throw new JWEInvalid('Flattened JWE JSON Serialization doesn\\'t support multiple recipients')\n }\n validateCrit(protectedHeader, { ...unprotectedHeader, ...header }, protectedHeader ? protectedHeader.crit : undefined)\n}\n\nconst generalSerializer = (final, recipients) => {\n const result = {\n ...(final.protected ? { protected: final.protected } : undefined),\n ...(final.unprotected ? { unprotected: final.unprotected } : undefined),\n recipients: recipients.map(({ header, encrypted_key: encryptedKey, generatedHeader }) => {\n if (!header && !encryptedKey && !generatedHeader) {\n return false\n }\n\n return {\n ...(header || generatedHeader ? { header: { ...header, ...generatedHeader } } : undefined),\n ...(encryptedKey ? { encrypted_key: encryptedKey } : undefined)\n }\n }).filter(Boolean),\n ...(final.aad ? { aad: final.aad } : undefined),\n iv: final.iv,\n ciphertext: final.ciphertext,\n tag: final.tag\n }\n\n if (!result.recipients.length) {\n delete result.recipients\n }\n\n return result\n}\ngeneralSerializer.validate = (protectedHeader, unprotectedHeader, aad, recipients) => {\n recipients.forEach(({ header }) => {\n validateCrit(protectedHeader, { ...header, ...unprotectedHeader }, protectedHeader ? protectedHeader.crit : undefined)\n })\n}\n\nconst isJSON = (input) => {\n return isObject(input) &&\n typeof input.ciphertext === 'string' &&\n typeof input.iv === 'string' &&\n typeof input.tag === 'string' &&\n (input.unprotected === undefined || isObject(input.unprotected)) &&\n (input.protected === undefined || typeof input.protected === 'string') &&\n (input.aad === undefined || typeof input.aad === 'string')\n}\n\nconst isSingleRecipient = (input) => {\n return (input.encrypted_key === undefined || typeof input.encrypted_key === 'string') &&\n (input.header === undefined || isObject(input.header))\n}\n\nconst isValidRecipient = (recipient) => {\n return isObject(recipient) && typeof recipient.encrypted_key === 'string' && (recipient.header === undefined || isObject(recipient.header))\n}\n\nconst isMultiRecipient = (input) => {\n if (Array.isArray(input.recipients) && input.recipients.every(isValidRecipient)) {\n return true\n }\n\n return false\n}\n\nconst detect = (input) => {\n if (typeof input === 'string' && input.split('.').length === 5) {\n return 'compact'\n }\n\n if (isJSON(input)) {\n if (isMultiRecipient(input)) {\n return 'general'\n }\n\n if (isSingleRecipient(input)) {\n return 'flattened'\n }\n }\n\n throw new JWEInvalid('JWE malformed or invalid serialization')\n}\n\nmodule.exports = {\n compact: compactSerializer,\n flattened: flattenedSerializer,\n general: generalSerializer,\n detect\n}\n","const isDisjoint = require('../help/is_disjoint')\nconst base64url = require('../help/base64url')\nlet validateCrit = require('../help/validate_crit')\nconst { JWEInvalid, JOSENotSupported } = require('../errors')\n\nvalidateCrit = validateCrit.bind(undefined, JWEInvalid)\n\nmodule.exports = (prot, unprotected, recipients, checkAlgorithms, crit) => {\n if (typeof prot === 'string') {\n try {\n prot = base64url.JSON.decode(prot)\n } catch (err) {\n throw new JWEInvalid('could not parse JWE protected header')\n }\n }\n\n let alg = []\n const enc = new Set()\n if (!isDisjoint(prot, unprotected) || !recipients.every(({ header }) => {\n if (typeof header === 'object') {\n alg.push(header.alg)\n enc.add(header.enc)\n }\n const combined = { ...unprotected, ...header }\n validateCrit(prot, combined, crit)\n if ('zip' in combined) {\n throw new JWEInvalid('\"zip\" Header Parameter MUST be integrity protected')\n } else if (prot && 'zip' in prot && prot.zip !== 'DEF') {\n throw new JOSENotSupported('only \"DEF\" compression algorithm is supported')\n }\n return isDisjoint(header, prot) && isDisjoint(header, unprotected)\n })) {\n throw new JWEInvalid('JWE Shared Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint')\n }\n\n if (typeof prot === 'object') {\n alg.push(prot.alg)\n enc.add(prot.enc)\n }\n if (typeof unprotected === 'object') {\n alg.push(unprotected.alg)\n enc.add(unprotected.enc)\n }\n\n alg = alg.filter(Boolean)\n enc.delete(undefined)\n\n if (recipients.length !== 1) {\n if (alg.includes('dir') || alg.includes('ECDH-ES')) {\n throw new JWEInvalid('dir and ECDH-ES alg may only be used with a single recipient')\n }\n }\n\n if (checkAlgorithms) {\n if (alg.length !== recipients.length) {\n throw new JWEInvalid('missing Key Management algorithm')\n }\n if (enc.size === 0) {\n throw new JWEInvalid('missing Content Encryption algorithm')\n } else if (enc.size !== 1) {\n throw new JWEInvalid('there must only be one Content Encryption algorithm')\n }\n } else {\n if (enc.size > 1) {\n throw new JWEInvalid('there must only be one Content Encryption algorithm')\n }\n }\n\n return [...enc][0]\n}\n","const errors = require('../errors')\n\nconst importKey = require('./import')\n\nconst RSAKey = require('./key/rsa')\nconst ECKey = require('./key/ec')\nconst OKPKey = require('./key/okp')\nconst OctKey = require('./key/oct')\n\nconst generate = async (kty, crvOrSize, params, generatePrivate = true) => {\n switch (kty) {\n case 'RSA':\n return importKey(\n await RSAKey.generate(crvOrSize, generatePrivate),\n params\n )\n case 'EC':\n return importKey(\n await ECKey.generate(crvOrSize, generatePrivate),\n params\n )\n case 'OKP':\n return importKey(\n await OKPKey.generate(crvOrSize, generatePrivate),\n params\n )\n case 'oct':\n return importKey(\n await OctKey.generate(crvOrSize, generatePrivate),\n params\n )\n default:\n throw new errors.JOSENotSupported(`unsupported key type: ${kty}`)\n }\n}\n\nconst generateSync = (kty, crvOrSize, params, generatePrivate = true) => {\n switch (kty) {\n case 'RSA':\n return importKey(RSAKey.generateSync(crvOrSize, generatePrivate), params)\n case 'EC':\n return importKey(ECKey.generateSync(crvOrSize, generatePrivate), params)\n case 'OKP':\n return importKey(OKPKey.generateSync(crvOrSize, generatePrivate), params)\n case 'oct':\n return importKey(OctKey.generateSync(crvOrSize, generatePrivate), params)\n default:\n throw new errors.JOSENotSupported(`unsupported key type: ${kty}`)\n }\n}\n\nmodule.exports.generate = generate\nmodule.exports.generateSync = generateSync\n","const { deprecate } = require('util')\n\nconst { createPublicKey, createPrivateKey, createSecretKey, KeyObject } = require('../help/key_object')\nconst base64url = require('../help/base64url')\nconst isObject = require('../help/is_object')\nconst { jwkToPem } = require('../help/key_utils')\nconst errors = require('../errors')\n\nconst RSAKey = require('./key/rsa')\nconst ECKey = require('./key/ec')\nconst OKPKey = require('./key/okp')\nconst OctKey = require('./key/oct')\n\nconst importable = new Set(['string', 'buffer', 'object'])\n\nconst mergedParameters = (target = {}, source = {}) => {\n return {\n alg: source.alg,\n key_ops: source.key_ops,\n kid: source.kid,\n use: source.use,\n x5c: source.x5c,\n x5t: source.x5t,\n 'x5t#S256': source['x5t#S256'],\n ...target\n }\n}\n\nconst openSSHpublicKey = /^[a-zA-Z0-9-]+ AAAA(?:[0-9A-Za-z+/])+(?:==|=)?(?: .*)?$/\n\nconst asKey = (key, parameters, { calculateMissingRSAPrimes = false } = {}) => {\n let privateKey, publicKey, secret\n\n if (!importable.has(typeof key)) {\n throw new TypeError('key argument must be a string, buffer or an object')\n }\n\n if (parameters !== undefined && !isObject(parameters)) {\n throw new TypeError('parameters argument must be a plain object when provided')\n }\n\n if (key instanceof KeyObject) {\n switch (key.type) {\n case 'private':\n privateKey = key\n break\n case 'public':\n publicKey = key\n break\n case 'secret':\n secret = key\n break\n }\n } else if (typeof key === 'object' && key && 'kty' in key && key.kty === 'oct') { // symmetric key \n try {\n secret = createSecretKey(base64url.decodeToBuffer(key.k))\n } catch (err) {\n if (!('k' in key)) {\n secret = { type: 'secret' }\n }\n }\n parameters = mergedParameters(parameters, key)\n } else if (typeof key === 'object' && key && 'kty' in key) { // assume JWK formatted asymmetric key \n ({ calculateMissingRSAPrimes = false } = parameters || { calculateMissingRSAPrimes })\n let pem\n\n try {\n pem = jwkToPem(key, { calculateMissingRSAPrimes })\n } catch (err) {\n if (err instanceof errors.JOSEError) {\n throw err\n }\n }\n\n if (pem && key.d) {\n privateKey = createPrivateKey(pem)\n } else if (pem) {\n publicKey = createPublicKey(pem)\n }\n\n parameters = mergedParameters({}, key)\n } else if (key && (typeof key === 'object' || typeof key === 'string')) { // | | passed to crypto.createPrivateKey or crypto.createPublicKey or passed to crypto.createSecretKey\n try {\n privateKey = createPrivateKey(key)\n } catch (err) {\n if (err instanceof errors.JOSEError) {\n throw err\n }\n }\n\n try {\n publicKey = createPublicKey(key)\n if (key.startsWith('-----BEGIN CERTIFICATE-----') && (!parameters || !('x5c' in parameters))) {\n parameters = mergedParameters(parameters, {\n x5c: [key.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\\s)/g, '')]\n })\n }\n } catch (err) {\n if (err instanceof errors.JOSEError) {\n throw err\n }\n }\n\n try {\n // this is to filter out invalid PEM keys and certs, i'll rather have them fail import then\n // have them imported as symmetric \"oct\" keys\n if (!key.includes('-----BEGIN') && !openSSHpublicKey.test(key.toString('ascii').replace(/[\\r\\n]/g, ''))) {\n secret = createSecretKey(Buffer.isBuffer(key) ? key : Buffer.from(key))\n }\n } catch (err) {}\n }\n\n const keyObject = privateKey || publicKey || secret\n\n if (privateKey || publicKey) {\n switch (keyObject.asymmetricKeyType) {\n case 'rsa':\n return new RSAKey(keyObject, parameters)\n case 'ec':\n return new ECKey(keyObject, parameters)\n case 'ed25519':\n case 'ed448':\n case 'x25519':\n case 'x448':\n return new OKPKey(keyObject, parameters)\n default:\n throw new errors.JOSENotSupported('only RSA, EC and OKP asymmetric keys are supported')\n }\n } else if (secret) {\n return new OctKey(keyObject, parameters)\n }\n\n throw new errors.JWKImportFailed('key import failed')\n}\n\nmodule.exports = asKey\nObject.defineProperty(asKey, 'deprecated', {\n value: deprecate((key, parameters) => { return asKey(key, parameters, { calculateMissingRSAPrimes: true }) }, 'JWK.importKey() is deprecated, use JWK.asKey() instead'),\n enumerable: false\n})\n","const Key = require('./key/base')\nconst None = require('./key/none')\nconst EmbeddedJWK = require('./key/embedded.jwk')\nconst EmbeddedX5C = require('./key/embedded.x5c')\nconst importKey = require('./import')\nconst generate = require('./generate')\n\nmodule.exports = {\n ...generate,\n asKey: importKey,\n isKey: input => input instanceof Key,\n None,\n EmbeddedJWK,\n EmbeddedX5C\n}\n\n/* deprecated */\nObject.defineProperty(module.exports, 'importKey', {\n value: importKey.deprecated,\n enumerable: false\n})\n","const { strict: assert } = require('assert')\nconst { inspect } = require('util')\nconst { EOL } = require('os')\n\nconst { keyObjectSupported } = require('../../help/runtime_support')\nconst { createPublicKey } = require('../../help/key_object')\nconst { keyObjectToJWK } = require('../../help/key_utils')\nconst {\n THUMBPRINT_MATERIAL, PUBLIC_MEMBERS, PRIVATE_MEMBERS, JWK_MEMBERS, KEYOBJECT,\n USES_MAPPING, OPS, USES\n} = require('../../help/consts')\nconst isObject = require('../../help/is_object')\nconst thumbprint = require('../thumbprint')\nconst errors = require('../../errors')\n\nconst privateApi = Symbol('privateApi')\nconst { JWK } = require('../../registry')\n\nclass Key {\n constructor (keyObject, { alg, use, kid, key_ops: ops, x5c, x5t, 'x5t#S256': x5t256 } = {}) {\n if (use !== undefined) {\n if (typeof use !== 'string' || !USES.has(use)) {\n throw new TypeError('`use` must be either \"sig\" or \"enc\" string when provided')\n }\n }\n\n if (alg !== undefined) {\n if (typeof alg !== 'string' || !alg) {\n throw new TypeError('`alg` must be a non-empty string when provided')\n }\n }\n\n if (kid !== undefined) {\n if (typeof kid !== 'string' || !kid) {\n throw new TypeError('`kid` must be a non-empty string when provided')\n }\n }\n\n if (ops !== undefined) {\n if (!Array.isArray(ops) || !ops.length || ops.some(o => typeof o !== 'string')) {\n throw new TypeError('`key_ops` must be a non-empty array of strings when provided')\n }\n ops = Array.from(new Set(ops)).filter(x => OPS.has(x))\n }\n\n if (ops && use) {\n if (\n (use === 'enc' && ops.some(x => USES_MAPPING.sig.has(x))) ||\n (use === 'sig' && ops.some(x => USES_MAPPING.enc.has(x)))\n ) {\n throw new errors.JWKInvalid('inconsistent JWK \"use\" and \"key_ops\"')\n }\n }\n\n if (keyObjectSupported && x5c !== undefined) {\n if (!Array.isArray(x5c) || !x5c.length || x5c.some(c => typeof c !== 'string')) {\n throw new TypeError('`x5c` must be an array of one or more PKIX certificates when provided')\n }\n\n x5c.forEach((cert, i) => {\n let publicKey\n try {\n publicKey = createPublicKey({\n key: `-----BEGIN CERTIFICATE-----${EOL}${(cert.match(/.{1,64}/g) || []).join(EOL)}${EOL}-----END CERTIFICATE-----`, format: 'pem'\n })\n } catch (err) {\n throw new errors.JWKInvalid(`\\`x5c\\` member at index ${i} is not a valid base64-encoded DER PKIX certificate`)\n }\n if (i === 0) {\n try {\n assert.deepEqual(\n publicKey.export({ type: 'spki', format: 'der' }),\n (keyObject.type === 'public' ? keyObject : createPublicKey(keyObject)).export({ type: 'spki', format: 'der' })\n )\n } catch (err) {\n throw new errors.JWKInvalid('The key in the first `x5c` certificate MUST match the public key represented by the JWK')\n }\n }\n })\n }\n\n Object.defineProperties(this, {\n [KEYOBJECT]: { value: isObject(keyObject) ? undefined : keyObject },\n keyObject: {\n get () {\n if (!keyObjectSupported) {\n throw new errors.JOSENotSupported('KeyObject class is not supported in your Node.js runtime version')\n }\n\n return this[KEYOBJECT]\n }\n },\n type: { value: keyObject.type },\n private: { value: keyObject.type === 'private' },\n public: { value: keyObject.type === 'public' },\n secret: { value: keyObject.type === 'secret' },\n alg: { value: alg, enumerable: alg !== undefined },\n use: { value: use, enumerable: use !== undefined },\n x5c: {\n enumerable: x5c !== undefined,\n ...(x5c ? { get () { return [...x5c] } } : { value: undefined })\n },\n key_ops: {\n enumerable: ops !== undefined,\n ...(ops ? { get () { return [...ops] } } : { value: undefined })\n },\n kid: {\n enumerable: true,\n ...(kid ? { value: kid } : {\n get () {\n Object.defineProperty(this, 'kid', { value: this.thumbprint, configurable: false })\n return this.kid\n },\n configurable: true\n })\n },\n ...(x5c ? {\n x5t: {\n enumerable: true,\n ...(x5t ? { value: x5t } : {\n get () {\n Object.defineProperty(this, 'x5t', { value: thumbprint.x5t(this.x5c[0]), configurable: false })\n return this.x5t\n },\n configurable: true\n })\n }\n } : undefined),\n ...(x5c ? {\n 'x5t#S256': {\n enumerable: true,\n ...(x5t256 ? { value: x5t256 } : {\n get () {\n Object.defineProperty(this, 'x5t#S256', { value: thumbprint['x5t#S256'](this.x5c[0]), configurable: false })\n return this['x5t#S256']\n },\n configurable: true\n })\n }\n } : undefined),\n thumbprint: {\n get () {\n Object.defineProperty(this, 'thumbprint', { value: thumbprint.kid(this[THUMBPRINT_MATERIAL]()), configurable: false })\n return this.thumbprint\n },\n configurable: true\n }\n })\n }\n\n toPEM (priv = false, encoding = {}) {\n if (this.secret) {\n throw new TypeError('symmetric keys cannot be exported as PEM')\n }\n\n if (priv && this.public === true) {\n throw new TypeError('public key cannot be exported as private')\n }\n\n const { type = priv ? 'pkcs8' : 'spki', cipher, passphrase } = encoding\n\n let keyObject = this[KEYOBJECT]\n\n if (!priv) {\n if (this.private) {\n keyObject = createPublicKey(keyObject)\n }\n if (cipher || passphrase) {\n throw new TypeError('cipher and passphrase can only be applied when exporting private keys')\n }\n }\n\n if (priv) {\n return keyObject.export({ format: 'pem', type, cipher, passphrase })\n }\n\n return keyObject.export({ format: 'pem', type })\n }\n\n toJWK (priv = false) {\n if (priv && this.public === true) {\n throw new TypeError('public key cannot be exported as private')\n }\n\n const components = [...this.constructor[priv ? PRIVATE_MEMBERS : PUBLIC_MEMBERS]]\n .map(k => [k, this[k]])\n\n const result = {}\n\n Object.keys(components).forEach((key) => {\n const [k, v] = components[key]\n\n result[k] = v\n })\n\n result.kty = this.kty\n result.kid = this.kid\n\n if (this.alg) {\n result.alg = this.alg\n }\n\n if (this.key_ops && this.key_ops.length) {\n result.key_ops = this.key_ops\n }\n\n if (this.use) {\n result.use = this.use\n }\n\n if (this.x5c) {\n result.x5c = this.x5c\n }\n\n if (this.x5t) {\n result.x5t = this.x5t\n }\n\n if (this['x5t#S256']) {\n result['x5t#S256'] = this['x5t#S256']\n }\n\n return result\n }\n\n [JWK_MEMBERS] () {\n const props = this[KEYOBJECT].type === 'private' ? this.constructor[PRIVATE_MEMBERS] : this.constructor[PUBLIC_MEMBERS]\n Object.defineProperties(this, [...props].reduce((acc, component) => {\n acc[component] = {\n get () {\n const jwk = keyObjectToJWK(this[KEYOBJECT])\n Object.defineProperties(\n this,\n Object.entries(jwk)\n .filter(([key]) => props.has(key))\n .reduce((acc, [key, value]) => {\n acc[key] = { value, enumerable: this.constructor[PUBLIC_MEMBERS].has(key), configurable: false }\n return acc\n }, {})\n )\n\n return this[component]\n },\n enumerable: this.constructor[PUBLIC_MEMBERS].has(component),\n configurable: true\n }\n return acc\n }, {}))\n }\n\n /* c8 ignore next 8 */\n [inspect.custom] () {\n return `${this.constructor.name} ${inspect(this.toJWK(false), {\n depth: Infinity,\n colors: process.stdout.isTTY,\n compact: false,\n sorted: true\n })}`\n }\n\n /* c8 ignore next 3 */\n [THUMBPRINT_MATERIAL] () {\n throw new Error(`\"[THUMBPRINT_MATERIAL]()\" is not implemented on ${this.constructor.name}`)\n }\n\n algorithms (operation, /* the rest is private API */ int, opts) {\n const { use = this.use, alg = this.alg, key_ops: ops = this.key_ops } = int === privateApi ? opts : {}\n if (alg) {\n return new Set(this.algorithms(operation, privateApi, { alg: null, use, key_ops: ops }).has(alg) ? [alg] : undefined)\n }\n\n if (typeof operation === 'symbol') {\n try {\n return this[operation]()\n } catch (err) {\n return new Set()\n }\n }\n\n if (operation && ops && !ops.includes(operation)) {\n return new Set()\n }\n\n switch (operation) {\n case 'decrypt':\n case 'deriveKey':\n case 'encrypt':\n case 'sign':\n case 'unwrapKey':\n case 'verify':\n case 'wrapKey':\n return new Set(Object.entries(JWK[this.kty][operation]).map(([alg, fn]) => fn(this) ? alg : undefined).filter(Boolean))\n case undefined:\n return new Set([\n ...this.algorithms('sign'),\n ...this.algorithms('verify'),\n ...this.algorithms('decrypt'),\n ...this.algorithms('encrypt'),\n ...this.algorithms('unwrapKey'),\n ...this.algorithms('wrapKey'),\n ...this.algorithms('deriveKey')\n ])\n default:\n throw new TypeError('invalid key operation')\n }\n }\n\n /* c8 ignore next 3 */\n static async generate () {\n throw new Error(`\"static async generate()\" is not implemented on ${this.name}`)\n }\n\n /* c8 ignore next 3 */\n static generateSync () {\n throw new Error(`\"static generateSync()\" is not implemented on ${this.name}`)\n }\n\n /* c8 ignore next 3 */\n static get [PUBLIC_MEMBERS] () {\n throw new Error(`\"static get [PUBLIC_MEMBERS]()\" is not implemented on ${this.name}`)\n }\n\n /* c8 ignore next 3 */\n static get [PRIVATE_MEMBERS] () {\n throw new Error(`\"static get [PRIVATE_MEMBERS]()\" is not implemented on ${this.name}`)\n }\n}\n\nmodule.exports = Key\n","const { generateKeyPairSync, generateKeyPair: async } = require('crypto')\nconst { promisify } = require('util')\n\nconst {\n THUMBPRINT_MATERIAL, JWK_MEMBERS, PUBLIC_MEMBERS,\n PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT\n} = require('../../help/consts')\nconst { EC_CURVES } = require('../../registry')\nconst { keyObjectSupported } = require('../../help/runtime_support')\nconst { createPublicKey, createPrivateKey } = require('../../help/key_object')\n\nconst errors = require('../../errors')\nconst { name: secp256k1 } = require('./secp256k1_crv')\n\nconst Key = require('./base')\n\nconst generateKeyPair = promisify(async)\n\nconst EC_PUBLIC = new Set(['crv', 'x', 'y'])\nObject.freeze(EC_PUBLIC)\nconst EC_PRIVATE = new Set([...EC_PUBLIC, 'd'])\nObject.freeze(EC_PRIVATE)\n\n// Elliptic Curve Key Type\nclass ECKey extends Key {\n constructor (...args) {\n super(...args)\n this[JWK_MEMBERS]()\n Object.defineProperty(this, 'kty', { value: 'EC', enumerable: true })\n if (!EC_CURVES.has(this.crv)) {\n throw new errors.JOSENotSupported('unsupported EC key curve')\n }\n }\n\n static get [PUBLIC_MEMBERS] () {\n return EC_PUBLIC\n }\n\n static get [PRIVATE_MEMBERS] () {\n return EC_PRIVATE\n }\n\n // https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys no need for any special\n // JSON.stringify handling in V8\n [THUMBPRINT_MATERIAL] () {\n return { crv: this.crv, kty: 'EC', x: this.x, y: this.y }\n }\n\n [KEY_MANAGEMENT_ENCRYPT] () {\n return this.algorithms('deriveKey')\n }\n\n [KEY_MANAGEMENT_DECRYPT] () {\n if (this.public) {\n return new Set()\n }\n return this.algorithms('deriveKey')\n }\n\n static async generate (crv = 'P-256', privat = true) {\n if (!EC_CURVES.has(crv)) {\n throw new errors.JOSENotSupported(`unsupported EC key curve: ${crv}`)\n }\n\n if (crv === secp256k1 && crv !== 'secp256k1') {\n crv = 'secp256k1'\n }\n\n let privateKey, publicKey\n\n if (keyObjectSupported) {\n ({ privateKey, publicKey } = await generateKeyPair('ec', { namedCurve: crv }))\n return privat ? privateKey : publicKey\n }\n\n ({ privateKey, publicKey } = await generateKeyPair('ec', {\n namedCurve: crv,\n publicKeyEncoding: { type: 'spki', format: 'pem' },\n privateKeyEncoding: { type: 'pkcs8', format: 'pem' }\n }))\n\n if (privat) {\n return createPrivateKey(privateKey)\n } else {\n return createPublicKey(publicKey)\n }\n }\n\n static generateSync (crv = 'P-256', privat = true) {\n if (!EC_CURVES.has(crv)) {\n throw new errors.JOSENotSupported(`unsupported EC key curve: ${crv}`)\n }\n\n if (crv === secp256k1 && crv !== 'secp256k1') {\n crv = 'secp256k1'\n }\n\n let privateKey, publicKey\n\n if (keyObjectSupported) {\n ({ privateKey, publicKey } = generateKeyPairSync('ec', { namedCurve: crv }))\n return privat ? privateKey : publicKey\n }\n\n ({ privateKey, publicKey } = generateKeyPairSync('ec', {\n namedCurve: crv,\n publicKeyEncoding: { type: 'spki', format: 'pem' },\n privateKeyEncoding: { type: 'pkcs8', format: 'pem' }\n }))\n\n if (privat) {\n return createPrivateKey(privateKey)\n } else {\n return createPublicKey(publicKey)\n }\n }\n}\n\nmodule.exports = ECKey\n","const { inspect } = require('util')\n\nconst Key = require('./base')\n\nclass EmbeddedJWK extends Key {\n constructor () {\n super({ type: 'embedded' })\n Object.defineProperties(this, {\n kid: { value: undefined },\n kty: { value: undefined },\n thumbprint: { value: undefined },\n toJWK: { value: undefined },\n toPEM: { value: undefined }\n })\n }\n\n /* c8 ignore next 3 */\n [inspect.custom] () {\n return 'Embedded.JWK {}'\n }\n\n algorithms () {\n return new Set()\n }\n}\n\nmodule.exports = new EmbeddedJWK()\n","const { inspect } = require('util')\n\nconst Key = require('./base')\n\nclass EmbeddedX5C extends Key {\n constructor () {\n super({ type: 'embedded' })\n Object.defineProperties(this, {\n kid: { value: undefined },\n kty: { value: undefined },\n thumbprint: { value: undefined },\n toJWK: { value: undefined },\n toPEM: { value: undefined }\n })\n }\n\n /* c8 ignore next 3 */\n [inspect.custom] () {\n return 'Embedded.X5C {}'\n }\n\n algorithms () {\n return new Set()\n }\n}\n\nmodule.exports = new EmbeddedX5C()\n","const { inspect } = require('util')\n\nconst Key = require('./base')\n\nclass NoneKey extends Key {\n constructor () {\n super({ type: 'unsecured' }, { alg: 'none' })\n Object.defineProperties(this, {\n kid: { value: undefined },\n kty: { value: undefined },\n thumbprint: { value: undefined },\n toJWK: { value: undefined },\n toPEM: { value: undefined }\n })\n }\n\n /* c8 ignore next 3 */\n [inspect.custom] () {\n return 'None {}'\n }\n\n algorithms (operation) {\n switch (operation) {\n case 'sign':\n case 'verify':\n case undefined:\n return new Set(['none'])\n default:\n return new Set()\n }\n }\n}\n\nmodule.exports = new NoneKey()\n","const { randomBytes } = require('crypto')\n\nconst { createSecretKey } = require('../../help/key_object')\nconst base64url = require('../../help/base64url')\nconst {\n THUMBPRINT_MATERIAL, PUBLIC_MEMBERS, PRIVATE_MEMBERS,\n KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT, KEYOBJECT\n} = require('../../help/consts')\n\nconst Key = require('./base')\n\nconst OCT_PUBLIC = new Set()\nObject.freeze(OCT_PUBLIC)\nconst OCT_PRIVATE = new Set(['k'])\nObject.freeze(OCT_PRIVATE)\n\n// Octet sequence Key Type\nclass OctKey extends Key {\n constructor (...args) {\n super(...args)\n Object.defineProperties(this, {\n kty: {\n value: 'oct',\n enumerable: true\n },\n length: {\n value: this[KEYOBJECT] ? this[KEYOBJECT].symmetricKeySize * 8 : undefined\n },\n k: {\n enumerable: false,\n get () {\n if (this[KEYOBJECT]) {\n Object.defineProperty(this, 'k', {\n value: base64url.encodeBuffer(this[KEYOBJECT].export()),\n configurable: false\n })\n } else {\n Object.defineProperty(this, 'k', {\n value: undefined,\n configurable: false\n })\n }\n\n return this.k\n },\n configurable: true\n }\n })\n }\n\n static get [PUBLIC_MEMBERS] () {\n return OCT_PUBLIC\n }\n\n static get [PRIVATE_MEMBERS] () {\n return OCT_PRIVATE\n }\n\n // https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys no need for any special\n // JSON.stringify handling in V8\n [THUMBPRINT_MATERIAL] () {\n if (!this[KEYOBJECT]) {\n throw new TypeError('reference \"oct\" keys without \"k\" cannot have their thumbprint calculated')\n }\n return { k: this.k, kty: 'oct' }\n }\n\n [KEY_MANAGEMENT_ENCRYPT] () {\n return new Set([\n ...this.algorithms('wrapKey'),\n ...this.algorithms('deriveKey')\n ])\n }\n\n [KEY_MANAGEMENT_DECRYPT] () {\n return this[KEY_MANAGEMENT_ENCRYPT]()\n }\n\n algorithms (...args) {\n if (!this[KEYOBJECT]) {\n return new Set()\n }\n\n return Key.prototype.algorithms.call(this, ...args)\n }\n\n static async generate (...args) {\n return this.generateSync(...args)\n }\n\n static generateSync (len = 256, privat = true) {\n if (!privat) {\n throw new TypeError('\"oct\" keys cannot be generated as public')\n }\n if (!Number.isSafeInteger(len) || !len || len % 8 !== 0) {\n throw new TypeError('invalid bit length')\n }\n\n return createSecretKey(randomBytes(len / 8))\n }\n}\n\nmodule.exports = OctKey\n","const { generateKeyPairSync, generateKeyPair: async } = require('crypto')\nconst { promisify } = require('util')\n\nconst {\n THUMBPRINT_MATERIAL, JWK_MEMBERS, PUBLIC_MEMBERS,\n PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT\n} = require('../../help/consts')\nconst { OKP_CURVES } = require('../../registry')\nconst { edDSASupported } = require('../../help/runtime_support')\nconst errors = require('../../errors')\n\nconst Key = require('./base')\n\nconst generateKeyPair = promisify(async)\n\nconst OKP_PUBLIC = new Set(['crv', 'x'])\nObject.freeze(OKP_PUBLIC)\nconst OKP_PRIVATE = new Set([...OKP_PUBLIC, 'd'])\nObject.freeze(OKP_PRIVATE)\n\n// Octet string key pairs Key Type\nclass OKPKey extends Key {\n constructor (...args) {\n super(...args)\n this[JWK_MEMBERS]()\n Object.defineProperty(this, 'kty', { value: 'OKP', enumerable: true })\n if (!OKP_CURVES.has(this.crv)) {\n throw new errors.JOSENotSupported('unsupported OKP key curve')\n }\n }\n\n static get [PUBLIC_MEMBERS] () {\n return OKP_PUBLIC\n }\n\n static get [PRIVATE_MEMBERS] () {\n return OKP_PRIVATE\n }\n\n // https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys no need for any special\n // JSON.stringify handling in V8\n [THUMBPRINT_MATERIAL] () {\n return { crv: this.crv, kty: 'OKP', x: this.x }\n }\n\n [KEY_MANAGEMENT_ENCRYPT] () {\n return this.algorithms('deriveKey')\n }\n\n [KEY_MANAGEMENT_DECRYPT] () {\n if (this.public) {\n return new Set()\n }\n return this.algorithms('deriveKey')\n }\n\n static async generate (crv = 'Ed25519', privat = true) {\n if (!edDSASupported) {\n throw new errors.JOSENotSupported('OKP keys are not supported in your Node.js runtime version')\n }\n\n if (!OKP_CURVES.has(crv)) {\n throw new errors.JOSENotSupported(`unsupported OKP key curve: ${crv}`)\n }\n\n const { privateKey, publicKey } = await generateKeyPair(crv.toLowerCase())\n\n return privat ? privateKey : publicKey\n }\n\n static generateSync (crv = 'Ed25519', privat = true) {\n if (!edDSASupported) {\n throw new errors.JOSENotSupported('OKP keys are not supported in your Node.js runtime version')\n }\n\n if (!OKP_CURVES.has(crv)) {\n throw new errors.JOSENotSupported(`unsupported OKP key curve: ${crv}`)\n }\n\n const { privateKey, publicKey } = generateKeyPairSync(crv.toLowerCase())\n\n return privat ? privateKey : publicKey\n }\n}\n\nmodule.exports = OKPKey\n","const { generateKeyPairSync, generateKeyPair: async } = require('crypto')\nconst { promisify } = require('util')\n\nconst {\n THUMBPRINT_MATERIAL, JWK_MEMBERS, PUBLIC_MEMBERS,\n PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT\n} = require('../../help/consts')\nconst { keyObjectSupported } = require('../../help/runtime_support')\nconst { createPublicKey, createPrivateKey } = require('../../help/key_object')\n\nconst Key = require('./base')\n\nconst generateKeyPair = promisify(async)\n\nconst RSA_PUBLIC = new Set(['e', 'n'])\nObject.freeze(RSA_PUBLIC)\nconst RSA_PRIVATE = new Set([...RSA_PUBLIC, 'd', 'p', 'q', 'dp', 'dq', 'qi'])\nObject.freeze(RSA_PRIVATE)\n\n// RSA Key Type\nclass RSAKey extends Key {\n constructor (...args) {\n super(...args)\n this[JWK_MEMBERS]()\n Object.defineProperties(this, {\n kty: {\n value: 'RSA',\n enumerable: true\n },\n length: {\n get () {\n Object.defineProperty(this, 'length', {\n value: Buffer.byteLength(this.n, 'base64') * 8,\n configurable: false\n })\n\n return this.length\n },\n configurable: true\n }\n })\n }\n\n static get [PUBLIC_MEMBERS] () {\n return RSA_PUBLIC\n }\n\n static get [PRIVATE_MEMBERS] () {\n return RSA_PRIVATE\n }\n\n // https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys no need for any special\n // JSON.stringify handling in V8\n [THUMBPRINT_MATERIAL] () {\n return { e: this.e, kty: 'RSA', n: this.n }\n }\n\n [KEY_MANAGEMENT_ENCRYPT] () {\n return this.algorithms('wrapKey')\n }\n\n [KEY_MANAGEMENT_DECRYPT] () {\n return this.algorithms('unwrapKey')\n }\n\n static async generate (len = 2048, privat = true) {\n if (!Number.isSafeInteger(len) || len < 512 || len % 8 !== 0 || (('electron' in process.versions) && len % 128 !== 0)) {\n throw new TypeError('invalid bit length')\n }\n\n let privateKey, publicKey\n\n if (keyObjectSupported) {\n ({ privateKey, publicKey } = await generateKeyPair('rsa', { modulusLength: len }))\n return privat ? privateKey : publicKey\n }\n\n ({ privateKey, publicKey } = await generateKeyPair('rsa', {\n modulusLength: len,\n publicKeyEncoding: { type: 'spki', format: 'pem' },\n privateKeyEncoding: { type: 'pkcs8', format: 'pem' }\n }))\n\n if (privat) {\n return createPrivateKey(privateKey)\n } else {\n return createPublicKey(publicKey)\n }\n }\n\n static generateSync (len = 2048, privat = true) {\n if (!Number.isSafeInteger(len) || len < 512 || len % 8 !== 0 || (('electron' in process.versions) && len % 128 !== 0)) {\n throw new TypeError('invalid bit length')\n }\n\n let privateKey, publicKey\n\n if (keyObjectSupported) {\n ({ privateKey, publicKey } = generateKeyPairSync('rsa', { modulusLength: len }))\n return privat ? privateKey : publicKey\n }\n\n ({ privateKey, publicKey } = generateKeyPairSync('rsa', {\n modulusLength: len,\n publicKeyEncoding: { type: 'spki', format: 'pem' },\n privateKeyEncoding: { type: 'pkcs8', format: 'pem' }\n }))\n\n if (privat) {\n return createPrivateKey(privateKey)\n } else {\n return createPublicKey(publicKey)\n }\n }\n}\n\nmodule.exports = RSAKey\n","const { deprecate } = require('util')\n\nconst deprecation = deprecate(() => {}, '\"P-256K\" EC curve name is deprecated')\n\nmodule.exports = {\n name: 'secp256k1',\n rename (value) {\n if (value !== 'secp256k1') {\n deprecation()\n }\n module.exports.name = value\n }\n}\n","const { createHash } = require('crypto')\n\nconst base64url = require('../help/base64url')\n\nconst x5t = (hash, cert) => base64url.encodeBuffer(createHash(hash).update(Buffer.from(cert, 'base64')).digest())\n\nmodule.exports.kid = components => base64url.encodeBuffer(createHash('sha256').update(JSON.stringify(components)).digest())\nmodule.exports.x5t = x5t.bind(undefined, 'sha1')\nmodule.exports['x5t#S256'] = x5t.bind(undefined, 'sha256')\n","const KeyStore = require('./keystore')\n\nmodule.exports = KeyStore\n","const { deprecate, inspect } = require('util')\n\nconst isObject = require('../help/is_object')\nconst { generate, generateSync } = require('../jwk/generate')\nconst { USES_MAPPING } = require('../help/consts')\nconst { isKey, asKey: importKey } = require('../jwk')\n\nconst keyscore = (key, { alg, use, ops }) => {\n let score = 0\n\n if (alg && key.alg) {\n score++\n }\n\n if (use && key.use) {\n score++\n }\n\n if (ops && key.key_ops) {\n score++\n }\n\n return score\n}\n\nclass KeyStore {\n constructor (...keys) {\n while (keys.some(Array.isArray)) {\n keys = keys.flat ? keys.flat() : keys.reduce((acc, val) => {\n if (Array.isArray(val)) {\n return [...acc, ...val]\n }\n\n acc.push(val)\n return acc\n }, [])\n }\n if (keys.some(k => !isKey(k) || !k.kty)) {\n throw new TypeError('all keys must be instances of a key instantiated by JWK.asKey')\n }\n\n this._keys = new Set(keys)\n }\n\n all ({ alg, kid, thumbprint, use, kty, key_ops: ops, x5t, 'x5t#S256': x5t256, crv } = {}) {\n if (ops !== undefined && (!Array.isArray(ops) || !ops.length || ops.some(x => typeof x !== 'string'))) {\n throw new TypeError('`key_ops` must be a non-empty array of strings')\n }\n\n const search = { alg, use, ops }\n return [...this._keys]\n .filter((key) => {\n let candidate = true\n\n if (candidate && kid !== undefined && key.kid !== kid) {\n candidate = false\n }\n\n if (candidate && thumbprint !== undefined && key.thumbprint !== thumbprint) {\n candidate = false\n }\n\n if (candidate && x5t !== undefined && key.x5t !== x5t) {\n candidate = false\n }\n\n if (candidate && x5t256 !== undefined && key['x5t#S256'] !== x5t256) {\n candidate = false\n }\n\n if (candidate && kty !== undefined && key.kty !== kty) {\n candidate = false\n }\n\n if (candidate && crv !== undefined && (key.crv !== crv)) {\n candidate = false\n }\n\n if (alg !== undefined && !key.algorithms().has(alg)) {\n candidate = false\n }\n\n if (candidate && use !== undefined && (key.use !== undefined && key.use !== use)) {\n candidate = false\n }\n\n // TODO:\n if (candidate && ops !== undefined && (key.key_ops !== undefined || key.use !== undefined)) {\n let keyOps\n if (key.key_ops) {\n keyOps = new Set(key.key_ops)\n } else {\n keyOps = USES_MAPPING[key.use]\n }\n if (ops.some(x => !keyOps.has(x))) {\n candidate = false\n }\n }\n\n return candidate\n })\n .sort((first, second) => keyscore(second, search) - keyscore(first, search))\n }\n\n get (...args) {\n return this.all(...args)[0]\n }\n\n add (key) {\n if (!isKey(key) || !key.kty) {\n throw new TypeError('key must be an instance of a key instantiated by JWK.asKey')\n }\n\n this._keys.add(key)\n }\n\n remove (key) {\n if (!isKey(key)) {\n throw new TypeError('key must be an instance of a key instantiated by JWK.asKey')\n }\n\n this._keys.delete(key)\n }\n\n toJWKS (priv = false) {\n return {\n keys: [...this._keys.values()].map(\n key => key.toJWK(priv && (key.private || (key.secret && key.k)))\n )\n }\n }\n\n async generate (...args) {\n this._keys.add(await generate(...args))\n }\n\n generateSync (...args) {\n this._keys.add(generateSync(...args))\n }\n\n get size () {\n return this._keys.size\n }\n\n /* c8 ignore next 8 */\n [inspect.custom] () {\n return `${this.constructor.name} ${inspect(this.toJWKS(false), {\n depth: Infinity,\n colors: process.stdout.isTTY,\n compact: false,\n sorted: true\n })}`\n }\n\n * [Symbol.iterator] () {\n for (const key of this._keys) {\n yield key\n }\n }\n}\n\nfunction asKeyStore (jwks, { ignoreErrors = false, calculateMissingRSAPrimes = false } = {}) {\n if (!isObject(jwks) || !Array.isArray(jwks.keys) || jwks.keys.some(k => !isObject(k) || !('kty' in k))) {\n throw new TypeError('jwks must be a JSON Web Key Set formatted object')\n }\n\n const keys = jwks.keys.map((jwk) => {\n try {\n return importKey(jwk, { calculateMissingRSAPrimes })\n } catch (err) {\n if (!ignoreErrors) {\n throw err\n }\n }\n }).filter(Boolean)\n\n return new KeyStore(...keys)\n}\n\nObject.defineProperty(KeyStore, 'fromJWKS', {\n value: deprecate(jwks => asKeyStore(jwks, { calculateMissingRSAPrimes: true }), 'JWKS.KeyStore.fromJWKS() is deprecated, use JWKS.asKeyStore() instead'),\n enumerable: false\n})\n\nmodule.exports = { KeyStore, asKeyStore }\n","const Sign = require('./sign')\nconst { verify } = require('./verify')\n\nconst single = (serialization, payload, key, protectedHeader, unprotectedHeader) => {\n return new Sign(payload)\n .recipient(key, protectedHeader, unprotectedHeader)\n .sign(serialization)\n}\n\nmodule.exports.Sign = Sign\nmodule.exports.sign = single.bind(undefined, 'compact')\nmodule.exports.sign.flattened = single.bind(undefined, 'flattened')\nmodule.exports.sign.general = single.bind(undefined, 'general')\n\nmodule.exports.verify = verify\n","const isObject = require('../help/is_object')\nlet validateCrit = require('../help/validate_crit')\nconst { JWSInvalid } = require('../errors')\n\nvalidateCrit = validateCrit.bind(undefined, JWSInvalid)\n\nconst compactSerializer = (payload, [recipient]) => {\n return `${recipient.protected}.${payload}.${recipient.signature}`\n}\ncompactSerializer.validate = (jws, { 0: { unprotectedHeader, protectedHeader }, length }) => {\n if (length !== 1 || unprotectedHeader) {\n throw new JWSInvalid('JWS Compact Serialization doesn\\'t support multiple recipients or JWS unprotected headers')\n }\n validateCrit(protectedHeader, unprotectedHeader, protectedHeader ? protectedHeader.crit : undefined)\n}\n\nconst flattenedSerializer = (payload, [recipient]) => {\n const { header, signature, protected: prot } = recipient\n\n return {\n payload,\n ...prot ? { protected: prot } : undefined,\n ...header ? { header } : undefined,\n signature\n }\n}\nflattenedSerializer.validate = (jws, { 0: { unprotectedHeader, protectedHeader }, length }) => {\n if (length !== 1) {\n throw new JWSInvalid('Flattened JWS JSON Serialization doesn\\'t support multiple recipients')\n }\n validateCrit(protectedHeader, unprotectedHeader, protectedHeader ? protectedHeader.crit : undefined)\n}\n\nconst generalSerializer = (payload, recipients) => {\n return {\n payload,\n signatures: recipients.map(({ header, signature, protected: prot }) => {\n return {\n ...prot ? { protected: prot } : undefined,\n ...header ? { header } : undefined,\n signature\n }\n })\n }\n}\ngeneralSerializer.validate = (jws, recipients) => {\n let validateB64 = false\n recipients.forEach(({ protectedHeader, unprotectedHeader }) => {\n if (protectedHeader && !validateB64 && 'b64' in protectedHeader) {\n validateB64 = true\n }\n validateCrit(protectedHeader, unprotectedHeader, protectedHeader ? protectedHeader.crit : undefined)\n })\n\n if (validateB64) {\n const values = recipients.map(({ protectedHeader }) => protectedHeader && protectedHeader.b64)\n if (!values.every((actual, i, [expected]) => actual === expected)) {\n throw new JWSInvalid('the \"b64\" Header Parameter value MUST be the same for all recipients')\n }\n }\n}\n\nconst isJSON = (input) => {\n return isObject(input) && (typeof input.payload === 'string' || Buffer.isBuffer(input.payload))\n}\n\nconst isValidRecipient = (recipient) => {\n return isObject(recipient) && typeof recipient.signature === 'string' &&\n (recipient.header === undefined || isObject(recipient.header)) &&\n (recipient.protected === undefined || typeof recipient.protected === 'string')\n}\n\nconst isMultiRecipient = (input) => {\n if (Array.isArray(input.signatures) && input.signatures.every(isValidRecipient)) {\n return true\n }\n\n return false\n}\n\nconst detect = (input) => {\n if (typeof input === 'string' && input.split('.').length === 3) {\n return 'compact'\n }\n\n if (isJSON(input)) {\n if (isMultiRecipient(input)) {\n return 'general'\n }\n\n if (isValidRecipient(input)) {\n return 'flattened'\n }\n }\n\n throw new JWSInvalid('JWS malformed or invalid serialization')\n}\n\nmodule.exports = {\n compact: compactSerializer,\n flattened: flattenedSerializer,\n general: generalSerializer,\n detect\n}\n","const base64url = require('../help/base64url')\nconst isDisjoint = require('../help/is_disjoint')\nconst isObject = require('../help/is_object')\nconst deepClone = require('../help/deep_clone')\nconst { JWSInvalid } = require('../errors')\nconst { sign } = require('../jwa')\nconst getKey = require('../help/get_key')\n\nconst serializers = require('./serializers')\n\nconst PROCESS_RECIPIENT = Symbol('PROCESS_RECIPIENT')\n\nclass Sign {\n constructor (payload) {\n if (typeof payload === 'string') {\n payload = base64url.encode(payload)\n } else if (Buffer.isBuffer(payload)) {\n payload = base64url.encodeBuffer(payload)\n this._binary = true\n } else if (isObject(payload)) {\n payload = base64url.JSON.encode(payload)\n } else {\n throw new TypeError('payload argument must be a Buffer, string or an object')\n }\n\n this._payload = payload\n this._recipients = []\n }\n\n /*\n * @public\n */\n recipient (key, protectedHeader, unprotectedHeader) {\n key = getKey(key)\n\n if (protectedHeader !== undefined && !isObject(protectedHeader)) {\n throw new TypeError('protectedHeader argument must be a plain object when provided')\n }\n\n if (unprotectedHeader !== undefined && !isObject(unprotectedHeader)) {\n throw new TypeError('unprotectedHeader argument must be a plain object when provided')\n }\n\n if (!isDisjoint(protectedHeader, unprotectedHeader)) {\n throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint')\n }\n\n this._recipients.push({\n key,\n protectedHeader: protectedHeader ? deepClone(protectedHeader) : undefined,\n unprotectedHeader: unprotectedHeader ? deepClone(unprotectedHeader) : undefined\n })\n\n return this\n }\n\n /*\n * @private\n */\n [PROCESS_RECIPIENT] (recipient, first) {\n const { key, protectedHeader, unprotectedHeader } = recipient\n\n if (key.use === 'enc') {\n throw new TypeError('a key with \"use\":\"enc\" is not usable for signing')\n }\n\n const joseHeader = {\n protected: protectedHeader || {},\n unprotected: unprotectedHeader || {}\n }\n\n let alg = joseHeader.protected.alg || joseHeader.unprotected.alg\n\n if (!alg) {\n alg = key.alg || [...key.algorithms('sign')][0]\n if (recipient.protectedHeader) {\n joseHeader.protected.alg = recipient.protectedHeader.alg = alg\n } else {\n joseHeader.protected = recipient.protectedHeader = { alg }\n }\n }\n\n if (!alg) {\n throw new JWSInvalid('could not resolve a usable \"alg\" for a recipient')\n }\n\n recipient.header = unprotectedHeader\n recipient.protected = Object.keys(joseHeader.protected).length ? base64url.JSON.encode(joseHeader.protected) : ''\n\n if (first && joseHeader.protected.crit && joseHeader.protected.crit.includes('b64') && joseHeader.protected.b64 === false) {\n if (this._binary) {\n this._payload = base64url.decodeToBuffer(this._payload)\n } else {\n this._payload = base64url.decode(this._payload)\n }\n }\n\n const data = Buffer.concat([\n Buffer.from(recipient.protected || ''),\n Buffer.from('.'),\n Buffer.from(this._payload)\n ])\n\n recipient.signature = base64url.encodeBuffer(sign(alg, key, data))\n }\n\n /*\n * @public\n */\n sign (serialization) {\n const serializer = serializers[serialization]\n if (!serializer) {\n throw new TypeError('serialization must be one of \"compact\", \"flattened\", \"general\"')\n }\n\n if (!this._recipients.length) {\n throw new JWSInvalid('missing recipients')\n }\n\n serializer.validate(this, this._recipients)\n\n this._recipients.forEach((recipient, i) => {\n this[PROCESS_RECIPIENT](recipient, i === 0)\n })\n\n return serializer(this._payload, this._recipients)\n }\n}\n\nmodule.exports = Sign\n","const { EOL } = require('os')\n\nconst base64url = require('../help/base64url')\nconst isDisjoint = require('../help/is_disjoint')\nconst isObject = require('../help/is_object')\nlet validateCrit = require('../help/validate_crit')\nconst getKey = require('../help/get_key')\nconst { KeyStore } = require('../jwks')\nconst errors = require('../errors')\nconst { check, verify } = require('../jwa')\nconst JWK = require('../jwk')\n\nconst { detect: resolveSerialization } = require('./serializers')\n\nvalidateCrit = validateCrit.bind(undefined, errors.JWSInvalid)\nconst SINGLE_RECIPIENT = new Set(['compact', 'flattened', 'preparsed'])\n\n/*\n * @public\n */\nconst jwsVerify = (skipDisjointCheck, serialization, jws, key, { crit = [], complete = false, algorithms, parse = true, encoding = 'utf8' } = {}) => {\n key = getKey(key, true)\n\n if (algorithms !== undefined && (!Array.isArray(algorithms) || algorithms.some(s => typeof s !== 'string' || !s))) {\n throw new TypeError('\"algorithms\" option must be an array of non-empty strings')\n } else if (algorithms) {\n algorithms = new Set(algorithms)\n }\n\n if (!Array.isArray(crit) || crit.some(s => typeof s !== 'string' || !s)) {\n throw new TypeError('\"crit\" option must be an array of non-empty strings')\n }\n\n if (!serialization) {\n serialization = resolveSerialization(jws)\n }\n\n let prot // protected header\n let header // unprotected header\n let payload\n let signature\n let alg\n\n // treat general format with one recipient as flattened\n // skips iteration and avoids multi errors in this case\n if (serialization === 'general' && jws.signatures.length === 1) {\n serialization = 'flattened'\n const { signatures, ...root } = jws\n jws = { ...root, ...signatures[0] }\n }\n\n let decoded\n\n if (SINGLE_RECIPIENT.has(serialization)) {\n let parsedProt = {}\n\n switch (serialization) {\n case 'compact': // compact serialization format\n ([prot, payload, signature] = jws.split('.'))\n break\n case 'flattened': // flattened serialization format\n ({ protected: prot, payload, signature, header } = jws)\n break\n case 'preparsed': { // from the JWT module\n ({ decoded } = jws);\n ([prot, payload, signature] = jws.token.split('.'))\n break\n }\n }\n\n if (!header) {\n skipDisjointCheck = true\n }\n\n if (decoded) {\n parsedProt = decoded.header\n } else if (prot) {\n try {\n parsedProt = base64url.JSON.decode(prot)\n } catch (err) {\n throw new errors.JWSInvalid('could not parse JWS protected header')\n }\n } else {\n skipDisjointCheck = skipDisjointCheck || true\n }\n\n if (!skipDisjointCheck && !isDisjoint(parsedProt, header)) {\n throw new errors.JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint')\n }\n\n const combinedHeader = { ...parsedProt, ...header }\n validateCrit(parsedProt, header, crit)\n\n alg = parsedProt.alg || (header && header.alg)\n if (!alg) {\n throw new errors.JWSInvalid('missing JWS signature algorithm')\n } else if (algorithms && !algorithms.has(alg)) {\n throw new errors.JOSEAlgNotWhitelisted('alg not whitelisted')\n }\n\n if (key instanceof KeyStore) {\n const keystore = key\n const keys = keystore.all({ kid: combinedHeader.kid, alg: combinedHeader.alg, key_ops: ['verify'] })\n switch (keys.length) {\n case 0:\n throw new errors.JWKSNoMatchingKey()\n case 1:\n // treat the call as if a Key instance was passed in\n // skips iteration and avoids multi errors in this case\n key = keys[0]\n break\n default: {\n const errs = []\n for (const key of keys) {\n try {\n return jwsVerify(true, serialization, jws, key, { crit, complete, encoding, parse, algorithms: algorithms ? [...algorithms] : undefined })\n } catch (err) {\n errs.push(err)\n continue\n }\n }\n\n const multi = new errors.JOSEMultiError(errs)\n if ([...multi].some(e => e instanceof errors.JWSVerificationFailed)) {\n throw new errors.JWSVerificationFailed()\n }\n throw multi\n }\n }\n }\n\n if (key === JWK.EmbeddedJWK) {\n if (!isObject(combinedHeader.jwk)) {\n throw new errors.JWSInvalid('JWS Header Parameter \"jwk\" must be a JSON object')\n }\n key = JWK.asKey(combinedHeader.jwk)\n if (key.type !== 'public') {\n throw new errors.JWSInvalid('JWS Header Parameter \"jwk\" must be a public key')\n }\n } else if (key === JWK.EmbeddedX5C) {\n if (!Array.isArray(combinedHeader.x5c) || !combinedHeader.x5c.length || combinedHeader.x5c.some(c => typeof c !== 'string' || !c)) {\n throw new errors.JWSInvalid('JWS Header Parameter \"x5c\" must be a JSON array of certificate value strings')\n }\n key = JWK.asKey(\n `-----BEGIN CERTIFICATE-----${EOL}${(combinedHeader.x5c[0].match(/.{1,64}/g) || []).join(EOL)}${EOL}-----END CERTIFICATE-----`,\n { x5c: combinedHeader.x5c }\n )\n }\n\n check(key, 'verify', alg)\n\n const toBeVerified = Buffer.concat([\n Buffer.from(prot || ''),\n Buffer.from('.'),\n Buffer.isBuffer(payload) ? payload : Buffer.from(payload)\n ])\n\n if (!verify(alg, key, toBeVerified, base64url.decodeToBuffer(signature))) {\n throw new errors.JWSVerificationFailed()\n }\n\n if (!combinedHeader.crit || !combinedHeader.crit.includes('b64') || combinedHeader.b64) {\n if (parse) {\n payload = decoded ? decoded.payload : base64url.JSON.decode.try(payload, encoding)\n } else {\n payload = base64url.decodeToBuffer(payload)\n }\n }\n\n if (complete) {\n const result = { payload, key }\n if (prot) result.protected = parsedProt\n if (header) result.header = header\n return result\n }\n\n return payload\n }\n\n // general serialization format\n const { signatures, ...root } = jws\n const errs = []\n for (const recipient of signatures) {\n try {\n return jwsVerify(false, 'flattened', { ...root, ...recipient }, key, { crit, complete, encoding, parse, algorithms: algorithms ? [...algorithms] : undefined })\n } catch (err) {\n errs.push(err)\n continue\n }\n }\n\n const multi = new errors.JOSEMultiError(errs)\n if ([...multi].some(e => e instanceof errors.JWSVerificationFailed)) {\n throw new errors.JWSVerificationFailed()\n } else if ([...multi].every(e => e instanceof errors.JWKSNoMatchingKey)) {\n throw new errors.JWKSNoMatchingKey()\n }\n throw multi\n}\n\nmodule.exports = {\n bare: jwsVerify,\n verify: jwsVerify.bind(undefined, false, undefined)\n}\n","const base64url = require('../help/base64url')\nconst errors = require('../errors')\n\nmodule.exports = (token, { complete = false } = {}) => {\n if (typeof token !== 'string' || !token) {\n throw new TypeError('JWT must be a string')\n }\n\n const { 0: header, 1: payload, 2: signature, length } = token.split('.')\n\n if (length === 5) {\n throw new TypeError('JWTs must be decrypted first')\n }\n\n if (length !== 3) {\n throw new errors.JWTMalformed('JWTs must have three components')\n }\n\n try {\n const result = {\n header: base64url.JSON.decode(header),\n payload: base64url.JSON.decode(payload),\n signature\n }\n\n return complete ? result : result.payload\n } catch (err) {\n throw new errors.JWTMalformed('JWT is malformed')\n }\n}\n","const decode = require('./decode')\nconst sign = require('./sign')\nconst verify = require('./verify')\nconst profiles = require('./profiles')\n\nmodule.exports = {\n decode,\n sign,\n verify,\n ...profiles\n}\n","const verify = require('./verify')\n\nmodule.exports = {\n IdToken: { verify: (token, key, options) => verify(token, key, { ...options, profile: 'id_token' }) },\n LogoutToken: { verify: (token, key, options) => verify(token, key, { ...options, profile: 'logout_token' }) },\n AccessToken: { verify: (token, key, options) => verify(token, key, { ...options, profile: 'at+JWT' }) }\n}\n","const isNotString = val => typeof val !== 'string' || val.length === 0\n\nmodule.exports.isNotString = isNotString\nmodule.exports.isString = function isString (Err, value, label, claim, required = false) {\n if (required && value === undefined) {\n throw new Err(`${label} is missing`, claim, 'missing')\n }\n\n if (value !== undefined && isNotString(value)) {\n throw new Err(`${label} must be a string`, claim, 'invalid')\n }\n}\n","const isObject = require('../help/is_object')\nconst secs = require('../help/secs')\nconst epoch = require('../help/epoch')\nconst getKey = require('../help/get_key')\nconst JWS = require('../jws')\n\nconst isString = require('./shared_validations').isString.bind(undefined, TypeError)\n\nconst validateOptions = (options) => {\n if (typeof options.iat !== 'boolean') {\n throw new TypeError('options.iat must be a boolean')\n }\n\n if (typeof options.kid !== 'boolean') {\n throw new TypeError('options.kid must be a boolean')\n }\n\n isString(options.subject, 'options.subject')\n isString(options.issuer, 'options.issuer')\n\n if (\n options.audience !== undefined &&\n (\n (typeof options.audience !== 'string' || !options.audience) &&\n (!Array.isArray(options.audience) || options.audience.length === 0 || options.audience.some(a => !a || typeof a !== 'string'))\n )\n ) {\n throw new TypeError('options.audience must be a string or an array of strings')\n }\n\n if (!isObject(options.header)) {\n throw new TypeError('options.header must be an object')\n }\n\n isString(options.algorithm, 'options.algorithm')\n isString(options.expiresIn, 'options.expiresIn')\n isString(options.notBefore, 'options.notBefore')\n isString(options.jti, 'options.jti')\n isString(options.nonce, 'options.nonce')\n\n if (options.now !== undefined && (!(options.now instanceof Date) || !options.now.getTime())) {\n throw new TypeError('options.now must be a valid Date object')\n }\n}\n\nmodule.exports = (payload, key, options = {}) => {\n if (!isObject(options)) {\n throw new TypeError('options must be an object')\n }\n\n const {\n algorithm, audience, expiresIn, header = {}, iat = true,\n issuer, jti, kid = true, nonce, notBefore, subject, now\n } = options\n\n validateOptions({\n algorithm, audience, expiresIn, header, iat, issuer, jti, kid, nonce, notBefore, now, subject\n })\n\n if (!isObject(payload)) {\n throw new TypeError('payload must be an object')\n }\n\n let unix\n if (expiresIn || notBefore || iat) {\n unix = epoch(now || new Date())\n }\n\n payload = {\n ...payload,\n sub: subject || payload.sub,\n aud: audience || payload.aud,\n iss: issuer || payload.iss,\n jti: jti || payload.jti,\n iat: iat ? unix : payload.iat,\n nonce: nonce || payload.nonce,\n exp: expiresIn ? unix + secs(expiresIn) : payload.exp,\n nbf: notBefore ? unix + secs(notBefore) : payload.nbf\n }\n\n key = getKey(key)\n\n let includeKid\n\n if (typeof options.kid === 'boolean') {\n includeKid = kid\n } else {\n includeKid = !key.secret\n }\n\n return JWS.sign(JSON.stringify(payload), key, {\n ...header,\n alg: algorithm || header.alg,\n kid: includeKid ? key.kid : header.kid\n })\n}\n","const isObject = require('../help/is_object')\nconst epoch = require('../help/epoch')\nconst secs = require('../help/secs')\nconst getKey = require('../help/get_key')\nconst { bare: verify } = require('../jws/verify')\nconst { JWTClaimInvalid, JWTExpired } = require('../errors')\n\nconst { isString, isNotString } = require('./shared_validations')\nconst decode = require('./decode')\n\nconst isPayloadString = isString.bind(undefined, JWTClaimInvalid)\nconst isOptionString = isString.bind(undefined, TypeError)\n\nconst IDTOKEN = 'id_token'\nconst LOGOUTTOKEN = 'logout_token'\nconst ATJWT = 'at+JWT'\n\nconst isTimestamp = (value, label, required = false) => {\n if (required && value === undefined) {\n throw new JWTClaimInvalid(`\"${label}\" claim is missing`, label, 'missing')\n }\n\n if (value !== undefined && (typeof value !== 'number')) {\n throw new JWTClaimInvalid(`\"${label}\" claim must be a JSON numeric value`, label, 'invalid')\n }\n}\n\nconst isStringOrArrayOfStrings = (value, label, required = false) => {\n if (required && value === undefined) {\n throw new JWTClaimInvalid(`\"${label}\" claim is missing`, label, 'missing')\n }\n\n if (value !== undefined && (isNotString(value) && isNotArrayOfStrings(value))) {\n throw new JWTClaimInvalid(`\"${label}\" claim must be a string or array of strings`, label, 'invalid')\n }\n}\n\nconst isNotArrayOfStrings = val => !Array.isArray(val) || val.length === 0 || val.some(isNotString)\nconst normalizeTyp = (value) => value.toLowerCase().replace(/^application\\//, '')\n\nconst validateOptions = ({\n algorithms, audience, clockTolerance, complete = false, crit, ignoreExp = false,\n ignoreIat = false, ignoreNbf = false, issuer, jti, maxAuthAge, maxTokenAge, nonce, now = new Date(),\n profile, subject, typ\n}) => {\n isOptionString(profile, 'options.profile')\n\n if (typeof complete !== 'boolean') {\n throw new TypeError('options.complete must be a boolean')\n }\n\n if (typeof ignoreExp !== 'boolean') {\n throw new TypeError('options.ignoreExp must be a boolean')\n }\n\n if (typeof ignoreNbf !== 'boolean') {\n throw new TypeError('options.ignoreNbf must be a boolean')\n }\n\n if (typeof ignoreIat !== 'boolean') {\n throw new TypeError('options.ignoreIat must be a boolean')\n }\n\n isOptionString(maxTokenAge, 'options.maxTokenAge')\n isOptionString(subject, 'options.subject')\n isOptionString(maxAuthAge, 'options.maxAuthAge')\n isOptionString(jti, 'options.jti')\n isOptionString(clockTolerance, 'options.clockTolerance')\n isOptionString(typ, 'options.typ')\n\n if (issuer !== undefined && (isNotString(issuer) && isNotArrayOfStrings(issuer))) {\n throw new TypeError('options.issuer must be a string or an array of strings')\n }\n\n if (audience !== undefined && (isNotString(audience) && isNotArrayOfStrings(audience))) {\n throw new TypeError('options.audience must be a string or an array of strings')\n }\n\n if (algorithms !== undefined && isNotArrayOfStrings(algorithms)) {\n throw new TypeError('options.algorithms must be an array of strings')\n }\n\n isOptionString(nonce, 'options.nonce')\n\n if (!(now instanceof Date) || !now.getTime()) {\n throw new TypeError('options.now must be a valid Date object')\n }\n\n if (ignoreIat && maxTokenAge !== undefined) {\n throw new TypeError('options.ignoreIat and options.maxTokenAge cannot used together')\n }\n\n if (crit !== undefined && isNotArrayOfStrings(crit)) {\n throw new TypeError('options.crit must be an array of strings')\n }\n\n switch (profile) {\n case IDTOKEN:\n if (!issuer) {\n throw new TypeError('\"issuer\" option is required to validate an ID Token')\n }\n\n if (!audience) {\n throw new TypeError('\"audience\" option is required to validate an ID Token')\n }\n\n break\n case ATJWT:\n if (!issuer) {\n throw new TypeError('\"issuer\" option is required to validate a JWT Access Token')\n }\n\n if (!audience) {\n throw new TypeError('\"audience\" option is required to validate a JWT Access Token')\n }\n\n typ = ATJWT\n\n break\n case LOGOUTTOKEN:\n if (!issuer) {\n throw new TypeError('\"issuer\" option is required to validate a Logout Token')\n }\n\n if (!audience) {\n throw new TypeError('\"audience\" option is required to validate a Logout Token')\n }\n\n break\n case undefined:\n break\n default:\n throw new TypeError(`unsupported options.profile value \"${profile}\"`)\n }\n\n return {\n algorithms,\n audience,\n clockTolerance,\n complete,\n crit,\n ignoreExp,\n ignoreIat,\n ignoreNbf,\n issuer,\n jti,\n maxAuthAge,\n maxTokenAge,\n nonce,\n now,\n profile,\n subject,\n typ\n }\n}\n\nconst validateTypes = ({ header, payload }, profile, options) => {\n isPayloadString(header.alg, '\"alg\" header parameter', 'alg', true)\n\n isTimestamp(payload.iat, 'iat', profile === IDTOKEN || profile === LOGOUTTOKEN || profile === ATJWT || !!options.maxTokenAge)\n isTimestamp(payload.exp, 'exp', profile === IDTOKEN || profile === ATJWT)\n isTimestamp(payload.auth_time, 'auth_time', !!options.maxAuthAge)\n isTimestamp(payload.nbf, 'nbf')\n isPayloadString(payload.jti, '\"jti\" claim', 'jti', profile === LOGOUTTOKEN || profile === ATJWT || !!options.jti)\n isPayloadString(payload.acr, '\"acr\" claim', 'acr')\n isPayloadString(payload.nonce, '\"nonce\" claim', 'nonce', !!options.nonce)\n isStringOrArrayOfStrings(payload.iss, 'iss', !!options.issuer)\n isPayloadString(payload.sub, '\"sub\" claim', 'sub', profile === IDTOKEN || profile === ATJWT || !!options.subject)\n isStringOrArrayOfStrings(payload.aud, 'aud', !!options.audience)\n isPayloadString(payload.azp, '\"azp\" claim', 'azp', profile === IDTOKEN && Array.isArray(payload.aud) && payload.aud.length > 1)\n isStringOrArrayOfStrings(payload.amr, 'amr')\n isPayloadString(header.typ, '\"typ\" header parameter', 'typ', !!options.typ)\n\n if (profile === ATJWT) {\n isPayloadString(payload.client_id, '\"client_id\" claim', 'client_id', true)\n }\n\n if (profile === LOGOUTTOKEN) {\n isPayloadString(payload.sid, '\"sid\" claim', 'sid')\n\n if (!('sid' in payload) && !('sub' in payload)) {\n throw new JWTClaimInvalid('either \"sid\" or \"sub\" (or both) claims must be present')\n }\n\n if ('nonce' in payload) {\n throw new JWTClaimInvalid('\"nonce\" claim is prohibited', 'nonce', 'prohibited')\n }\n\n if (!('events' in payload)) {\n throw new JWTClaimInvalid('\"events\" claim is missing', 'events', 'missing')\n }\n\n if (!isObject(payload.events)) {\n throw new JWTClaimInvalid('\"events\" claim must be an object', 'events', 'invalid')\n }\n\n if (!('http://schemas.openid.net/event/backchannel-logout' in payload.events)) {\n throw new JWTClaimInvalid('\"http://schemas.openid.net/event/backchannel-logout\" member is missing in the \"events\" claim', 'events', 'invalid')\n }\n\n if (!isObject(payload.events['http://schemas.openid.net/event/backchannel-logout'])) {\n throw new JWTClaimInvalid('\"http://schemas.openid.net/event/backchannel-logout\" member in the \"events\" claim must be an object', 'events', 'invalid')\n }\n }\n}\n\nconst checkAudiencePresence = (audPayload, audOption, profile) => {\n if (typeof audPayload === 'string') {\n return audOption.includes(audPayload)\n }\n\n // Each principal intended to process the JWT MUST\n // identify itself with a value in the audience claim\n audPayload = new Set(audPayload)\n return audOption.some(Set.prototype.has.bind(audPayload))\n}\n\nmodule.exports = (token, key, options = {}) => {\n if (!isObject(options)) {\n throw new TypeError('options must be an object')\n }\n\n const {\n algorithms, audience, clockTolerance, complete, crit, ignoreExp, ignoreIat, ignoreNbf, issuer,\n jti, maxAuthAge, maxTokenAge, nonce, now, profile, subject, typ\n } = options = validateOptions(options)\n\n const decoded = decode(token, { complete: true })\n key = getKey(key, true)\n\n if (complete) {\n ({ key } = verify(true, 'preparsed', { decoded, token }, key, { crit, algorithms, complete: true }))\n decoded.key = key\n } else {\n verify(true, 'preparsed', { decoded, token }, key, { crit, algorithms })\n }\n\n const unix = epoch(now)\n validateTypes(decoded, profile, options)\n\n if (issuer && (typeof decoded.payload.iss !== 'string' || !(typeof issuer === 'string' ? [issuer] : issuer).includes(decoded.payload.iss))) {\n throw new JWTClaimInvalid('unexpected \"iss\" claim value', 'iss', 'check_failed')\n }\n\n if (nonce && decoded.payload.nonce !== nonce) {\n throw new JWTClaimInvalid('unexpected \"nonce\" claim value', 'nonce', 'check_failed')\n }\n\n if (subject && decoded.payload.sub !== subject) {\n throw new JWTClaimInvalid('unexpected \"sub\" claim value', 'sub', 'check_failed')\n }\n\n if (jti && decoded.payload.jti !== jti) {\n throw new JWTClaimInvalid('unexpected \"jti\" claim value', 'jti', 'check_failed')\n }\n\n if (audience && !checkAudiencePresence(decoded.payload.aud, typeof audience === 'string' ? [audience] : audience, profile)) {\n throw new JWTClaimInvalid('unexpected \"aud\" claim value', 'aud', 'check_failed')\n }\n\n if (typ && normalizeTyp(decoded.header.typ) !== normalizeTyp(typ)) {\n throw new JWTClaimInvalid('unexpected \"typ\" JWT header value', 'typ', 'check_failed')\n }\n\n const tolerance = clockTolerance ? secs(clockTolerance) : 0\n\n if (maxAuthAge) {\n const maxAuthAgeSeconds = secs(maxAuthAge)\n if (decoded.payload.auth_time + maxAuthAgeSeconds < unix - tolerance) {\n throw new JWTClaimInvalid('\"auth_time\" claim timestamp check failed (too much time has elapsed since the last End-User authentication)', 'auth_time', 'check_failed')\n }\n }\n\n if (!ignoreIat && !('exp' in decoded.payload) && 'iat' in decoded.payload && decoded.payload.iat > unix + tolerance) {\n throw new JWTClaimInvalid('\"iat\" claim timestamp check failed (it should be in the past)', 'iat', 'check_failed')\n }\n\n if (!ignoreNbf && 'nbf' in decoded.payload && decoded.payload.nbf > unix + tolerance) {\n throw new JWTClaimInvalid('\"nbf\" claim timestamp check failed', 'nbf', 'check_failed')\n }\n\n if (!ignoreExp && 'exp' in decoded.payload && decoded.payload.exp <= unix - tolerance) {\n throw new JWTExpired('\"exp\" claim timestamp check failed', 'exp', 'check_failed')\n }\n\n if (maxTokenAge) {\n const age = unix - decoded.payload.iat\n const max = secs(maxTokenAge)\n\n if (age - tolerance > max) {\n throw new JWTExpired('\"iat\" claim timestamp check failed (too far in the past)', 'iat', 'check_failed')\n }\n\n if (age < 0 - tolerance) {\n throw new JWTClaimInvalid('\"iat\" claim timestamp check failed (it should be in the past)', 'iat', 'check_failed')\n }\n }\n\n if (profile === IDTOKEN && Array.isArray(decoded.payload.aud) && decoded.payload.aud.length > 1 && decoded.payload.azp !== audience) {\n throw new JWTClaimInvalid('unexpected \"azp\" claim value', 'azp', 'check_failed')\n }\n\n return complete ? decoded : decoded.payload\n}\n","const { getCurves } = require('crypto')\n\nconst { name: secp256k1 } = require('../jwk/key/secp256k1_crv')\n\nconst curves = new Set()\n\nif (getCurves().includes('prime256v1')) {\n curves.add('P-256')\n}\n\nif (getCurves().includes('secp256k1')) {\n curves.add(secp256k1)\n}\n\nif (getCurves().includes('secp384r1')) {\n curves.add('P-384')\n}\n\nif (getCurves().includes('secp521r1')) {\n curves.add('P-521')\n}\n\nmodule.exports = curves\n","module.exports = new Map()\n","const EC_CURVES = require('./ec_curves')\nconst IVLENGTHS = require('./iv_lengths')\nconst JWA = require('./jwa')\nconst JWK = require('./jwk')\nconst KEYLENGTHS = require('./key_lengths')\nconst OKP_CURVES = require('./okp_curves')\nconst ECDH_DERIVE_LENGTHS = require('./ecdh_derive_lengths')\n\nmodule.exports = {\n EC_CURVES,\n ECDH_DERIVE_LENGTHS,\n IVLENGTHS,\n JWA,\n JWK,\n KEYLENGTHS,\n OKP_CURVES\n}\n","module.exports = new Map([\n ['A128CBC-HS256', 128],\n ['A128GCM', 96],\n ['A128GCMKW', 96],\n ['A192CBC-HS384', 128],\n ['A192GCM', 96],\n ['A192GCMKW', 96],\n ['A256CBC-HS512', 128],\n ['A256GCM', 96],\n ['A256GCMKW', 96]\n])\n","module.exports = {\n sign: new Map(),\n verify: new Map(),\n keyManagementEncrypt: new Map(),\n keyManagementDecrypt: new Map(),\n encrypt: new Map(),\n decrypt: new Map()\n}\n","module.exports = {\n oct: {\n decrypt: {},\n deriveKey: {},\n encrypt: {},\n sign: {},\n unwrapKey: {},\n verify: {},\n wrapKey: {}\n },\n EC: {\n decrypt: {},\n deriveKey: {},\n encrypt: {},\n sign: {},\n unwrapKey: {},\n verify: {},\n wrapKey: {}\n },\n RSA: {\n decrypt: {},\n deriveKey: {},\n encrypt: {},\n sign: {},\n unwrapKey: {},\n verify: {},\n wrapKey: {}\n },\n OKP: {\n decrypt: {},\n deriveKey: {},\n encrypt: {},\n sign: {},\n unwrapKey: {},\n verify: {},\n wrapKey: {}\n }\n}\n","module.exports = new Map([\n ['A128CBC-HS256', 256],\n ['A128GCM', 128],\n ['A192CBC-HS384', 384],\n ['A192GCM', 192],\n ['A256CBC-HS512', 512],\n ['A256GCM', 256]\n])\n","const curves = new Set(['Ed25519'])\n\nif (!('electron' in process.versions)) {\n curves.add('Ed448')\n curves.add('X25519')\n curves.add('X448')\n}\n\nmodule.exports = curves\n","'use strict';\n\n\nvar yaml = require('./lib/js-yaml.js');\n\n\nmodule.exports = yaml;\n","'use strict';\n\n\nvar loader = require('./js-yaml/loader');\nvar dumper = require('./js-yaml/dumper');\n\n\nfunction deprecated(name) {\n return function () {\n throw new Error('Function ' + name + ' is deprecated and cannot be used.');\n };\n}\n\n\nmodule.exports.Type = require('./js-yaml/type');\nmodule.exports.Schema = require('./js-yaml/schema');\nmodule.exports.FAILSAFE_SCHEMA = require('./js-yaml/schema/failsafe');\nmodule.exports.JSON_SCHEMA = require('./js-yaml/schema/json');\nmodule.exports.CORE_SCHEMA = require('./js-yaml/schema/core');\nmodule.exports.DEFAULT_SAFE_SCHEMA = require('./js-yaml/schema/default_safe');\nmodule.exports.DEFAULT_FULL_SCHEMA = require('./js-yaml/schema/default_full');\nmodule.exports.load = loader.load;\nmodule.exports.loadAll = loader.loadAll;\nmodule.exports.safeLoad = loader.safeLoad;\nmodule.exports.safeLoadAll = loader.safeLoadAll;\nmodule.exports.dump = dumper.dump;\nmodule.exports.safeDump = dumper.safeDump;\nmodule.exports.YAMLException = require('./js-yaml/exception');\n\n// Deprecated schema names from JS-YAML 2.0.x\nmodule.exports.MINIMAL_SCHEMA = require('./js-yaml/schema/failsafe');\nmodule.exports.SAFE_SCHEMA = require('./js-yaml/schema/default_safe');\nmodule.exports.DEFAULT_SCHEMA = require('./js-yaml/schema/default_full');\n\n// Deprecated functions from JS-YAML 1.x.x\nmodule.exports.scan = deprecated('scan');\nmodule.exports.parse = deprecated('parse');\nmodule.exports.compose = deprecated('compose');\nmodule.exports.addConstructor = deprecated('addConstructor');\n","'use strict';\n\n\nfunction isNothing(subject) {\n return (typeof subject === 'undefined') || (subject === null);\n}\n\n\nfunction isObject(subject) {\n return (typeof subject === 'object') && (subject !== null);\n}\n\n\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) return sequence;\n else if (isNothing(sequence)) return [];\n\n return [ sequence ];\n}\n\n\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n\n if (source) {\n sourceKeys = Object.keys(source);\n\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n\nfunction repeat(string, count) {\n var result = '', cycle;\n\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n\n return result;\n}\n\n\nfunction isNegativeZero(number) {\n return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);\n}\n\n\nmodule.exports.isNothing = isNothing;\nmodule.exports.isObject = isObject;\nmodule.exports.toArray = toArray;\nmodule.exports.repeat = repeat;\nmodule.exports.isNegativeZero = isNegativeZero;\nmodule.exports.extend = extend;\n","'use strict';\n\n/*eslint-disable no-use-before-define*/\n\nvar common = require('./common');\nvar YAMLException = require('./exception');\nvar DEFAULT_FULL_SCHEMA = require('./schema/default_full');\nvar DEFAULT_SAFE_SCHEMA = require('./schema/default_safe');\n\nvar _toString = Object.prototype.toString;\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar CHAR_TAB = 0x09; /* Tab */\nvar CHAR_LINE_FEED = 0x0A; /* LF */\nvar CHAR_CARRIAGE_RETURN = 0x0D; /* CR */\nvar CHAR_SPACE = 0x20; /* Space */\nvar CHAR_EXCLAMATION = 0x21; /* ! */\nvar CHAR_DOUBLE_QUOTE = 0x22; /* \" */\nvar CHAR_SHARP = 0x23; /* # */\nvar CHAR_PERCENT = 0x25; /* % */\nvar CHAR_AMPERSAND = 0x26; /* & */\nvar CHAR_SINGLE_QUOTE = 0x27; /* ' */\nvar CHAR_ASTERISK = 0x2A; /* * */\nvar CHAR_COMMA = 0x2C; /* , */\nvar CHAR_MINUS = 0x2D; /* - */\nvar CHAR_COLON = 0x3A; /* : */\nvar CHAR_EQUALS = 0x3D; /* = */\nvar CHAR_GREATER_THAN = 0x3E; /* > */\nvar CHAR_QUESTION = 0x3F; /* ? */\nvar CHAR_COMMERCIAL_AT = 0x40; /* @ */\nvar CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */\nvar CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */\nvar CHAR_GRAVE_ACCENT = 0x60; /* ` */\nvar CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */\nvar CHAR_VERTICAL_LINE = 0x7C; /* | */\nvar CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */\n\nvar ESCAPE_SEQUENCES = {};\n\nESCAPE_SEQUENCES[0x00] = '\\\\0';\nESCAPE_SEQUENCES[0x07] = '\\\\a';\nESCAPE_SEQUENCES[0x08] = '\\\\b';\nESCAPE_SEQUENCES[0x09] = '\\\\t';\nESCAPE_SEQUENCES[0x0A] = '\\\\n';\nESCAPE_SEQUENCES[0x0B] = '\\\\v';\nESCAPE_SEQUENCES[0x0C] = '\\\\f';\nESCAPE_SEQUENCES[0x0D] = '\\\\r';\nESCAPE_SEQUENCES[0x1B] = '\\\\e';\nESCAPE_SEQUENCES[0x22] = '\\\\\"';\nESCAPE_SEQUENCES[0x5C] = '\\\\\\\\';\nESCAPE_SEQUENCES[0x85] = '\\\\N';\nESCAPE_SEQUENCES[0xA0] = '\\\\_';\nESCAPE_SEQUENCES[0x2028] = '\\\\L';\nESCAPE_SEQUENCES[0x2029] = '\\\\P';\n\nvar DEPRECATED_BOOLEANS_SYNTAX = [\n 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',\n 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'\n];\n\nfunction compileStyleMap(schema, map) {\n var result, keys, index, length, tag, style, type;\n\n if (map === null) return {};\n\n result = {};\n keys = Object.keys(map);\n\n for (index = 0, length = keys.length; index < length; index += 1) {\n tag = keys[index];\n style = String(map[tag]);\n\n if (tag.slice(0, 2) === '!!') {\n tag = 'tag:yaml.org,2002:' + tag.slice(2);\n }\n type = schema.compiledTypeMap['fallback'][tag];\n\n if (type && _hasOwnProperty.call(type.styleAliases, style)) {\n style = type.styleAliases[style];\n }\n\n result[tag] = style;\n }\n\n return result;\n}\n\nfunction encodeHex(character) {\n var string, handle, length;\n\n string = character.toString(16).toUpperCase();\n\n if (character <= 0xFF) {\n handle = 'x';\n length = 2;\n } else if (character <= 0xFFFF) {\n handle = 'u';\n length = 4;\n } else if (character <= 0xFFFFFFFF) {\n handle = 'U';\n length = 8;\n } else {\n throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF');\n }\n\n return '\\\\' + handle + common.repeat('0', length - string.length) + string;\n}\n\nfunction State(options) {\n this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;\n this.indent = Math.max(1, (options['indent'] || 2));\n this.noArrayIndent = options['noArrayIndent'] || false;\n this.skipInvalid = options['skipInvalid'] || false;\n this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);\n this.styleMap = compileStyleMap(this.schema, options['styles'] || null);\n this.sortKeys = options['sortKeys'] || false;\n this.lineWidth = options['lineWidth'] || 80;\n this.noRefs = options['noRefs'] || false;\n this.noCompatMode = options['noCompatMode'] || false;\n this.condenseFlow = options['condenseFlow'] || false;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.explicitTypes = this.schema.compiledExplicit;\n\n this.tag = null;\n this.result = '';\n\n this.duplicates = [];\n this.usedDuplicates = null;\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString(string, spaces) {\n var ind = common.repeat(' ', spaces),\n position = 0,\n next = -1,\n result = '',\n line,\n length = string.length;\n\n while (position < length) {\n next = string.indexOf('\\n', position);\n if (next === -1) {\n line = string.slice(position);\n position = length;\n } else {\n line = string.slice(position, next + 1);\n position = next + 1;\n }\n\n if (line.length && line !== '\\n') result += ind;\n\n result += line;\n }\n\n return result;\n}\n\nfunction generateNextLine(state, level) {\n return '\\n' + common.repeat(' ', state.indent * level);\n}\n\nfunction testImplicitResolving(state, str) {\n var index, length, type;\n\n for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {\n type = state.implicitTypes[index];\n\n if (type.resolve(str)) {\n return true;\n }\n }\n\n return false;\n}\n\n// [33] s-white ::= s-space | s-tab\nfunction isWhitespace(c) {\n return c === CHAR_SPACE || c === CHAR_TAB;\n}\n\n// Returns true if the character can be printed without escaping.\n// From YAML 1.2: \"any allowed characters known to be non-printable\n// should also be escaped. [However,] This isn’t mandatory\"\n// Derived from nb-char - \\t - #x85 - #xA0 - #x2028 - #x2029.\nfunction isPrintable(c) {\n return (0x00020 <= c && c <= 0x00007E)\n || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)\n || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */)\n || (0x10000 <= c && c <= 0x10FFFF);\n}\n\n// [34] ns-char ::= nb-char - s-white\n// [27] nb-char ::= c-printable - b-char - c-byte-order-mark\n// [26] b-char ::= b-line-feed | b-carriage-return\n// [24] b-line-feed ::= #xA /* LF */\n// [25] b-carriage-return ::= #xD /* CR */\n// [3] c-byte-order-mark ::= #xFEFF\nfunction isNsChar(c) {\n return isPrintable(c) && !isWhitespace(c)\n // byte-order-mark\n && c !== 0xFEFF\n // b-char\n && c !== CHAR_CARRIAGE_RETURN\n && c !== CHAR_LINE_FEED;\n}\n\n// Simplified test for values allowed after the first character in plain style.\nfunction isPlainSafe(c, prev) {\n // Uses a subset of nb-char - c-flow-indicator - \":\" - \"#\"\n // where nb-char ::= c-printable - b-char - c-byte-order-mark.\n return isPrintable(c) && c !== 0xFEFF\n // - c-flow-indicator\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // - \":\" - \"#\"\n // /* An ns-char preceding */ \"#\"\n && c !== CHAR_COLON\n && ((c !== CHAR_SHARP) || (prev && isNsChar(prev)));\n}\n\n// Simplified test for values allowed as the first character in plain style.\nfunction isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 0xFEFF\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}\n\n// Determines whether block indentation indicator is required.\nfunction needIndentIndicator(string) {\n var leadingSpaceRe = /^\\n* /;\n return leadingSpaceRe.test(string);\n}\n\nvar STYLE_PLAIN = 1,\n STYLE_SINGLE = 2,\n STYLE_LITERAL = 3,\n STYLE_FOLDED = 4,\n STYLE_DOUBLE = 5;\n\n// Determines which scalar styles are possible and returns the preferred style.\n// lineWidth = -1 => no limit.\n// Pre-conditions: str.length > 0.\n// Post-conditions:\n// STYLE_PLAIN or STYLE_SINGLE => no \\n are in the string.\n// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).\n// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).\nfunction chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) {\n var i;\n var char, prev_char;\n var hasLineBreak = false;\n var hasFoldableLine = false; // only checked if shouldTrackWidth\n var shouldTrackWidth = lineWidth !== -1;\n var previousLineBreak = -1; // count the first line correctly\n var plain = isPlainSafeFirst(string.charCodeAt(0))\n && !isWhitespace(string.charCodeAt(string.length - 1));\n\n if (singleLineOnly) {\n // Case: no block styles.\n // Check for disallowed characters to rule out plain and single.\n for (i = 0; i < string.length; i++) {\n char = string.charCodeAt(i);\n if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n prev_char = i > 0 ? string.charCodeAt(i - 1) : null;\n plain = plain && isPlainSafe(char, prev_char);\n }\n } else {\n // Case: block styles permitted.\n for (i = 0; i < string.length; i++) {\n char = string.charCodeAt(i);\n if (char === CHAR_LINE_FEED) {\n hasLineBreak = true;\n // Check if any line can be folded.\n if (shouldTrackWidth) {\n hasFoldableLine = hasFoldableLine ||\n // Foldable line = too long, and not more-indented.\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' ');\n previousLineBreak = i;\n }\n } else if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n prev_char = i > 0 ? string.charCodeAt(i - 1) : null;\n plain = plain && isPlainSafe(char, prev_char);\n }\n // in case the end is missing a \\n\n hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' '));\n }\n // Although every style can represent \\n without escaping, prefer block styles\n // for multiline, since they're more readable and they don't add empty lines.\n // Also prefer folding a super-long line.\n if (!hasLineBreak && !hasFoldableLine) {\n // Strings interpretable as another type have to be quoted;\n // e.g. the string 'true' vs. the boolean true.\n return plain && !testAmbiguousType(string)\n ? STYLE_PLAIN : STYLE_SINGLE;\n }\n // Edge case: block indentation indicator can only have one digit.\n if (indentPerLevel > 9 && needIndentIndicator(string)) {\n return STYLE_DOUBLE;\n }\n // At this point we know block styles are valid.\n // Prefer literal style unless we want to fold.\n return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;\n}\n\n// Note: line breaking/folding is implemented for only the folded style.\n// NB. We drop the last trailing newline (if any) of a returned block scalar\n// since the dumper adds its own newline. This always works:\n// • No ending newline => unaffected; already using strip \"-\" chomping.\n// • Ending newline => removed then restored.\n// Importantly, this keeps the \"+\" chomp indicator from gaining an extra line.\nfunction writeScalar(state, string, level, iskey) {\n state.dump = (function () {\n if (string.length === 0) {\n return \"''\";\n }\n if (!state.noCompatMode &&\n DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) {\n return \"'\" + string + \"'\";\n }\n\n var indent = state.indent * Math.max(1, level); // no 0-indent scalars\n // As indentation gets deeper, let the width decrease monotonically\n // to the lower bound min(state.lineWidth, 40).\n // Note that this implies\n // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.\n // state.lineWidth > 40 + state.indent: width decreases until the lower bound.\n // This behaves better than a constant minimum width which disallows narrower options,\n // or an indent threshold which causes the width to suddenly increase.\n var lineWidth = state.lineWidth === -1\n ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);\n\n // Without knowing if keys are implicit/explicit, assume implicit for safety.\n var singleLineOnly = iskey\n // No block styles in flow mode.\n || (state.flowLevel > -1 && level >= state.flowLevel);\n function testAmbiguity(string) {\n return testImplicitResolving(state, string);\n }\n\n switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) {\n case STYLE_PLAIN:\n return string;\n case STYLE_SINGLE:\n return \"'\" + string.replace(/'/g, \"''\") + \"'\";\n case STYLE_LITERAL:\n return '|' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(string, indent));\n case STYLE_FOLDED:\n return '>' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(foldString(string, lineWidth), indent));\n case STYLE_DOUBLE:\n return '\"' + escapeString(string, lineWidth) + '\"';\n default:\n throw new YAMLException('impossible error: invalid scalar style');\n }\n }());\n}\n\n// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.\nfunction blockHeader(string, indentPerLevel) {\n var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';\n\n // note the special case: the string '\\n' counts as a \"trailing\" empty line.\n var clip = string[string.length - 1] === '\\n';\n var keep = clip && (string[string.length - 2] === '\\n' || string === '\\n');\n var chomp = keep ? '+' : (clip ? '' : '-');\n\n return indentIndicator + chomp + '\\n';\n}\n\n// (See the note for writeScalar.)\nfunction dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}\n\n// Note: a long line without a suitable break point will exceed the width limit.\n// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.\nfunction foldString(string, width) {\n // In folded style, $k$ consecutive newlines output as $k+1$ newlines—\n // unless they're before or after a more-indented line, or at the very\n // beginning or end, in which case $k$ maps to $k$.\n // Therefore, parse each chunk as newline(s) followed by a content line.\n var lineRe = /(\\n+)([^\\n]*)/g;\n\n // first line (possibly an empty line)\n var result = (function () {\n var nextLF = string.indexOf('\\n');\n nextLF = nextLF !== -1 ? nextLF : string.length;\n lineRe.lastIndex = nextLF;\n return foldLine(string.slice(0, nextLF), width);\n }());\n // If we haven't reached the first content line yet, don't add an extra \\n.\n var prevMoreIndented = string[0] === '\\n' || string[0] === ' ';\n var moreIndented;\n\n // rest of the lines\n var match;\n while ((match = lineRe.exec(string))) {\n var prefix = match[1], line = match[2];\n moreIndented = (line[0] === ' ');\n result += prefix\n + (!prevMoreIndented && !moreIndented && line !== ''\n ? '\\n' : '')\n + foldLine(line, width);\n prevMoreIndented = moreIndented;\n }\n\n return result;\n}\n\n// Greedy line breaking.\n// Picks the longest line under the limit each time,\n// otherwise settles for the shortest line over the limit.\n// NB. More-indented lines *cannot* be folded, as that would add an extra \\n.\nfunction foldLine(line, width) {\n if (line === '' || line[0] === ' ') return line;\n\n // Since a more-indented line adds a \\n, breaks can't be followed by a space.\n var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.\n var match;\n // start is an inclusive index. end, curr, and next are exclusive.\n var start = 0, end, curr = 0, next = 0;\n var result = '';\n\n // Invariants: 0 <= start <= length-1.\n // 0 <= curr <= next <= max(0, length-2). curr - start <= width.\n // Inside the loop:\n // A match implies length >= 2, so curr and next are <= length-2.\n while ((match = breakRe.exec(line))) {\n next = match.index;\n // maintain invariant: curr - start <= width\n if (next - start > width) {\n end = (curr > start) ? curr : next; // derive end <= length-2\n result += '\\n' + line.slice(start, end);\n // skip the space that was output as \\n\n start = end + 1; // derive start <= length-1\n }\n curr = next;\n }\n\n // By the invariants, start <= length-1, so there is something left over.\n // It is either the whole string or a part starting from non-whitespace.\n result += '\\n';\n // Insert a break if the remainder is too long and there is a break available.\n if (line.length - start > width && curr > start) {\n result += line.slice(start, curr) + '\\n' + line.slice(curr + 1);\n } else {\n result += line.slice(start);\n }\n\n return result.slice(1); // drop extra \\n joiner\n}\n\n// Escapes a double-quoted string.\nfunction escapeString(string) {\n var result = '';\n var char, nextChar;\n var escapeSeq;\n\n for (var i = 0; i < string.length; i++) {\n char = string.charCodeAt(i);\n // Check for surrogate pairs (reference Unicode 3.0 section \"3.7 Surrogates\").\n if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) {\n nextChar = string.charCodeAt(i + 1);\n if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) {\n // Combine the surrogate pair and store it escaped.\n result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000);\n // Advance index one extra since we already used that char here.\n i++; continue;\n }\n }\n escapeSeq = ESCAPE_SEQUENCES[char];\n result += !escapeSeq && isPrintable(char)\n ? string[i]\n : escapeSeq || encodeHex(char);\n }\n\n return result;\n}\n\nfunction writeFlowSequence(state, level, object) {\n var _result = '',\n _tag = state.tag,\n index,\n length;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n // Write only valid elements.\n if (writeNode(state, level, object[index], false, false)) {\n if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : '');\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = '[' + _result + ']';\n}\n\nfunction writeBlockSequence(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n index,\n length;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n // Write only valid elements.\n if (writeNode(state, level + 1, object[index], true, true)) {\n if (!compact || index !== 0) {\n _result += generateNextLine(state, level);\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n _result += '-';\n } else {\n _result += '- ';\n }\n\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = _result || '[]'; // Empty sequence if no valid values.\n}\n\nfunction writeFlowMapping(state, level, object) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n pairBuffer;\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n\n pairBuffer = '';\n if (index !== 0) pairBuffer += ', ';\n\n if (state.condenseFlow) pairBuffer += '\"';\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (!writeNode(state, level, objectKey, false, false)) {\n continue; // Skip this pair because of invalid key;\n }\n\n if (state.dump.length > 1024) pairBuffer += '? ';\n\n pairBuffer += state.dump + (state.condenseFlow ? '\"' : '') + ':' + (state.condenseFlow ? '' : ' ');\n\n if (!writeNode(state, level, objectValue, false, false)) {\n continue; // Skip this pair because of invalid value.\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = '{' + _result + '}';\n}\n\nfunction writeBlockMapping(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n explicitPair,\n pairBuffer;\n\n // Allow sorting keys so that the output file is deterministic\n if (state.sortKeys === true) {\n // Default sorting\n objectKeyList.sort();\n } else if (typeof state.sortKeys === 'function') {\n // Custom sort function\n objectKeyList.sort(state.sortKeys);\n } else if (state.sortKeys) {\n // Something is wrong\n throw new YAMLException('sortKeys must be a boolean or a function');\n }\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n\n if (!compact || index !== 0) {\n pairBuffer += generateNextLine(state, level);\n }\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (!writeNode(state, level + 1, objectKey, true, true, true)) {\n continue; // Skip this pair because of invalid key.\n }\n\n explicitPair = (state.tag !== null && state.tag !== '?') ||\n (state.dump && state.dump.length > 1024);\n\n if (explicitPair) {\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += '?';\n } else {\n pairBuffer += '? ';\n }\n }\n\n pairBuffer += state.dump;\n\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level);\n }\n\n if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {\n continue; // Skip this pair because of invalid value.\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += ':';\n } else {\n pairBuffer += ': ';\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = _result || '{}'; // Empty mapping if no valid pairs.\n}\n\nfunction detectType(state, object, explicit) {\n var _result, typeList, index, length, type, style;\n\n typeList = explicit ? state.explicitTypes : state.implicitTypes;\n\n for (index = 0, length = typeList.length; index < length; index += 1) {\n type = typeList[index];\n\n if ((type.instanceOf || type.predicate) &&\n (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&\n (!type.predicate || type.predicate(object))) {\n\n state.tag = explicit ? type.tag : '?';\n\n if (type.represent) {\n style = state.styleMap[type.tag] || type.defaultStyle;\n\n if (_toString.call(type.represent) === '[object Function]') {\n _result = type.represent(object, style);\n } else if (_hasOwnProperty.call(type.represent, style)) {\n _result = type.represent[style](object, style);\n } else {\n throw new YAMLException('!<' + type.tag + '> tag resolver accepts not \"' + style + '\" style');\n }\n\n state.dump = _result;\n }\n\n return true;\n }\n }\n\n return false;\n}\n\n// Serializes `object` and writes it to global `result`.\n// Returns true on success, or false on invalid object.\n//\nfunction writeNode(state, level, object, block, compact, iskey) {\n state.tag = null;\n state.dump = object;\n\n if (!detectType(state, object, false)) {\n detectType(state, object, true);\n }\n\n var type = _toString.call(state.dump);\n\n if (block) {\n block = (state.flowLevel < 0 || state.flowLevel > level);\n }\n\n var objectOrArray = type === '[object Object]' || type === '[object Array]',\n duplicateIndex,\n duplicate;\n\n if (objectOrArray) {\n duplicateIndex = state.duplicates.indexOf(object);\n duplicate = duplicateIndex !== -1;\n }\n\n if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {\n compact = false;\n }\n\n if (duplicate && state.usedDuplicates[duplicateIndex]) {\n state.dump = '*ref_' + duplicateIndex;\n } else {\n if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {\n state.usedDuplicates[duplicateIndex] = true;\n }\n if (type === '[object Object]') {\n if (block && (Object.keys(state.dump).length !== 0)) {\n writeBlockMapping(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowMapping(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object Array]') {\n var arrayLevel = (state.noArrayIndent && (level > 0)) ? level - 1 : level;\n if (block && (state.dump.length !== 0)) {\n writeBlockSequence(state, arrayLevel, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowSequence(state, arrayLevel, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object String]') {\n if (state.tag !== '?') {\n writeScalar(state, state.dump, level, iskey);\n }\n } else {\n if (state.skipInvalid) return false;\n throw new YAMLException('unacceptable kind of an object to dump ' + type);\n }\n\n if (state.tag !== null && state.tag !== '?') {\n state.dump = '!<' + state.tag + '> ' + state.dump;\n }\n }\n\n return true;\n}\n\nfunction getDuplicateReferences(object, state) {\n var objects = [],\n duplicatesIndexes = [],\n index,\n length;\n\n inspectNode(object, objects, duplicatesIndexes);\n\n for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {\n state.duplicates.push(objects[duplicatesIndexes[index]]);\n }\n state.usedDuplicates = new Array(length);\n}\n\nfunction inspectNode(object, objects, duplicatesIndexes) {\n var objectKeyList,\n index,\n length;\n\n if (object !== null && typeof object === 'object') {\n index = objects.indexOf(object);\n if (index !== -1) {\n if (duplicatesIndexes.indexOf(index) === -1) {\n duplicatesIndexes.push(index);\n }\n } else {\n objects.push(object);\n\n if (Array.isArray(object)) {\n for (index = 0, length = object.length; index < length; index += 1) {\n inspectNode(object[index], objects, duplicatesIndexes);\n }\n } else {\n objectKeyList = Object.keys(object);\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);\n }\n }\n }\n }\n}\n\nfunction dump(input, options) {\n options = options || {};\n\n var state = new State(options);\n\n if (!state.noRefs) getDuplicateReferences(input, state);\n\n if (writeNode(state, 0, input, true, true)) return state.dump + '\\n';\n\n return '';\n}\n\nfunction safeDump(input, options) {\n return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n}\n\nmodule.exports.dump = dump;\nmodule.exports.safeDump = safeDump;\n","// YAML error class. http://stackoverflow.com/questions/8458984\n//\n'use strict';\n\nfunction YAMLException(reason, mark) {\n // Super constructor\n Error.call(this);\n\n this.name = 'YAMLException';\n this.reason = reason;\n this.mark = mark;\n this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : '');\n\n // Include stack trace in error object\n if (Error.captureStackTrace) {\n // Chrome and NodeJS\n Error.captureStackTrace(this, this.constructor);\n } else {\n // FF, IE 10+ and Safari 6+. Fallback for others\n this.stack = (new Error()).stack || '';\n }\n}\n\n\n// Inherit from Error\nYAMLException.prototype = Object.create(Error.prototype);\nYAMLException.prototype.constructor = YAMLException;\n\n\nYAMLException.prototype.toString = function toString(compact) {\n var result = this.name + ': ';\n\n result += this.reason || '(unknown reason)';\n\n if (!compact && this.mark) {\n result += ' ' + this.mark.toString();\n }\n\n return result;\n};\n\n\nmodule.exports = YAMLException;\n","'use strict';\n\n/*eslint-disable max-len,no-use-before-define*/\n\nvar common = require('./common');\nvar YAMLException = require('./exception');\nvar Mark = require('./mark');\nvar DEFAULT_SAFE_SCHEMA = require('./schema/default_safe');\nvar DEFAULT_FULL_SCHEMA = require('./schema/default_full');\n\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\nvar CONTEXT_FLOW_IN = 1;\nvar CONTEXT_FLOW_OUT = 2;\nvar CONTEXT_BLOCK_IN = 3;\nvar CONTEXT_BLOCK_OUT = 4;\n\n\nvar CHOMPING_CLIP = 1;\nvar CHOMPING_STRIP = 2;\nvar CHOMPING_KEEP = 3;\n\n\nvar PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nvar PATTERN_NON_ASCII_LINE_BREAKS = /[\\x85\\u2028\\u2029]/;\nvar PATTERN_FLOW_INDICATORS = /[,\\[\\]\\{\\}]/;\nvar PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\\-]+!)$/i;\nvar PATTERN_TAG_URI = /^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;\n\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\n\nfunction is_EOL(c) {\n return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);\n}\n\nfunction is_WHITE_SPACE(c) {\n return (c === 0x09/* Tab */) || (c === 0x20/* Space */);\n}\n\nfunction is_WS_OR_EOL(c) {\n return (c === 0x09/* Tab */) ||\n (c === 0x20/* Space */) ||\n (c === 0x0A/* LF */) ||\n (c === 0x0D/* CR */);\n}\n\nfunction is_FLOW_INDICATOR(c) {\n return c === 0x2C/* , */ ||\n c === 0x5B/* [ */ ||\n c === 0x5D/* ] */ ||\n c === 0x7B/* { */ ||\n c === 0x7D/* } */;\n}\n\nfunction fromHexCode(c) {\n var lc;\n\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n /*eslint-disable no-bitwise*/\n lc = c | 0x20;\n\n if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {\n return lc - 0x61 + 10;\n }\n\n return -1;\n}\n\nfunction escapedHexLen(c) {\n if (c === 0x78/* x */) { return 2; }\n if (c === 0x75/* u */) { return 4; }\n if (c === 0x55/* U */) { return 8; }\n return 0;\n}\n\nfunction fromDecimalCode(c) {\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n return -1;\n}\n\nfunction simpleEscapeSequence(c) {\n /* eslint-disable indent */\n return (c === 0x30/* 0 */) ? '\\x00' :\n (c === 0x61/* a */) ? '\\x07' :\n (c === 0x62/* b */) ? '\\x08' :\n (c === 0x74/* t */) ? '\\x09' :\n (c === 0x09/* Tab */) ? '\\x09' :\n (c === 0x6E/* n */) ? '\\x0A' :\n (c === 0x76/* v */) ? '\\x0B' :\n (c === 0x66/* f */) ? '\\x0C' :\n (c === 0x72/* r */) ? '\\x0D' :\n (c === 0x65/* e */) ? '\\x1B' :\n (c === 0x20/* Space */) ? ' ' :\n (c === 0x22/* \" */) ? '\\x22' :\n (c === 0x2F/* / */) ? '/' :\n (c === 0x5C/* \\ */) ? '\\x5C' :\n (c === 0x4E/* N */) ? '\\x85' :\n (c === 0x5F/* _ */) ? '\\xA0' :\n (c === 0x4C/* L */) ? '\\u2028' :\n (c === 0x50/* P */) ? '\\u2029' : '';\n}\n\nfunction charFromCodepoint(c) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c);\n }\n // Encode UTF-16 surrogate pair\n // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF\n return String.fromCharCode(\n ((c - 0x010000) >> 10) + 0xD800,\n ((c - 0x010000) & 0x03FF) + 0xDC00\n );\n}\n\nvar simpleEscapeCheck = new Array(256); // integer, for fast access\nvar simpleEscapeMap = new Array(256);\nfor (var i = 0; i < 256; i++) {\n simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;\n simpleEscapeMap[i] = simpleEscapeSequence(i);\n}\n\n\nfunction State(input, options) {\n this.input = input;\n\n this.filename = options['filename'] || null;\n this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;\n this.onWarning = options['onWarning'] || null;\n this.legacy = options['legacy'] || false;\n this.json = options['json'] || false;\n this.listener = options['listener'] || null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.typeMap = this.schema.compiledTypeMap;\n\n this.length = input.length;\n this.position = 0;\n this.line = 0;\n this.lineStart = 0;\n this.lineIndent = 0;\n\n this.documents = [];\n\n /*\n this.version;\n this.checkLineBreaks;\n this.tagMap;\n this.anchorMap;\n this.tag;\n this.anchor;\n this.kind;\n this.result;*/\n\n}\n\n\nfunction generateError(state, message) {\n return new YAMLException(\n message,\n new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart)));\n}\n\nfunction throwError(state, message) {\n throw generateError(state, message);\n}\n\nfunction throwWarning(state, message) {\n if (state.onWarning) {\n state.onWarning.call(null, generateError(state, message));\n }\n}\n\n\nvar directiveHandlers = {\n\n YAML: function handleYamlDirective(state, name, args) {\n\n var match, major, minor;\n\n if (state.version !== null) {\n throwError(state, 'duplication of %YAML directive');\n }\n\n if (args.length !== 1) {\n throwError(state, 'YAML directive accepts exactly one argument');\n }\n\n match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0]);\n\n if (match === null) {\n throwError(state, 'ill-formed argument of the YAML directive');\n }\n\n major = parseInt(match[1], 10);\n minor = parseInt(match[2], 10);\n\n if (major !== 1) {\n throwError(state, 'unacceptable YAML version of the document');\n }\n\n state.version = args[0];\n state.checkLineBreaks = (minor < 2);\n\n if (minor !== 1 && minor !== 2) {\n throwWarning(state, 'unsupported YAML version of the document');\n }\n },\n\n TAG: function handleTagDirective(state, name, args) {\n\n var handle, prefix;\n\n if (args.length !== 2) {\n throwError(state, 'TAG directive accepts exactly two arguments');\n }\n\n handle = args[0];\n prefix = args[1];\n\n if (!PATTERN_TAG_HANDLE.test(handle)) {\n throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');\n }\n\n if (_hasOwnProperty.call(state.tagMap, handle)) {\n throwError(state, 'there is a previously declared suffix for \"' + handle + '\" tag handle');\n }\n\n if (!PATTERN_TAG_URI.test(prefix)) {\n throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');\n }\n\n state.tagMap[handle] = prefix;\n }\n};\n\n\nfunction captureSegment(state, start, end, checkJson) {\n var _position, _length, _character, _result;\n\n if (start < end) {\n _result = state.input.slice(start, end);\n\n if (checkJson) {\n for (_position = 0, _length = _result.length; _position < _length; _position += 1) {\n _character = _result.charCodeAt(_position);\n if (!(_character === 0x09 ||\n (0x20 <= _character && _character <= 0x10FFFF))) {\n throwError(state, 'expected valid JSON character');\n }\n }\n } else if (PATTERN_NON_PRINTABLE.test(_result)) {\n throwError(state, 'the stream contains non-printable characters');\n }\n\n state.result += _result;\n }\n}\n\nfunction mergeMappings(state, destination, source, overridableKeys) {\n var sourceKeys, key, index, quantity;\n\n if (!common.isObject(source)) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable');\n }\n\n sourceKeys = Object.keys(source);\n\n for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {\n key = sourceKeys[index];\n\n if (!_hasOwnProperty.call(destination, key)) {\n destination[key] = source[key];\n overridableKeys[key] = true;\n }\n }\n}\n\nfunction storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) {\n var index, quantity;\n\n // The output is a plain object here, so keys can only be strings.\n // We need to convert keyNode to a string, but doing so can hang the process\n // (deeply nested arrays that explode exponentially using aliases).\n if (Array.isArray(keyNode)) {\n keyNode = Array.prototype.slice.call(keyNode);\n\n for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {\n if (Array.isArray(keyNode[index])) {\n throwError(state, 'nested arrays are not supported inside keys');\n }\n\n if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') {\n keyNode[index] = '[object Object]';\n }\n }\n }\n\n // Avoid code execution in load() via toString property\n // (still use its own toString for arrays, timestamps,\n // and whatever user schema extensions happen to have @@toStringTag)\n if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') {\n keyNode = '[object Object]';\n }\n\n\n keyNode = String(keyNode);\n\n if (_result === null) {\n _result = {};\n }\n\n if (keyTag === 'tag:yaml.org,2002:merge') {\n if (Array.isArray(valueNode)) {\n for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {\n mergeMappings(state, _result, valueNode[index], overridableKeys);\n }\n } else {\n mergeMappings(state, _result, valueNode, overridableKeys);\n }\n } else {\n if (!state.json &&\n !_hasOwnProperty.call(overridableKeys, keyNode) &&\n _hasOwnProperty.call(_result, keyNode)) {\n state.line = startLine || state.line;\n state.position = startPos || state.position;\n throwError(state, 'duplicated mapping key');\n }\n _result[keyNode] = valueNode;\n delete overridableKeys[keyNode];\n }\n\n return _result;\n}\n\nfunction readLineBreak(state) {\n var ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x0A/* LF */) {\n state.position++;\n } else if (ch === 0x0D/* CR */) {\n state.position++;\n if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {\n state.position++;\n }\n } else {\n throwError(state, 'a line break is expected');\n }\n\n state.line += 1;\n state.lineStart = state.position;\n}\n\nfunction skipSeparationSpace(state, allowComments, checkIndent) {\n var lineBreaks = 0,\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (allowComments && ch === 0x23/* # */) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);\n }\n\n if (is_EOL(ch)) {\n readLineBreak(state);\n\n ch = state.input.charCodeAt(state.position);\n lineBreaks++;\n state.lineIndent = 0;\n\n while (ch === 0x20/* Space */) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n } else {\n break;\n }\n }\n\n if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {\n throwWarning(state, 'deficient indentation');\n }\n\n return lineBreaks;\n}\n\nfunction testDocumentSeparator(state) {\n var _position = state.position,\n ch;\n\n ch = state.input.charCodeAt(_position);\n\n // Condition state.position === state.lineStart is tested\n // in parent on each call, for efficiency. No needs to test here again.\n if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\n ch === state.input.charCodeAt(_position + 1) &&\n ch === state.input.charCodeAt(_position + 2)) {\n\n _position += 3;\n\n ch = state.input.charCodeAt(_position);\n\n if (ch === 0 || is_WS_OR_EOL(ch)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction writeFoldedLines(state, count) {\n if (count === 1) {\n state.result += ' ';\n } else if (count > 1) {\n state.result += common.repeat('\\n', count - 1);\n }\n}\n\n\nfunction readPlainScalar(state, nodeIndent, withinFlowCollection) {\n var preceding,\n following,\n captureStart,\n captureEnd,\n hasPendingContent,\n _line,\n _lineStart,\n _lineIndent,\n _kind = state.kind,\n _result = state.result,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (is_WS_OR_EOL(ch) ||\n is_FLOW_INDICATOR(ch) ||\n ch === 0x23/* # */ ||\n ch === 0x26/* & */ ||\n ch === 0x2A/* * */ ||\n ch === 0x21/* ! */ ||\n ch === 0x7C/* | */ ||\n ch === 0x3E/* > */ ||\n ch === 0x27/* ' */ ||\n ch === 0x22/* \" */ ||\n ch === 0x25/* % */ ||\n ch === 0x40/* @ */ ||\n ch === 0x60/* ` */) {\n return false;\n }\n\n if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n return false;\n }\n }\n\n state.kind = 'scalar';\n state.result = '';\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n\n while (ch !== 0) {\n if (ch === 0x3A/* : */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n break;\n }\n\n } else if (ch === 0x23/* # */) {\n preceding = state.input.charCodeAt(state.position - 1);\n\n if (is_WS_OR_EOL(preceding)) {\n break;\n }\n\n } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||\n withinFlowCollection && is_FLOW_INDICATOR(ch)) {\n break;\n\n } else if (is_EOL(ch)) {\n _line = state.line;\n _lineStart = state.lineStart;\n _lineIndent = state.lineIndent;\n skipSeparationSpace(state, false, -1);\n\n if (state.lineIndent >= nodeIndent) {\n hasPendingContent = true;\n ch = state.input.charCodeAt(state.position);\n continue;\n } else {\n state.position = captureEnd;\n state.line = _line;\n state.lineStart = _lineStart;\n state.lineIndent = _lineIndent;\n break;\n }\n }\n\n if (hasPendingContent) {\n captureSegment(state, captureStart, captureEnd, false);\n writeFoldedLines(state, state.line - _line);\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n }\n\n if (!is_WHITE_SPACE(ch)) {\n captureEnd = state.position + 1;\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, captureEnd, false);\n\n if (state.result) {\n return true;\n }\n\n state.kind = _kind;\n state.result = _result;\n return false;\n}\n\nfunction readSingleQuotedScalar(state, nodeIndent) {\n var ch,\n captureStart, captureEnd;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x27/* ' */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x27/* ' */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x27/* ' */) {\n captureStart = state.position;\n state.position++;\n captureEnd = state.position;\n } else {\n return true;\n }\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a single quoted scalar');\n}\n\nfunction readDoubleQuotedScalar(state, nodeIndent) {\n var captureStart,\n captureEnd,\n hexLength,\n hexResult,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x22/* \" */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x22/* \" */) {\n captureSegment(state, captureStart, state.position, true);\n state.position++;\n return true;\n\n } else if (ch === 0x5C/* \\ */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (is_EOL(ch)) {\n skipSeparationSpace(state, false, nodeIndent);\n\n // TODO: rework to inline fn with no type cast?\n } else if (ch < 256 && simpleEscapeCheck[ch]) {\n state.result += simpleEscapeMap[ch];\n state.position++;\n\n } else if ((tmp = escapedHexLen(ch)) > 0) {\n hexLength = tmp;\n hexResult = 0;\n\n for (; hexLength > 0; hexLength--) {\n ch = state.input.charCodeAt(++state.position);\n\n if ((tmp = fromHexCode(ch)) >= 0) {\n hexResult = (hexResult << 4) + tmp;\n\n } else {\n throwError(state, 'expected hexadecimal character');\n }\n }\n\n state.result += charFromCodepoint(hexResult);\n\n state.position++;\n\n } else {\n throwError(state, 'unknown escape sequence');\n }\n\n captureStart = captureEnd = state.position;\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a double quoted scalar');\n}\n\nfunction readFlowCollection(state, nodeIndent) {\n var readNext = true,\n _line,\n _tag = state.tag,\n _result,\n _anchor = state.anchor,\n following,\n terminator,\n isPair,\n isExplicitPair,\n isMapping,\n overridableKeys = {},\n keyNode,\n keyTag,\n valueNode,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x5B/* [ */) {\n terminator = 0x5D;/* ] */\n isMapping = false;\n _result = [];\n } else if (ch === 0x7B/* { */) {\n terminator = 0x7D;/* } */\n isMapping = true;\n _result = {};\n } else {\n return false;\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n while (ch !== 0) {\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === terminator) {\n state.position++;\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = isMapping ? 'mapping' : 'sequence';\n state.result = _result;\n return true;\n } else if (!readNext) {\n throwError(state, 'missed comma between flow collection entries');\n }\n\n keyTag = keyNode = valueNode = null;\n isPair = isExplicitPair = false;\n\n if (ch === 0x3F/* ? */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following)) {\n isPair = isExplicitPair = true;\n state.position++;\n skipSeparationSpace(state, true, nodeIndent);\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n keyTag = state.tag;\n keyNode = state.result;\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {\n isPair = true;\n ch = state.input.charCodeAt(++state.position);\n skipSeparationSpace(state, true, nodeIndent);\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n valueNode = state.result;\n }\n\n if (isMapping) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode);\n } else if (isPair) {\n _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode));\n } else {\n _result.push(keyNode);\n }\n\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x2C/* , */) {\n readNext = true;\n ch = state.input.charCodeAt(++state.position);\n } else {\n readNext = false;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a flow collection');\n}\n\nfunction readBlockScalar(state, nodeIndent) {\n var captureStart,\n folding,\n chomping = CHOMPING_CLIP,\n didReadContent = false,\n detectedIndent = false,\n textIndent = nodeIndent,\n emptyLines = 0,\n atMoreIndented = false,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x7C/* | */) {\n folding = false;\n } else if (ch === 0x3E/* > */) {\n folding = true;\n } else {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n\n while (ch !== 0) {\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {\n if (CHOMPING_CLIP === chomping) {\n chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;\n } else {\n throwError(state, 'repeat of a chomping mode identifier');\n }\n\n } else if ((tmp = fromDecimalCode(ch)) >= 0) {\n if (tmp === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');\n } else if (!detectedIndent) {\n textIndent = nodeIndent + tmp - 1;\n detectedIndent = true;\n } else {\n throwError(state, 'repeat of an indentation width identifier');\n }\n\n } else {\n break;\n }\n }\n\n if (is_WHITE_SPACE(ch)) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (is_WHITE_SPACE(ch));\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (!is_EOL(ch) && (ch !== 0));\n }\n }\n\n while (ch !== 0) {\n readLineBreak(state);\n state.lineIndent = 0;\n\n ch = state.input.charCodeAt(state.position);\n\n while ((!detectedIndent || state.lineIndent < textIndent) &&\n (ch === 0x20/* Space */)) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (!detectedIndent && state.lineIndent > textIndent) {\n textIndent = state.lineIndent;\n }\n\n if (is_EOL(ch)) {\n emptyLines++;\n continue;\n }\n\n // End of the scalar.\n if (state.lineIndent < textIndent) {\n\n // Perform the chomping.\n if (chomping === CHOMPING_KEEP) {\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n } else if (chomping === CHOMPING_CLIP) {\n if (didReadContent) { // i.e. only if the scalar is not empty.\n state.result += '\\n';\n }\n }\n\n // Break this `while` cycle and go to the funciton's epilogue.\n break;\n }\n\n // Folded style: use fancy rules to handle line breaks.\n if (folding) {\n\n // Lines starting with white space characters (more-indented lines) are not folded.\n if (is_WHITE_SPACE(ch)) {\n atMoreIndented = true;\n // except for the first content line (cf. Example 8.1)\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n\n // End of more-indented block.\n } else if (atMoreIndented) {\n atMoreIndented = false;\n state.result += common.repeat('\\n', emptyLines + 1);\n\n // Just one line break - perceive as the same line.\n } else if (emptyLines === 0) {\n if (didReadContent) { // i.e. only if we have already read some scalar content.\n state.result += ' ';\n }\n\n // Several line breaks - perceive as different lines.\n } else {\n state.result += common.repeat('\\n', emptyLines);\n }\n\n // Literal style: just add exact number of line breaks between content lines.\n } else {\n // Keep all line breaks except the header line break.\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n }\n\n didReadContent = true;\n detectedIndent = true;\n emptyLines = 0;\n captureStart = state.position;\n\n while (!is_EOL(ch) && (ch !== 0)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, state.position, false);\n }\n\n return true;\n}\n\nfunction readBlockSequence(state, nodeIndent) {\n var _line,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = [],\n following,\n detected = false,\n ch;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n\n if (ch !== 0x2D/* - */) {\n break;\n }\n\n following = state.input.charCodeAt(state.position + 1);\n\n if (!is_WS_OR_EOL(following)) {\n break;\n }\n\n detected = true;\n state.position++;\n\n if (skipSeparationSpace(state, true, -1)) {\n if (state.lineIndent <= nodeIndent) {\n _result.push(null);\n ch = state.input.charCodeAt(state.position);\n continue;\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);\n _result.push(state.result);\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a sequence entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'sequence';\n state.result = _result;\n return true;\n }\n return false;\n}\n\nfunction readBlockMapping(state, nodeIndent, flowIndent) {\n var following,\n allowCompact,\n _line,\n _pos,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = {},\n overridableKeys = {},\n keyTag = null,\n keyNode = null,\n valueNode = null,\n atExplicitKey = false,\n detected = false,\n ch;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n following = state.input.charCodeAt(state.position + 1);\n _line = state.line; // Save the current line.\n _pos = state.position;\n\n //\n // Explicit notation case. There are two separate blocks:\n // first for the key (denoted by \"?\") and second for the value (denoted by \":\")\n //\n if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {\n\n if (ch === 0x3F/* ? */) {\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = true;\n allowCompact = true;\n\n } else if (atExplicitKey) {\n // i.e. 0x3A/* : */ === character after the explicit key.\n atExplicitKey = false;\n allowCompact = true;\n\n } else {\n throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');\n }\n\n state.position += 1;\n ch = following;\n\n //\n // Implicit notation case. Flow-style node as the key first, then \":\", and the value.\n //\n } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n\n if (state.line === _line) {\n ch = state.input.charCodeAt(state.position);\n\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x3A/* : */) {\n ch = state.input.charCodeAt(++state.position);\n\n if (!is_WS_OR_EOL(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');\n }\n\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = false;\n allowCompact = false;\n keyTag = state.tag;\n keyNode = state.result;\n\n } else if (detected) {\n throwError(state, 'can not read an implicit mapping pair; a colon is missed');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else {\n break; // Reading is done. Go to the epilogue.\n }\n\n //\n // Common reading code for both explicit and implicit notations.\n //\n if (state.line === _line || state.lineIndent > nodeIndent) {\n if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {\n if (atExplicitKey) {\n keyNode = state.result;\n } else {\n valueNode = state.result;\n }\n }\n\n if (!atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos);\n keyTag = keyNode = valueNode = null;\n }\n\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n }\n\n if (state.lineIndent > nodeIndent && (ch !== 0)) {\n throwError(state, 'bad indentation of a mapping entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n //\n // Epilogue.\n //\n\n // Special case: last mapping's node contains only the key in explicit notation.\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);\n }\n\n // Expose the resulting mapping.\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'mapping';\n state.result = _result;\n }\n\n return detected;\n}\n\nfunction readTagProperty(state) {\n var _position,\n isVerbatim = false,\n isNamed = false,\n tagHandle,\n tagName,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x21/* ! */) return false;\n\n if (state.tag !== null) {\n throwError(state, 'duplication of a tag property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x3C/* < */) {\n isVerbatim = true;\n ch = state.input.charCodeAt(++state.position);\n\n } else if (ch === 0x21/* ! */) {\n isNamed = true;\n tagHandle = '!!';\n ch = state.input.charCodeAt(++state.position);\n\n } else {\n tagHandle = '!';\n }\n\n _position = state.position;\n\n if (isVerbatim) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && ch !== 0x3E/* > */);\n\n if (state.position < state.length) {\n tagName = state.input.slice(_position, state.position);\n ch = state.input.charCodeAt(++state.position);\n } else {\n throwError(state, 'unexpected end of the stream within a verbatim tag');\n }\n } else {\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n\n if (ch === 0x21/* ! */) {\n if (!isNamed) {\n tagHandle = state.input.slice(_position - 1, state.position + 1);\n\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) {\n throwError(state, 'named tag handle cannot contain such characters');\n }\n\n isNamed = true;\n _position = state.position + 1;\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks');\n }\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n tagName = state.input.slice(_position, state.position);\n\n if (PATTERN_FLOW_INDICATORS.test(tagName)) {\n throwError(state, 'tag suffix cannot contain flow indicator characters');\n }\n }\n\n if (tagName && !PATTERN_TAG_URI.test(tagName)) {\n throwError(state, 'tag name cannot contain such characters: ' + tagName);\n }\n\n if (isVerbatim) {\n state.tag = tagName;\n\n } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {\n state.tag = state.tagMap[tagHandle] + tagName;\n\n } else if (tagHandle === '!') {\n state.tag = '!' + tagName;\n\n } else if (tagHandle === '!!') {\n state.tag = 'tag:yaml.org,2002:' + tagName;\n\n } else {\n throwError(state, 'undeclared tag handle \"' + tagHandle + '\"');\n }\n\n return true;\n}\n\nfunction readAnchorProperty(state) {\n var _position,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x26/* & */) return false;\n\n if (state.anchor !== null) {\n throwError(state, 'duplication of an anchor property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an anchor node must contain at least one character');\n }\n\n state.anchor = state.input.slice(_position, state.position);\n return true;\n}\n\nfunction readAlias(state) {\n var _position, alias,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x2A/* * */) return false;\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an alias node must contain at least one character');\n }\n\n alias = state.input.slice(_position, state.position);\n\n if (!_hasOwnProperty.call(state.anchorMap, alias)) {\n throwError(state, 'unidentified alias \"' + alias + '\"');\n }\n\n state.result = state.anchorMap[alias];\n skipSeparationSpace(state, true, -1);\n return true;\n}\n\nfunction composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {\n var allowBlockStyles,\n allowBlockScalars,\n allowBlockCollections,\n indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n }\n }\n\n if (indentStatus === 1) {\n while (readTagProperty(state) || readAnchorProperty(state)) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n allowBlockCollections = allowBlockStyles;\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n } else {\n allowBlockCollections = false;\n }\n }\n }\n\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact;\n }\n\n if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {\n if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {\n flowIndent = parentIndent;\n } else {\n flowIndent = parentIndent + 1;\n }\n\n blockIndent = state.position - state.lineStart;\n\n if (indentStatus === 1) {\n if (allowBlockCollections &&\n (readBlockSequence(state, blockIndent) ||\n readBlockMapping(state, blockIndent, flowIndent)) ||\n readFlowCollection(state, flowIndent)) {\n hasContent = true;\n } else {\n if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||\n readSingleQuotedScalar(state, flowIndent) ||\n readDoubleQuotedScalar(state, flowIndent)) {\n hasContent = true;\n\n } else if (readAlias(state)) {\n hasContent = true;\n\n if (state.tag !== null || state.anchor !== null) {\n throwError(state, 'alias node should not have any properties');\n }\n\n } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {\n hasContent = true;\n\n if (state.tag === null) {\n state.tag = '?';\n }\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else if (indentStatus === 0) {\n // Special case: block sequences are allowed to have same indentation level as the parent.\n // http://www.yaml.org/spec/1.2/spec.html#id2799784\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);\n }\n }\n\n if (state.tag !== null && state.tag !== '!') {\n if (state.tag === '?') {\n // Implicit resolving is not allowed for non-scalar types, and '?'\n // non-specific tag is only automatically assigned to plain scalars.\n //\n // We only need to check kind conformity in case user explicitly assigns '?'\n // tag, for example like this: \"! [0]\"\n //\n if (state.result !== null && state.kind !== 'scalar') {\n throwError(state, 'unacceptable node kind for ! tag; it should be \"scalar\", not \"' + state.kind + '\"');\n }\n\n for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {\n type = state.implicitTypes[typeIndex];\n\n if (type.resolve(state.result)) { // `state.result` updated in resolver if matched\n state.result = type.construct(state.result);\n state.tag = type.tag;\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n break;\n }\n }\n } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) {\n type = state.typeMap[state.kind || 'fallback'][state.tag];\n\n if (state.result !== null && type.kind !== state.kind) {\n throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be \"' + type.kind + '\", not \"' + state.kind + '\"');\n }\n\n if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched\n throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');\n } else {\n state.result = type.construct(state.result);\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else {\n throwError(state, 'unknown tag !<' + state.tag + '>');\n }\n }\n\n if (state.listener !== null) {\n state.listener('close', state);\n }\n return state.tag !== null || state.anchor !== null || hasContent;\n}\n\nfunction readDocument(state) {\n var documentStart = state.position,\n _position,\n directiveName,\n directiveArgs,\n hasDirectives = false,\n ch;\n\n state.version = null;\n state.checkLineBreaks = state.legacy;\n state.tagMap = {};\n state.anchorMap = {};\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if (state.lineIndent > 0 || ch !== 0x25/* % */) {\n break;\n }\n\n hasDirectives = true;\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveName = state.input.slice(_position, state.position);\n directiveArgs = [];\n\n if (directiveName.length < 1) {\n throwError(state, 'directive name must not be less than one character in length');\n }\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && !is_EOL(ch));\n break;\n }\n\n if (is_EOL(ch)) break;\n\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveArgs.push(state.input.slice(_position, state.position));\n }\n\n if (ch !== 0) readLineBreak(state);\n\n if (_hasOwnProperty.call(directiveHandlers, directiveName)) {\n directiveHandlers[directiveName](state, directiveName, directiveArgs);\n } else {\n throwWarning(state, 'unknown document directive \"' + directiveName + '\"');\n }\n }\n\n skipSeparationSpace(state, true, -1);\n\n if (state.lineIndent === 0 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected');\n }\n\n composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);\n skipSeparationSpace(state, true, -1);\n\n if (state.checkLineBreaks &&\n PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {\n throwWarning(state, 'non-ASCII line breaks are interpreted as content');\n }\n\n state.documents.push(state.result);\n\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n\n if (state.input.charCodeAt(state.position) === 0x2E/* . */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n }\n return;\n }\n\n if (state.position < (state.length - 1)) {\n throwError(state, 'end of the stream or a document separator is expected');\n } else {\n return;\n }\n}\n\n\nfunction loadDocuments(input, options) {\n input = String(input);\n options = options || {};\n\n if (input.length !== 0) {\n\n // Add tailing `\\n` if not exists\n if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&\n input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {\n input += '\\n';\n }\n\n // Strip BOM\n if (input.charCodeAt(0) === 0xFEFF) {\n input = input.slice(1);\n }\n }\n\n var state = new State(input, options);\n\n var nullpos = input.indexOf('\\0');\n\n if (nullpos !== -1) {\n state.position = nullpos;\n throwError(state, 'null byte is not allowed in input');\n }\n\n // Use 0 as string terminator. That significantly simplifies bounds check.\n state.input += '\\0';\n\n while (state.input.charCodeAt(state.position) === 0x20/* Space */) {\n state.lineIndent += 1;\n state.position += 1;\n }\n\n while (state.position < (state.length - 1)) {\n readDocument(state);\n }\n\n return state.documents;\n}\n\n\nfunction loadAll(input, iterator, options) {\n if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') {\n options = iterator;\n iterator = null;\n }\n\n var documents = loadDocuments(input, options);\n\n if (typeof iterator !== 'function') {\n return documents;\n }\n\n for (var index = 0, length = documents.length; index < length; index += 1) {\n iterator(documents[index]);\n }\n}\n\n\nfunction load(input, options) {\n var documents = loadDocuments(input, options);\n\n if (documents.length === 0) {\n /*eslint-disable no-undefined*/\n return undefined;\n } else if (documents.length === 1) {\n return documents[0];\n }\n throw new YAMLException('expected a single document in the stream, but found more');\n}\n\n\nfunction safeLoadAll(input, iterator, options) {\n if (typeof iterator === 'object' && iterator !== null && typeof options === 'undefined') {\n options = iterator;\n iterator = null;\n }\n\n return loadAll(input, iterator, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n}\n\n\nfunction safeLoad(input, options) {\n return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n}\n\n\nmodule.exports.loadAll = loadAll;\nmodule.exports.load = load;\nmodule.exports.safeLoadAll = safeLoadAll;\nmodule.exports.safeLoad = safeLoad;\n","'use strict';\n\n\nvar common = require('./common');\n\n\nfunction Mark(name, buffer, position, line, column) {\n this.name = name;\n this.buffer = buffer;\n this.position = position;\n this.line = line;\n this.column = column;\n}\n\n\nMark.prototype.getSnippet = function getSnippet(indent, maxLength) {\n var head, start, tail, end, snippet;\n\n if (!this.buffer) return null;\n\n indent = indent || 4;\n maxLength = maxLength || 75;\n\n head = '';\n start = this.position;\n\n while (start > 0 && '\\x00\\r\\n\\x85\\u2028\\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) {\n start -= 1;\n if (this.position - start > (maxLength / 2 - 1)) {\n head = ' ... ';\n start += 5;\n break;\n }\n }\n\n tail = '';\n end = this.position;\n\n while (end < this.buffer.length && '\\x00\\r\\n\\x85\\u2028\\u2029'.indexOf(this.buffer.charAt(end)) === -1) {\n end += 1;\n if (end - this.position > (maxLength / 2 - 1)) {\n tail = ' ... ';\n end -= 5;\n break;\n }\n }\n\n snippet = this.buffer.slice(start, end);\n\n return common.repeat(' ', indent) + head + snippet + tail + '\\n' +\n common.repeat(' ', indent + this.position - start + head.length) + '^';\n};\n\n\nMark.prototype.toString = function toString(compact) {\n var snippet, where = '';\n\n if (this.name) {\n where += 'in \"' + this.name + '\" ';\n }\n\n where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1);\n\n if (!compact) {\n snippet = this.getSnippet();\n\n if (snippet) {\n where += ':\\n' + snippet;\n }\n }\n\n return where;\n};\n\n\nmodule.exports = Mark;\n","'use strict';\n\n/*eslint-disable max-len*/\n\nvar common = require('./common');\nvar YAMLException = require('./exception');\nvar Type = require('./type');\n\n\nfunction compileList(schema, name, result) {\n var exclude = [];\n\n schema.include.forEach(function (includedSchema) {\n result = compileList(includedSchema, name, result);\n });\n\n schema[name].forEach(function (currentType) {\n result.forEach(function (previousType, previousIndex) {\n if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) {\n exclude.push(previousIndex);\n }\n });\n\n result.push(currentType);\n });\n\n return result.filter(function (type, index) {\n return exclude.indexOf(index) === -1;\n });\n}\n\n\nfunction compileMap(/* lists... */) {\n var result = {\n scalar: {},\n sequence: {},\n mapping: {},\n fallback: {}\n }, index, length;\n\n function collectType(type) {\n result[type.kind][type.tag] = result['fallback'][type.tag] = type;\n }\n\n for (index = 0, length = arguments.length; index < length; index += 1) {\n arguments[index].forEach(collectType);\n }\n return result;\n}\n\n\nfunction Schema(definition) {\n this.include = definition.include || [];\n this.implicit = definition.implicit || [];\n this.explicit = definition.explicit || [];\n\n this.implicit.forEach(function (type) {\n if (type.loadKind && type.loadKind !== 'scalar') {\n throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');\n }\n });\n\n this.compiledImplicit = compileList(this, 'implicit', []);\n this.compiledExplicit = compileList(this, 'explicit', []);\n this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit);\n}\n\n\nSchema.DEFAULT = null;\n\n\nSchema.create = function createSchema() {\n var schemas, types;\n\n switch (arguments.length) {\n case 1:\n schemas = Schema.DEFAULT;\n types = arguments[0];\n break;\n\n case 2:\n schemas = arguments[0];\n types = arguments[1];\n break;\n\n default:\n throw new YAMLException('Wrong number of arguments for Schema.create function');\n }\n\n schemas = common.toArray(schemas);\n types = common.toArray(types);\n\n if (!schemas.every(function (schema) { return schema instanceof Schema; })) {\n throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.');\n }\n\n if (!types.every(function (type) { return type instanceof Type; })) {\n throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n\n return new Schema({\n include: schemas,\n explicit: types\n });\n};\n\n\nmodule.exports = Schema;\n","// Standard YAML's Core schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2804923\n//\n// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.\n// So, Core schema has no distinctions from JSON schema is JS-YAML.\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = new Schema({\n include: [\n require('./json')\n ]\n});\n","// JS-YAML's default schema for `load` function.\n// It is not described in the YAML specification.\n//\n// This schema is based on JS-YAML's default safe schema and includes\n// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function.\n//\n// Also this schema is used as default base schema at `Schema.create` function.\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = Schema.DEFAULT = new Schema({\n include: [\n require('./default_safe')\n ],\n explicit: [\n require('../type/js/undefined'),\n require('../type/js/regexp'),\n require('../type/js/function')\n ]\n});\n","// JS-YAML's default schema for `safeLoad` function.\n// It is not described in the YAML specification.\n//\n// This schema is based on standard YAML's Core schema and includes most of\n// extra types described at YAML tag repository. (http://yaml.org/type/)\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = new Schema({\n include: [\n require('./core')\n ],\n implicit: [\n require('../type/timestamp'),\n require('../type/merge')\n ],\n explicit: [\n require('../type/binary'),\n require('../type/omap'),\n require('../type/pairs'),\n require('../type/set')\n ]\n});\n","// Standard YAML's Failsafe schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2802346\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = new Schema({\n explicit: [\n require('../type/str'),\n require('../type/seq'),\n require('../type/map')\n ]\n});\n","// Standard YAML's JSON schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2803231\n//\n// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.\n// So, this schema is not such strict as defined in the YAML specification.\n// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc.\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = new Schema({\n include: [\n require('./failsafe')\n ],\n implicit: [\n require('../type/null'),\n require('../type/bool'),\n require('../type/int'),\n require('../type/float')\n ]\n});\n","'use strict';\n\nvar YAMLException = require('./exception');\n\nvar TYPE_CONSTRUCTOR_OPTIONS = [\n 'kind',\n 'resolve',\n 'construct',\n 'instanceOf',\n 'predicate',\n 'represent',\n 'defaultStyle',\n 'styleAliases'\n];\n\nvar YAML_NODE_KINDS = [\n 'scalar',\n 'sequence',\n 'mapping'\n];\n\nfunction compileStyleAliases(map) {\n var result = {};\n\n if (map !== null) {\n Object.keys(map).forEach(function (style) {\n map[style].forEach(function (alias) {\n result[String(alias)] = style;\n });\n });\n }\n\n return result;\n}\n\nfunction Type(tag, options) {\n options = options || {};\n\n Object.keys(options).forEach(function (name) {\n if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {\n throw new YAMLException('Unknown option \"' + name + '\" is met in definition of \"' + tag + '\" YAML type.');\n }\n });\n\n // TODO: Add tag format check.\n this.tag = tag;\n this.kind = options['kind'] || null;\n this.resolve = options['resolve'] || function () { return true; };\n this.construct = options['construct'] || function (data) { return data; };\n this.instanceOf = options['instanceOf'] || null;\n this.predicate = options['predicate'] || null;\n this.represent = options['represent'] || null;\n this.defaultStyle = options['defaultStyle'] || null;\n this.styleAliases = compileStyleAliases(options['styleAliases'] || null);\n\n if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {\n throw new YAMLException('Unknown kind \"' + this.kind + '\" is specified for \"' + tag + '\" YAML type.');\n }\n}\n\nmodule.exports = Type;\n",null,"'use strict';\n\nvar Type = require('../type');\n\nfunction resolveYamlBoolean(data) {\n if (data === null) return false;\n\n var max = data.length;\n\n return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||\n (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));\n}\n\nfunction constructYamlBoolean(data) {\n return data === 'true' ||\n data === 'True' ||\n data === 'TRUE';\n}\n\nfunction isBoolean(object) {\n return Object.prototype.toString.call(object) === '[object Boolean]';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:bool', {\n kind: 'scalar',\n resolve: resolveYamlBoolean,\n construct: constructYamlBoolean,\n predicate: isBoolean,\n represent: {\n lowercase: function (object) { return object ? 'true' : 'false'; },\n uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },\n camelcase: function (object) { return object ? 'True' : 'False'; }\n },\n defaultStyle: 'lowercase'\n});\n","'use strict';\n\nvar common = require('../common');\nvar Type = require('../type');\n\nvar YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n // special case, seems not from spec\n '|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +\n // 20:59\n '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$');\n\nfunction resolveYamlFloat(data) {\n if (data === null) return false;\n\n if (!YAML_FLOAT_PATTERN.test(data) ||\n // Quick hack to not allow integers end with `_`\n // Probably should update regexp & check speed\n data[data.length - 1] === '_') {\n return false;\n }\n\n return true;\n}\n\nfunction constructYamlFloat(data) {\n var value, sign, base, digits;\n\n value = data.replace(/_/g, '').toLowerCase();\n sign = value[0] === '-' ? -1 : 1;\n digits = [];\n\n if ('+-'.indexOf(value[0]) >= 0) {\n value = value.slice(1);\n }\n\n if (value === '.inf') {\n return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;\n\n } else if (value === '.nan') {\n return NaN;\n\n } else if (value.indexOf(':') >= 0) {\n value.split(':').forEach(function (v) {\n digits.unshift(parseFloat(v, 10));\n });\n\n value = 0.0;\n base = 1;\n\n digits.forEach(function (d) {\n value += d * base;\n base *= 60;\n });\n\n return sign * value;\n\n }\n return sign * parseFloat(value, 10);\n}\n\n\nvar SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;\n\nfunction representYamlFloat(object, style) {\n var res;\n\n if (isNaN(object)) {\n switch (style) {\n case 'lowercase': return '.nan';\n case 'uppercase': return '.NAN';\n case 'camelcase': return '.NaN';\n }\n } else if (Number.POSITIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '.inf';\n case 'uppercase': return '.INF';\n case 'camelcase': return '.Inf';\n }\n } else if (Number.NEGATIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '-.inf';\n case 'uppercase': return '-.INF';\n case 'camelcase': return '-.Inf';\n }\n } else if (common.isNegativeZero(object)) {\n return '-0.0';\n }\n\n res = object.toString(10);\n\n // JS stringifier can build scientific format without dots: 5e-100,\n // while YAML requres dot: 5.e-100. Fix it with simple hack\n\n return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;\n}\n\nfunction isFloat(object) {\n return (Object.prototype.toString.call(object) === '[object Number]') &&\n (object % 1 !== 0 || common.isNegativeZero(object));\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:float', {\n kind: 'scalar',\n resolve: resolveYamlFloat,\n construct: constructYamlFloat,\n predicate: isFloat,\n represent: representYamlFloat,\n defaultStyle: 'lowercase'\n});\n","'use strict';\n\nvar common = require('../common');\nvar Type = require('../type');\n\nfunction isHexCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||\n ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||\n ((0x61/* a */ <= c) && (c <= 0x66/* f */));\n}\n\nfunction isOctCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));\n}\n\nfunction isDecCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));\n}\n\nfunction resolveYamlInteger(data) {\n if (data === null) return false;\n\n var max = data.length,\n index = 0,\n hasDigits = false,\n ch;\n\n if (!max) return false;\n\n ch = data[index];\n\n // sign\n if (ch === '-' || ch === '+') {\n ch = data[++index];\n }\n\n if (ch === '0') {\n // 0\n if (index + 1 === max) return true;\n ch = data[++index];\n\n // base 2, base 8, base 16\n\n if (ch === 'b') {\n // base 2\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (ch !== '0' && ch !== '1') return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'x') {\n // base 16\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isHexCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n // base 8\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isOctCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n // base 10 (except 0) or base 60\n\n // value should not start with `_`;\n if (ch === '_') return false;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (ch === ':') break;\n if (!isDecCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n\n // Should have digits and should not end with `_`\n if (!hasDigits || ch === '_') return false;\n\n // if !base60 - done;\n if (ch !== ':') return true;\n\n // base60 almost not used, no needs to optimize\n return /^(:[0-5]?[0-9])+$/.test(data.slice(index));\n}\n\nfunction constructYamlInteger(data) {\n var value = data, sign = 1, ch, base, digits = [];\n\n if (value.indexOf('_') !== -1) {\n value = value.replace(/_/g, '');\n }\n\n ch = value[0];\n\n if (ch === '-' || ch === '+') {\n if (ch === '-') sign = -1;\n value = value.slice(1);\n ch = value[0];\n }\n\n if (value === '0') return 0;\n\n if (ch === '0') {\n if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);\n if (value[1] === 'x') return sign * parseInt(value, 16);\n return sign * parseInt(value, 8);\n }\n\n if (value.indexOf(':') !== -1) {\n value.split(':').forEach(function (v) {\n digits.unshift(parseInt(v, 10));\n });\n\n value = 0;\n base = 1;\n\n digits.forEach(function (d) {\n value += (d * base);\n base *= 60;\n });\n\n return sign * value;\n\n }\n\n return sign * parseInt(value, 10);\n}\n\nfunction isInteger(object) {\n return (Object.prototype.toString.call(object)) === '[object Number]' &&\n (object % 1 === 0 && !common.isNegativeZero(object));\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:int', {\n kind: 'scalar',\n resolve: resolveYamlInteger,\n construct: constructYamlInteger,\n predicate: isInteger,\n represent: {\n binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); },\n octal: function (obj) { return obj >= 0 ? '0' + obj.toString(8) : '-0' + obj.toString(8).slice(1); },\n decimal: function (obj) { return obj.toString(10); },\n /* eslint-disable max-len */\n hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); }\n },\n defaultStyle: 'decimal',\n styleAliases: {\n binary: [ 2, 'bin' ],\n octal: [ 8, 'oct' ],\n decimal: [ 10, 'dec' ],\n hexadecimal: [ 16, 'hex' ]\n }\n});\n",null,"'use strict';\n\nvar Type = require('../../type');\n\nfunction resolveJavascriptRegExp(data) {\n if (data === null) return false;\n if (data.length === 0) return false;\n\n var regexp = data,\n tail = /\\/([gim]*)$/.exec(data),\n modifiers = '';\n\n // if regexp starts with '/' it can have modifiers and must be properly closed\n // `/foo/gim` - modifiers tail can be maximum 3 chars\n if (regexp[0] === '/') {\n if (tail) modifiers = tail[1];\n\n if (modifiers.length > 3) return false;\n // if expression starts with /, is should be properly terminated\n if (regexp[regexp.length - modifiers.length - 1] !== '/') return false;\n }\n\n return true;\n}\n\nfunction constructJavascriptRegExp(data) {\n var regexp = data,\n tail = /\\/([gim]*)$/.exec(data),\n modifiers = '';\n\n // `/foo/gim` - tail can be maximum 4 chars\n if (regexp[0] === '/') {\n if (tail) modifiers = tail[1];\n regexp = regexp.slice(1, regexp.length - modifiers.length - 1);\n }\n\n return new RegExp(regexp, modifiers);\n}\n\nfunction representJavascriptRegExp(object /*, style*/) {\n var result = '/' + object.source + '/';\n\n if (object.global) result += 'g';\n if (object.multiline) result += 'm';\n if (object.ignoreCase) result += 'i';\n\n return result;\n}\n\nfunction isRegExp(object) {\n return Object.prototype.toString.call(object) === '[object RegExp]';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:js/regexp', {\n kind: 'scalar',\n resolve: resolveJavascriptRegExp,\n construct: constructJavascriptRegExp,\n predicate: isRegExp,\n represent: representJavascriptRegExp\n});\n","'use strict';\n\nvar Type = require('../../type');\n\nfunction resolveJavascriptUndefined() {\n return true;\n}\n\nfunction constructJavascriptUndefined() {\n /*eslint-disable no-undefined*/\n return undefined;\n}\n\nfunction representJavascriptUndefined() {\n return '';\n}\n\nfunction isUndefined(object) {\n return typeof object === 'undefined';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:js/undefined', {\n kind: 'scalar',\n resolve: resolveJavascriptUndefined,\n construct: constructJavascriptUndefined,\n predicate: isUndefined,\n represent: representJavascriptUndefined\n});\n","'use strict';\n\nvar Type = require('../type');\n\nmodule.exports = new Type('tag:yaml.org,2002:map', {\n kind: 'mapping',\n construct: function (data) { return data !== null ? data : {}; }\n});\n","'use strict';\n\nvar Type = require('../type');\n\nfunction resolveYamlMerge(data) {\n return data === '<<' || data === null;\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:merge', {\n kind: 'scalar',\n resolve: resolveYamlMerge\n});\n","'use strict';\n\nvar Type = require('../type');\n\nfunction resolveYamlNull(data) {\n if (data === null) return true;\n\n var max = data.length;\n\n return (max === 1 && data === '~') ||\n (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));\n}\n\nfunction constructYamlNull() {\n return null;\n}\n\nfunction isNull(object) {\n return object === null;\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:null', {\n kind: 'scalar',\n resolve: resolveYamlNull,\n construct: constructYamlNull,\n predicate: isNull,\n represent: {\n canonical: function () { return '~'; },\n lowercase: function () { return 'null'; },\n uppercase: function () { return 'NULL'; },\n camelcase: function () { return 'Null'; }\n },\n defaultStyle: 'lowercase'\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\nvar _toString = Object.prototype.toString;\n\nfunction resolveYamlOmap(data) {\n if (data === null) return true;\n\n var objectKeys = [], index, length, pair, pairKey, pairHasKey,\n object = data;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n pairHasKey = false;\n\n if (_toString.call(pair) !== '[object Object]') return false;\n\n for (pairKey in pair) {\n if (_hasOwnProperty.call(pair, pairKey)) {\n if (!pairHasKey) pairHasKey = true;\n else return false;\n }\n }\n\n if (!pairHasKey) return false;\n\n if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);\n else return false;\n }\n\n return true;\n}\n\nfunction constructYamlOmap(data) {\n return data !== null ? data : [];\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:omap', {\n kind: 'sequence',\n resolve: resolveYamlOmap,\n construct: constructYamlOmap\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar _toString = Object.prototype.toString;\n\nfunction resolveYamlPairs(data) {\n if (data === null) return true;\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n if (_toString.call(pair) !== '[object Object]') return false;\n\n keys = Object.keys(pair);\n\n if (keys.length !== 1) return false;\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return true;\n}\n\nfunction constructYamlPairs(data) {\n if (data === null) return [];\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n keys = Object.keys(pair);\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return result;\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:pairs', {\n kind: 'sequence',\n resolve: resolveYamlPairs,\n construct: constructYamlPairs\n});\n","'use strict';\n\nvar Type = require('../type');\n\nmodule.exports = new Type('tag:yaml.org,2002:seq', {\n kind: 'sequence',\n construct: function (data) { return data !== null ? data : []; }\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction resolveYamlSet(data) {\n if (data === null) return true;\n\n var key, object = data;\n\n for (key in object) {\n if (_hasOwnProperty.call(object, key)) {\n if (object[key] !== null) return false;\n }\n }\n\n return true;\n}\n\nfunction constructYamlSet(data) {\n return data !== null ? data : {};\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:set', {\n kind: 'mapping',\n resolve: resolveYamlSet,\n construct: constructYamlSet\n});\n","'use strict';\n\nvar Type = require('../type');\n\nmodule.exports = new Type('tag:yaml.org,2002:str', {\n kind: 'scalar',\n construct: function (data) { return data !== null ? data : ''; }\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar YAML_DATE_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9])' + // [2] month\n '-([0-9][0-9])$'); // [3] day\n\nvar YAML_TIMESTAMP_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9]?)' + // [2] month\n '-([0-9][0-9]?)' + // [3] day\n '(?:[Tt]|[ \\\\t]+)' + // ...\n '([0-9][0-9]?)' + // [4] hour\n ':([0-9][0-9])' + // [5] minute\n ':([0-9][0-9])' + // [6] second\n '(?:\\\\.([0-9]*))?' + // [7] fraction\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour\n '(?::([0-9][0-9]))?))?$'); // [11] tz_minute\n\nfunction resolveYamlTimestamp(data) {\n if (data === null) return false;\n if (YAML_DATE_REGEXP.exec(data) !== null) return true;\n if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;\n return false;\n}\n\nfunction constructYamlTimestamp(data) {\n var match, year, month, day, hour, minute, second, fraction = 0,\n delta = null, tz_hour, tz_minute, date;\n\n match = YAML_DATE_REGEXP.exec(data);\n if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);\n\n if (match === null) throw new Error('Date resolve error');\n\n // match: [1] year [2] month [3] day\n\n year = +(match[1]);\n month = +(match[2]) - 1; // JS month starts with 0\n day = +(match[3]);\n\n if (!match[4]) { // no hour\n return new Date(Date.UTC(year, month, day));\n }\n\n // match: [4] hour [5] minute [6] second [7] fraction\n\n hour = +(match[4]);\n minute = +(match[5]);\n second = +(match[6]);\n\n if (match[7]) {\n fraction = match[7].slice(0, 3);\n while (fraction.length < 3) { // milli-seconds\n fraction += '0';\n }\n fraction = +fraction;\n }\n\n // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute\n\n if (match[9]) {\n tz_hour = +(match[10]);\n tz_minute = +(match[11] || 0);\n delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds\n if (match[9] === '-') delta = -delta;\n }\n\n date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));\n\n if (delta) date.setTime(date.getTime() - delta);\n\n return date;\n}\n\nfunction representYamlTimestamp(object /*, style*/) {\n return object.toISOString();\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:timestamp', {\n kind: 'scalar',\n resolve: resolveYamlTimestamp,\n construct: constructYamlTimestamp,\n instanceOf: Date,\n represent: representYamlTimestamp\n});\n","(function(){\n\n // Copyright (c) 2005 Tom Wu\n // All Rights Reserved.\n // See \"LICENSE\" for details.\n\n // Basic JavaScript BN library - subset useful for RSA encryption.\n\n // Bits per digit\n var dbits;\n\n // JavaScript engine analysis\n var canary = 0xdeadbeefcafe;\n var j_lm = ((canary&0xffffff)==0xefcafe);\n\n // (public) Constructor\n function BigInteger(a,b,c) {\n if(a != null)\n if(\"number\" == typeof a) this.fromNumber(a,b,c);\n else if(b == null && \"string\" != typeof a) this.fromString(a,256);\n else this.fromString(a,b);\n }\n\n // return new, unset BigInteger\n function nbi() { return new BigInteger(null); }\n\n // am: Compute w_j += (x*this_i), propagate carries,\n // c is initial carry, returns final carry.\n // c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n // We need to select the fastest one that works in this environment.\n\n // am1: use a single mult and divide to get the high bits,\n // max digit bits should be 26 because\n // max internal value = 2*dvalue^2-2*dvalue (< 2^53)\n function am1(i,x,w,j,c,n) {\n while(--n >= 0) {\n var v = x*this[i++]+w[j]+c;\n c = Math.floor(v/0x4000000);\n w[j++] = v&0x3ffffff;\n }\n return c;\n }\n // am2 avoids a big mult-and-extract completely.\n // Max digit bits should be <= 30 because we do bitwise ops\n // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\n function am2(i,x,w,j,c,n) {\n var xl = x&0x7fff, xh = x>>15;\n while(--n >= 0) {\n var l = this[i]&0x7fff;\n var h = this[i++]>>15;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff);\n c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);\n w[j++] = l&0x3fffffff;\n }\n return c;\n }\n // Alternately, set max digit bits to 28 since some\n // browsers slow down when dealing with 32-bit numbers.\n function am3(i,x,w,j,c,n) {\n var xl = x&0x3fff, xh = x>>14;\n while(--n >= 0) {\n var l = this[i]&0x3fff;\n var h = this[i++]>>14;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x3fff)<<14)+w[j]+c;\n c = (l>>28)+(m>>14)+xh*h;\n w[j++] = l&0xfffffff;\n }\n return c;\n }\n var inBrowser = typeof navigator !== \"undefined\";\n if(inBrowser && j_lm && (navigator.appName == \"Microsoft Internet Explorer\")) {\n BigInteger.prototype.am = am2;\n dbits = 30;\n }\n else if(inBrowser && j_lm && (navigator.appName != \"Netscape\")) {\n BigInteger.prototype.am = am1;\n dbits = 26;\n }\n else { // Mozilla/Netscape seems to prefer am3\n BigInteger.prototype.am = am3;\n dbits = 28;\n }\n\n BigInteger.prototype.DB = dbits;\n BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i];\n r.t = this.t;\n r.s = this.s;\n }\n\n // (protected) set from integer value x, -DV <= x < DV\n function bnpFromInt(x) {\n this.t = 1;\n this.s = (x<0)?-1:0;\n if(x > 0) this[0] = x;\n else if(x < -1) this[0] = x+this.DV;\n else this.t = 0;\n }\n\n // return bigint initialized to value\n function nbv(i) { var r = nbi(); r.fromInt(i); return r; }\n\n // (protected) set from string and radix\n function bnpFromString(s,b) {\n var k;\n if(b == 16) k = 4;\n else if(b == 8) k = 3;\n else if(b == 256) k = 8; // byte array\n else if(b == 2) k = 1;\n else if(b == 32) k = 5;\n else if(b == 4) k = 2;\n else { this.fromRadix(s,b); return; }\n this.t = 0;\n this.s = 0;\n var i = s.length, mi = false, sh = 0;\n while(--i >= 0) {\n var x = (k==8)?s[i]&0xff:intAt(s,i);\n if(x < 0) {\n if(s.charAt(i) == \"-\") mi = true;\n continue;\n }\n mi = false;\n if(sh == 0)\n this[this.t++] = x;\n else if(sh+k > this.DB) {\n this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh));\n }\n else\n this[this.t-1] |= x<= this.DB) sh -= this.DB;\n }\n if(k == 8 && (s[0]&0x80) != 0) {\n this.s = -1;\n if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t;\n }\n\n // (public) return string representation in given radix\n function bnToString(b) {\n if(this.s < 0) return \"-\"+this.negate().toString(b);\n var k;\n if(b == 16) k = 4;\n else if(b == 8) k = 3;\n else if(b == 2) k = 1;\n else if(b == 32) k = 5;\n else if(b == 4) k = 2;\n else return this.toRadix(b);\n var km = (1< 0) {\n if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); }\n while(i >= 0) {\n if(p < k) {\n d = (this[i]&((1<>(p+=this.DB-k);\n }\n else {\n d = (this[i]>>(p-=k))&km;\n if(p <= 0) { p += this.DB; --i; }\n }\n if(d > 0) m = true;\n if(m) r += int2char(d);\n }\n }\n return m?r:\"0\";\n }\n\n // (public) -this\n function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; }\n\n // (public) |this|\n function bnAbs() { return (this.s<0)?this.negate():this; }\n\n // (public) return + if this > a, - if this < a, 0 if equal\n function bnCompareTo(a) {\n var r = this.s-a.s;\n if(r != 0) return r;\n var i = this.t;\n r = i-a.t;\n if(r != 0) return (this.s<0)?-r:r;\n while(--i >= 0) if((r=this[i]-a[i]) != 0) return r;\n return 0;\n }\n\n // returns bit length of the integer x\n function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }\n\n // (public) return the number of bits in \"this\"\n function bnBitLength() {\n if(this.t <= 0) return 0;\n return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM));\n }\n\n // (protected) r = this << n*DB\n function bnpDLShiftTo(n,r) {\n var i;\n for(i = this.t-1; i >= 0; --i) r[i+n] = this[i];\n for(i = n-1; i >= 0; --i) r[i] = 0;\n r.t = this.t+n;\n r.s = this.s;\n }\n\n // (protected) r = this >> n*DB\n function bnpDRShiftTo(n,r) {\n for(var i = n; i < this.t; ++i) r[i-n] = this[i];\n r.t = Math.max(this.t-n,0);\n r.s = this.s;\n }\n\n // (protected) r = this << n\n function bnpLShiftTo(n,r) {\n var bs = n%this.DB;\n var cbs = this.DB-bs;\n var bm = (1<= 0; --i) {\n r[i+ds+1] = (this[i]>>cbs)|c;\n c = (this[i]&bm)<= 0; --i) r[i] = 0;\n r[ds] = c;\n r.t = this.t+ds+1;\n r.s = this.s;\n r.clamp();\n }\n\n // (protected) r = this >> n\n function bnpRShiftTo(n,r) {\n r.s = this.s;\n var ds = Math.floor(n/this.DB);\n if(ds >= this.t) { r.t = 0; return; }\n var bs = n%this.DB;\n var cbs = this.DB-bs;\n var bm = (1<>bs;\n for(var i = ds+1; i < this.t; ++i) {\n r[i-ds-1] |= (this[i]&bm)<>bs;\n }\n if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB;\n }\n if(a.t < this.t) {\n c -= a.s;\n while(i < this.t) {\n c += this[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while(i < a.t) {\n c -= a[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c -= a.s;\n }\n r.s = (c<0)?-1:0;\n if(c < -1) r[i++] = this.DV+c;\n else if(c > 0) r[i++] = c;\n r.t = i;\n r.clamp();\n }\n\n // (protected) r = this * a, r != this,a (HAC 14.12)\n // \"this\" should be the larger one if appropriate.\n function bnpMultiplyTo(a,r) {\n var x = this.abs(), y = a.abs();\n var i = x.t;\n r.t = i+y.t;\n while(--i >= 0) r[i] = 0;\n for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t);\n r.s = 0;\n r.clamp();\n if(this.s != a.s) BigInteger.ZERO.subTo(r,r);\n }\n\n // (protected) r = this^2, r != this (HAC 14.16)\n function bnpSquareTo(r) {\n var x = this.abs();\n var i = r.t = 2*x.t;\n while(--i >= 0) r[i] = 0;\n for(i = 0; i < x.t-1; ++i) {\n var c = x.am(i,x[i],r,2*i,0,1);\n if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) {\n r[i+x.t] -= x.DV;\n r[i+x.t+1] = 1;\n }\n }\n if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1);\n r.s = 0;\n r.clamp();\n }\n\n // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n // r != q, this != m. q or r may be null.\n function bnpDivRemTo(m,q,r) {\n var pm = m.abs();\n if(pm.t <= 0) return;\n var pt = this.abs();\n if(pt.t < pm.t) {\n if(q != null) q.fromInt(0);\n if(r != null) this.copyTo(r);\n return;\n }\n if(r == null) r = nbi();\n var y = nbi(), ts = this.s, ms = m.s;\n var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus\n if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); }\n else { pm.copyTo(y); pt.copyTo(r); }\n var ys = y.t;\n var y0 = y[ys-1];\n if(y0 == 0) return;\n var yt = y0*(1<1)?y[ys-2]>>this.F2:0);\n var d1 = this.FV/yt, d2 = (1<= 0) {\n r[r.t++] = 1;\n r.subTo(t,r);\n }\n BigInteger.ONE.dlShiftTo(ys,t);\n t.subTo(y,y); // \"negative\" y so we can replace sub with am later\n while(y.t < ys) y[y.t++] = 0;\n while(--j >= 0) {\n // Estimate quotient digit\n var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);\n if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out\n y.dlShiftTo(j,t);\n r.subTo(t,r);\n while(r[i] < --qd) r.subTo(t,r);\n }\n }\n if(q != null) {\n r.drShiftTo(ys,q);\n if(ts != ms) BigInteger.ZERO.subTo(q,q);\n }\n r.t = ys;\n r.clamp();\n if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder\n if(ts < 0) BigInteger.ZERO.subTo(r,r);\n }\n\n // (public) this mod a\n function bnMod(a) {\n var r = nbi();\n this.abs().divRemTo(a,null,r);\n if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r);\n return r;\n }\n\n // Modular reduction using \"classic\" algorithm\n function Classic(m) { this.m = m; }\n function cConvert(x) {\n if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);\n else return x;\n }\n function cRevert(x) { return x; }\n function cReduce(x) { x.divRemTo(this.m,null,x); }\n function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n Classic.prototype.convert = cConvert;\n Classic.prototype.revert = cRevert;\n Classic.prototype.reduce = cReduce;\n Classic.prototype.mulTo = cMulTo;\n Classic.prototype.sqrTo = cSqrTo;\n\n // (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n // justification:\n // xy == 1 (mod m)\n // xy = 1+km\n // xy(2-xy) = (1+km)(1-km)\n // x[y(2-xy)] = 1-k^2m^2\n // x[y(2-xy)] == 1 (mod m^2)\n // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n // should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n // JS multiply \"overflows\" differently from C/C++, so care is needed here.\n function bnpInvDigit() {\n if(this.t < 1) return 0;\n var x = this[0];\n if((x&1) == 0) return 0;\n var y = x&3; // y == 1/x mod 2^2\n y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4\n y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8\n y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n return (y>0)?this.DV-y:-y;\n }\n\n // Montgomery reduction\n function Montgomery(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp&0x7fff;\n this.mph = this.mp>>15;\n this.um = (1<<(m.DB-15))-1;\n this.mt2 = 2*m.t;\n }\n\n // xR mod m\n function montConvert(x) {\n var r = nbi();\n x.abs().dlShiftTo(this.m.t,r);\n r.divRemTo(this.m,null,r);\n if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r);\n return r;\n }\n\n // x/R mod m\n function montRevert(x) {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n }\n\n // x = x/R mod m (HAC 14.32)\n function montReduce(x) {\n while(x.t <= this.mt2) // pad x so am has enough room later\n x[x.t++] = 0;\n for(var i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n var j = x[i]&0x7fff;\n var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM;\n // use am to combine the multiply-shift-add into one call\n j = i+this.m.t;\n x[j] += this.m.am(0,u0,x,i,0,this.m.t);\n // propagate carry\n while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; }\n }\n x.clamp();\n x.drShiftTo(this.m.t,x);\n if(x.compareTo(this.m) >= 0) x.subTo(this.m,x);\n }\n\n // r = \"x^2/R mod m\"; x != r\n function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n // r = \"xy/R mod m\"; x,y != r\n function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n\n Montgomery.prototype.convert = montConvert;\n Montgomery.prototype.revert = montRevert;\n Montgomery.prototype.reduce = montReduce;\n Montgomery.prototype.mulTo = montMulTo;\n Montgomery.prototype.sqrTo = montSqrTo;\n\n // (protected) true iff this is even\n function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; }\n\n // (protected) this^e, e < 2^32, doing sqr and mul with \"r\" (HAC 14.79)\n function bnpExp(e,z) {\n if(e > 0xffffffff || e < 1) return BigInteger.ONE;\n var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1;\n g.copyTo(r);\n while(--i >= 0) {\n z.sqrTo(r,r2);\n if((e&(1< 0) z.mulTo(r2,g,r);\n else { var t = r; r = r2; r2 = t; }\n }\n return z.revert(r);\n }\n\n // (public) this^e % m, 0 <= e < 2^32\n function bnModPowInt(e,m) {\n var z;\n if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m);\n return this.exp(e,z);\n }\n\n // protected\n BigInteger.prototype.copyTo = bnpCopyTo;\n BigInteger.prototype.fromInt = bnpFromInt;\n BigInteger.prototype.fromString = bnpFromString;\n BigInteger.prototype.clamp = bnpClamp;\n BigInteger.prototype.dlShiftTo = bnpDLShiftTo;\n BigInteger.prototype.drShiftTo = bnpDRShiftTo;\n BigInteger.prototype.lShiftTo = bnpLShiftTo;\n BigInteger.prototype.rShiftTo = bnpRShiftTo;\n BigInteger.prototype.subTo = bnpSubTo;\n BigInteger.prototype.multiplyTo = bnpMultiplyTo;\n BigInteger.prototype.squareTo = bnpSquareTo;\n BigInteger.prototype.divRemTo = bnpDivRemTo;\n BigInteger.prototype.invDigit = bnpInvDigit;\n BigInteger.prototype.isEven = bnpIsEven;\n BigInteger.prototype.exp = bnpExp;\n\n // public\n BigInteger.prototype.toString = bnToString;\n BigInteger.prototype.negate = bnNegate;\n BigInteger.prototype.abs = bnAbs;\n BigInteger.prototype.compareTo = bnCompareTo;\n BigInteger.prototype.bitLength = bnBitLength;\n BigInteger.prototype.mod = bnMod;\n BigInteger.prototype.modPowInt = bnModPowInt;\n\n // \"constants\"\n BigInteger.ZERO = nbv(0);\n BigInteger.ONE = nbv(1);\n\n // Copyright (c) 2005-2009 Tom Wu\n // All Rights Reserved.\n // See \"LICENSE\" for details.\n\n // Extended JavaScript BN functions, required for RSA private ops.\n\n // Version 1.1: new BigInteger(\"0\", 10) returns \"proper\" zero\n // Version 1.2: square() API, isProbablePrime fix\n\n // (public)\n function bnClone() { var r = nbi(); this.copyTo(r); return r; }\n\n // (public) return value as integer\n function bnIntValue() {\n if(this.s < 0) {\n if(this.t == 1) return this[0]-this.DV;\n else if(this.t == 0) return -1;\n }\n else if(this.t == 1) return this[0];\n else if(this.t == 0) return 0;\n // assumes 16 < DB < 32\n return ((this[1]&((1<<(32-this.DB))-1))<>24; }\n\n // (public) return value as short (assumes DB>=16)\n function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; }\n\n // (protected) return x s.t. r^x < DV\n function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); }\n\n // (public) 0 if this == 0, 1 if this > 0\n function bnSigNum() {\n if(this.s < 0) return -1;\n else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0;\n else return 1;\n }\n\n // (protected) convert to radix string\n function bnpToRadix(b) {\n if(b == null) b = 10;\n if(this.signum() == 0 || b < 2 || b > 36) return \"0\";\n var cs = this.chunkSize(b);\n var a = Math.pow(b,cs);\n var d = nbv(a), y = nbi(), z = nbi(), r = \"\";\n this.divRemTo(d,y,z);\n while(y.signum() > 0) {\n r = (a+z.intValue()).toString(b).substr(1) + r;\n y.divRemTo(d,y,z);\n }\n return z.intValue().toString(b) + r;\n }\n\n // (protected) convert from radix string\n function bnpFromRadix(s,b) {\n this.fromInt(0);\n if(b == null) b = 10;\n var cs = this.chunkSize(b);\n var d = Math.pow(b,cs), mi = false, j = 0, w = 0;\n for(var i = 0; i < s.length; ++i) {\n var x = intAt(s,i);\n if(x < 0) {\n if(s.charAt(i) == \"-\" && this.signum() == 0) mi = true;\n continue;\n }\n w = b*w+x;\n if(++j >= cs) {\n this.dMultiply(d);\n this.dAddOffset(w,0);\n j = 0;\n w = 0;\n }\n }\n if(j > 0) {\n this.dMultiply(Math.pow(b,j));\n this.dAddOffset(w,0);\n }\n if(mi) BigInteger.ZERO.subTo(this,this);\n }\n\n // (protected) alternate constructor\n function bnpFromNumber(a,b,c) {\n if(\"number\" == typeof b) {\n // new BigInteger(int,int,RNG)\n if(a < 2) this.fromInt(1);\n else {\n this.fromNumber(a,c);\n if(!this.testBit(a-1))\t// force MSB set\n this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);\n if(this.isEven()) this.dAddOffset(1,0); // force odd\n while(!this.isProbablePrime(b)) {\n this.dAddOffset(2,0);\n if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this);\n }\n }\n }\n else {\n // new BigInteger(int,RNG)\n var x = new Array(), t = a&7;\n x.length = (a>>3)+1;\n b.nextBytes(x);\n if(t > 0) x[0] &= ((1< 0) {\n if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p)\n r[k++] = d|(this.s<<(this.DB-p));\n while(i >= 0) {\n if(p < 8) {\n d = (this[i]&((1<>(p+=this.DB-8);\n }\n else {\n d = (this[i]>>(p-=8))&0xff;\n if(p <= 0) { p += this.DB; --i; }\n }\n if((d&0x80) != 0) d |= -256;\n if(k == 0 && (this.s&0x80) != (d&0x80)) ++k;\n if(k > 0 || d != this.s) r[k++] = d;\n }\n }\n return r;\n }\n\n function bnEquals(a) { return(this.compareTo(a)==0); }\n function bnMin(a) { return(this.compareTo(a)<0)?this:a; }\n function bnMax(a) { return(this.compareTo(a)>0)?this:a; }\n\n // (protected) r = this op a (bitwise)\n function bnpBitwiseTo(a,op,r) {\n var i, f, m = Math.min(a.t,this.t);\n for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]);\n if(a.t < this.t) {\n f = a.s&this.DM;\n for(i = m; i < this.t; ++i) r[i] = op(this[i],f);\n r.t = this.t;\n }\n else {\n f = this.s&this.DM;\n for(i = m; i < a.t; ++i) r[i] = op(f,a[i]);\n r.t = a.t;\n }\n r.s = op(this.s,a.s);\n r.clamp();\n }\n\n // (public) this & a\n function op_and(x,y) { return x&y; }\n function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; }\n\n // (public) this | a\n function op_or(x,y) { return x|y; }\n function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; }\n\n // (public) this ^ a\n function op_xor(x,y) { return x^y; }\n function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; }\n\n // (public) this & ~a\n function op_andnot(x,y) { return x&~y; }\n function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; }\n\n // (public) ~this\n function bnNot() {\n var r = nbi();\n for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i];\n r.t = this.t;\n r.s = ~this.s;\n return r;\n }\n\n // (public) this << n\n function bnShiftLeft(n) {\n var r = nbi();\n if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r);\n return r;\n }\n\n // (public) this >> n\n function bnShiftRight(n) {\n var r = nbi();\n if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r);\n return r;\n }\n\n // return index of lowest 1-bit in x, x < 2^31\n function lbit(x) {\n if(x == 0) return -1;\n var r = 0;\n if((x&0xffff) == 0) { x >>= 16; r += 16; }\n if((x&0xff) == 0) { x >>= 8; r += 8; }\n if((x&0xf) == 0) { x >>= 4; r += 4; }\n if((x&3) == 0) { x >>= 2; r += 2; }\n if((x&1) == 0) ++r;\n return r;\n }\n\n // (public) returns index of lowest 1-bit (or -1 if none)\n function bnGetLowestSetBit() {\n for(var i = 0; i < this.t; ++i)\n if(this[i] != 0) return i*this.DB+lbit(this[i]);\n if(this.s < 0) return this.t*this.DB;\n return -1;\n }\n\n // return number of 1 bits in x\n function cbit(x) {\n var r = 0;\n while(x != 0) { x &= x-1; ++r; }\n return r;\n }\n\n // (public) return number of set bits\n function bnBitCount() {\n var r = 0, x = this.s&this.DM;\n for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x);\n return r;\n }\n\n // (public) true iff nth bit is set\n function bnTestBit(n) {\n var j = Math.floor(n/this.DB);\n if(j >= this.t) return(this.s!=0);\n return((this[j]&(1<<(n%this.DB)))!=0);\n }\n\n // (protected) this op (1<>= this.DB;\n }\n if(a.t < this.t) {\n c += a.s;\n while(i < this.t) {\n c += this[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while(i < a.t) {\n c += a[i];\n r[i++] = c&this.DM;\n c >>= this.DB;\n }\n c += a.s;\n }\n r.s = (c<0)?-1:0;\n if(c > 0) r[i++] = c;\n else if(c < -1) r[i++] = this.DV+c;\n r.t = i;\n r.clamp();\n }\n\n // (public) this + a\n function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; }\n\n // (public) this - a\n function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; }\n\n // (public) this * a\n function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; }\n\n // (public) this^2\n function bnSquare() { var r = nbi(); this.squareTo(r); return r; }\n\n // (public) this / a\n function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }\n\n // (public) this % a\n function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; }\n\n // (public) [this/a,this%a]\n function bnDivideAndRemainder(a) {\n var q = nbi(), r = nbi();\n this.divRemTo(a,q,r);\n return new Array(q,r);\n }\n\n // (protected) this *= n, this >= 0, 1 < n < DV\n function bnpDMultiply(n) {\n this[this.t] = this.am(0,n-1,this,0,0,this.t);\n ++this.t;\n this.clamp();\n }\n\n // (protected) this += n << w words, this >= 0\n function bnpDAddOffset(n,w) {\n if(n == 0) return;\n while(this.t <= w) this[this.t++] = 0;\n this[w] += n;\n while(this[w] >= this.DV) {\n this[w] -= this.DV;\n if(++w >= this.t) this[this.t++] = 0;\n ++this[w];\n }\n }\n\n // A \"null\" reducer\n function NullExp() {}\n function nNop(x) { return x; }\n function nMulTo(x,y,r) { x.multiplyTo(y,r); }\n function nSqrTo(x,r) { x.squareTo(r); }\n\n NullExp.prototype.convert = nNop;\n NullExp.prototype.revert = nNop;\n NullExp.prototype.mulTo = nMulTo;\n NullExp.prototype.sqrTo = nSqrTo;\n\n // (public) this^e\n function bnPow(e) { return this.exp(e,new NullExp()); }\n\n // (protected) r = lower n words of \"this * a\", a.t <= n\n // \"this\" should be the larger one if appropriate.\n function bnpMultiplyLowerTo(a,n,r) {\n var i = Math.min(this.t+a.t,n);\n r.s = 0; // assumes a,this >= 0\n r.t = i;\n while(i > 0) r[--i] = 0;\n var j;\n for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t);\n for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i);\n r.clamp();\n }\n\n // (protected) r = \"this * a\" without lower n words, n > 0\n // \"this\" should be the larger one if appropriate.\n function bnpMultiplyUpperTo(a,n,r) {\n --n;\n var i = r.t = this.t+a.t-n;\n r.s = 0; // assumes a,this >= 0\n while(--i >= 0) r[i] = 0;\n for(i = Math.max(n-this.t,0); i < a.t; ++i)\n r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n);\n r.clamp();\n r.drShiftTo(1,r);\n }\n\n // Barrett modular reduction\n function Barrett(m) {\n // setup Barrett\n this.r2 = nbi();\n this.q3 = nbi();\n BigInteger.ONE.dlShiftTo(2*m.t,this.r2);\n this.mu = this.r2.divide(m);\n this.m = m;\n }\n\n function barrettConvert(x) {\n if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m);\n else if(x.compareTo(this.m) < 0) return x;\n else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; }\n }\n\n function barrettRevert(x) { return x; }\n\n // x = x mod m (HAC 14.42)\n function barrettReduce(x) {\n x.drShiftTo(this.m.t-1,this.r2);\n if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); }\n this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);\n this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);\n while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1);\n x.subTo(this.r2,x);\n while(x.compareTo(this.m) >= 0) x.subTo(this.m,x);\n }\n\n // r = x^2 mod m; x != r\n function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); }\n\n // r = x*y mod m; x,y != r\n function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }\n\n Barrett.prototype.convert = barrettConvert;\n Barrett.prototype.revert = barrettRevert;\n Barrett.prototype.reduce = barrettReduce;\n Barrett.prototype.mulTo = barrettMulTo;\n Barrett.prototype.sqrTo = barrettSqrTo;\n\n // (public) this^e % m (HAC 14.85)\n function bnModPow(e,m) {\n var i = e.bitLength(), k, r = nbv(1), z;\n if(i <= 0) return r;\n else if(i < 18) k = 1;\n else if(i < 48) k = 3;\n else if(i < 144) k = 4;\n else if(i < 768) k = 5;\n else k = 6;\n if(i < 8)\n z = new Classic(m);\n else if(m.isEven())\n z = new Barrett(m);\n else\n z = new Montgomery(m);\n\n // precomputation\n var g = new Array(), n = 3, k1 = k-1, km = (1< 1) {\n var g2 = nbi();\n z.sqrTo(g[1],g2);\n while(n <= km) {\n g[n] = nbi();\n z.mulTo(g2,g[n-2],g[n]);\n n += 2;\n }\n }\n\n var j = e.t-1, w, is1 = true, r2 = nbi(), t;\n i = nbits(e[j])-1;\n while(j >= 0) {\n if(i >= k1) w = (e[j]>>(i-k1))&km;\n else {\n w = (e[j]&((1<<(i+1))-1))<<(k1-i);\n if(j > 0) w |= e[j-1]>>(this.DB+i-k1);\n }\n\n n = k;\n while((w&1) == 0) { w >>= 1; --n; }\n if((i -= n) < 0) { i += this.DB; --j; }\n if(is1) {\t// ret == 1, don't bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n }\n else {\n while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; }\n if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; }\n z.mulTo(r2,g[w],r);\n }\n\n while(j >= 0 && (e[j]&(1< 0) {\n x.rShiftTo(g,x);\n y.rShiftTo(g,y);\n }\n while(x.signum() > 0) {\n if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x);\n if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y);\n if(x.compareTo(y) >= 0) {\n x.subTo(y,x);\n x.rShiftTo(1,x);\n }\n else {\n y.subTo(x,y);\n y.rShiftTo(1,y);\n }\n }\n if(g > 0) y.lShiftTo(g,y);\n return y;\n }\n\n // (protected) this % n, n < 2^26\n function bnpModInt(n) {\n if(n <= 0) return 0;\n var d = this.DV%n, r = (this.s<0)?n-1:0;\n if(this.t > 0)\n if(d == 0) r = this[0]%n;\n else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n;\n return r;\n }\n\n // (public) 1/this % m (HAC 14.61)\n function bnModInverse(m) {\n var ac = m.isEven();\n if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;\n var u = m.clone(), v = this.clone();\n var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1);\n while(u.signum() != 0) {\n while(u.isEven()) {\n u.rShiftTo(1,u);\n if(ac) {\n if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); }\n a.rShiftTo(1,a);\n }\n else if(!b.isEven()) b.subTo(m,b);\n b.rShiftTo(1,b);\n }\n while(v.isEven()) {\n v.rShiftTo(1,v);\n if(ac) {\n if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); }\n c.rShiftTo(1,c);\n }\n else if(!d.isEven()) d.subTo(m,d);\n d.rShiftTo(1,d);\n }\n if(u.compareTo(v) >= 0) {\n u.subTo(v,u);\n if(ac) a.subTo(c,a);\n b.subTo(d,b);\n }\n else {\n v.subTo(u,v);\n if(ac) c.subTo(a,c);\n d.subTo(b,d);\n }\n }\n if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;\n if(d.compareTo(m) >= 0) return d.subtract(m);\n if(d.signum() < 0) d.addTo(m,d); else return d;\n if(d.signum() < 0) return d.add(m); else return d;\n }\n\n var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];\n var lplim = (1<<26)/lowprimes[lowprimes.length-1];\n\n // (public) test primality with certainty >= 1-.5^t\n function bnIsProbablePrime(t) {\n var i, x = this.abs();\n if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) {\n for(i = 0; i < lowprimes.length; ++i)\n if(x[0] == lowprimes[i]) return true;\n return false;\n }\n if(x.isEven()) return false;\n i = 1;\n while(i < lowprimes.length) {\n var m = lowprimes[i], j = i+1;\n while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];\n m = x.modInt(m);\n while(i < j) if(m%lowprimes[i++] == 0) return false;\n }\n return x.millerRabin(t);\n }\n\n // (protected) true if probably prime (HAC 4.24, Miller-Rabin)\n function bnpMillerRabin(t) {\n var n1 = this.subtract(BigInteger.ONE);\n var k = n1.getLowestSetBit();\n if(k <= 0) return false;\n var r = n1.shiftRight(k);\n t = (t+1)>>1;\n if(t > lowprimes.length) t = lowprimes.length;\n var a = nbi();\n for(var i = 0; i < t; ++i) {\n //Pick bases at random, instead of starting at 2\n a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);\n var y = a.modPow(r,this);\n if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {\n var j = 1;\n while(j++ < k && y.compareTo(n1) != 0) {\n y = y.modPowInt(2,this);\n if(y.compareTo(BigInteger.ONE) == 0) return false;\n }\n if(y.compareTo(n1) != 0) return false;\n }\n }\n return true;\n }\n\n // protected\n BigInteger.prototype.chunkSize = bnpChunkSize;\n BigInteger.prototype.toRadix = bnpToRadix;\n BigInteger.prototype.fromRadix = bnpFromRadix;\n BigInteger.prototype.fromNumber = bnpFromNumber;\n BigInteger.prototype.bitwiseTo = bnpBitwiseTo;\n BigInteger.prototype.changeBit = bnpChangeBit;\n BigInteger.prototype.addTo = bnpAddTo;\n BigInteger.prototype.dMultiply = bnpDMultiply;\n BigInteger.prototype.dAddOffset = bnpDAddOffset;\n BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;\n BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;\n BigInteger.prototype.modInt = bnpModInt;\n BigInteger.prototype.millerRabin = bnpMillerRabin;\n\n // public\n BigInteger.prototype.clone = bnClone;\n BigInteger.prototype.intValue = bnIntValue;\n BigInteger.prototype.byteValue = bnByteValue;\n BigInteger.prototype.shortValue = bnShortValue;\n BigInteger.prototype.signum = bnSigNum;\n BigInteger.prototype.toByteArray = bnToByteArray;\n BigInteger.prototype.equals = bnEquals;\n BigInteger.prototype.min = bnMin;\n BigInteger.prototype.max = bnMax;\n BigInteger.prototype.and = bnAnd;\n BigInteger.prototype.or = bnOr;\n BigInteger.prototype.xor = bnXor;\n BigInteger.prototype.andNot = bnAndNot;\n BigInteger.prototype.not = bnNot;\n BigInteger.prototype.shiftLeft = bnShiftLeft;\n BigInteger.prototype.shiftRight = bnShiftRight;\n BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;\n BigInteger.prototype.bitCount = bnBitCount;\n BigInteger.prototype.testBit = bnTestBit;\n BigInteger.prototype.setBit = bnSetBit;\n BigInteger.prototype.clearBit = bnClearBit;\n BigInteger.prototype.flipBit = bnFlipBit;\n BigInteger.prototype.add = bnAdd;\n BigInteger.prototype.subtract = bnSubtract;\n BigInteger.prototype.multiply = bnMultiply;\n BigInteger.prototype.divide = bnDivide;\n BigInteger.prototype.remainder = bnRemainder;\n BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;\n BigInteger.prototype.modPow = bnModPow;\n BigInteger.prototype.modInverse = bnModInverse;\n BigInteger.prototype.pow = bnPow;\n BigInteger.prototype.gcd = bnGCD;\n BigInteger.prototype.isProbablePrime = bnIsProbablePrime;\n\n // JSBN-specific extension\n BigInteger.prototype.square = bnSquare;\n\n // Expose the Barrett function\n BigInteger.prototype.Barrett = Barrett\n\n // BigInteger interfaces not implemented in jsbn:\n\n // BigInteger(int signum, byte[] magnitude)\n // double doubleValue()\n // float floatValue()\n // int hashCode()\n // long longValue()\n // static BigInteger valueOf(long val)\n\n\t// Random number generator - requires a PRNG backend, e.g. prng4.js\n\n\t// For best results, put code like\n\t// \n\t// in your main HTML document.\n\n\tvar rng_state;\n\tvar rng_pool;\n\tvar rng_pptr;\n\n\t// Mix in a 32-bit integer into the pool\n\tfunction rng_seed_int(x) {\n\t rng_pool[rng_pptr++] ^= x & 255;\n\t rng_pool[rng_pptr++] ^= (x >> 8) & 255;\n\t rng_pool[rng_pptr++] ^= (x >> 16) & 255;\n\t rng_pool[rng_pptr++] ^= (x >> 24) & 255;\n\t if(rng_pptr >= rng_psize) rng_pptr -= rng_psize;\n\t}\n\n\t// Mix in the current time (w/milliseconds) into the pool\n\tfunction rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}\n\n\t// Initialize the pool with junk if needed.\n\tif(rng_pool == null) {\n\t rng_pool = new Array();\n\t rng_pptr = 0;\n\t var t;\n\t if(typeof window !== \"undefined\" && window.crypto) {\n\t\tif (window.crypto.getRandomValues) {\n\t\t // Use webcrypto if available\n\t\t var ua = new Uint8Array(32);\n\t\t window.crypto.getRandomValues(ua);\n\t\t for(t = 0; t < 32; ++t)\n\t\t\trng_pool[rng_pptr++] = ua[t];\n\t\t}\n\t\telse if(navigator.appName == \"Netscape\" && navigator.appVersion < \"5\") {\n\t\t // Extract entropy (256 bits) from NS4 RNG if available\n\t\t var z = window.crypto.random(32);\n\t\t for(t = 0; t < z.length; ++t)\n\t\t\trng_pool[rng_pptr++] = z.charCodeAt(t) & 255;\n\t\t}\n\t }\n\t while(rng_pptr < rng_psize) { // extract some randomness from Math.random()\n\t\tt = Math.floor(65536 * Math.random());\n\t\trng_pool[rng_pptr++] = t >>> 8;\n\t\trng_pool[rng_pptr++] = t & 255;\n\t }\n\t rng_pptr = 0;\n\t rng_seed_time();\n\t //rng_seed_int(window.screenX);\n\t //rng_seed_int(window.screenY);\n\t}\n\n\tfunction rng_get_byte() {\n\t if(rng_state == null) {\n\t\trng_seed_time();\n\t\trng_state = prng_newstate();\n\t\trng_state.init(rng_pool);\n\t\tfor(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr)\n\t\t rng_pool[rng_pptr] = 0;\n\t\trng_pptr = 0;\n\t\t//rng_pool = null;\n\t }\n\t // TODO: allow reseeding after first request\n\t return rng_state.next();\n\t}\n\n\tfunction rng_get_bytes(ba) {\n\t var i;\n\t for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte();\n\t}\n\n\tfunction SecureRandom() {}\n\n\tSecureRandom.prototype.nextBytes = rng_get_bytes;\n\n\t// prng4.js - uses Arcfour as a PRNG\n\n\tfunction Arcfour() {\n\t this.i = 0;\n\t this.j = 0;\n\t this.S = new Array();\n\t}\n\n\t// Initialize arcfour context from key, an array of ints, each from [0..255]\n\tfunction ARC4init(key) {\n\t var i, j, t;\n\t for(i = 0; i < 256; ++i)\n\t\tthis.S[i] = i;\n\t j = 0;\n\t for(i = 0; i < 256; ++i) {\n\t\tj = (j + this.S[i] + key[i % key.length]) & 255;\n\t\tt = this.S[i];\n\t\tthis.S[i] = this.S[j];\n\t\tthis.S[j] = t;\n\t }\n\t this.i = 0;\n\t this.j = 0;\n\t}\n\n\tfunction ARC4next() {\n\t var t;\n\t this.i = (this.i + 1) & 255;\n\t this.j = (this.j + this.S[this.i]) & 255;\n\t t = this.S[this.i];\n\t this.S[this.i] = this.S[this.j];\n\t this.S[this.j] = t;\n\t return this.S[(t + this.S[this.i]) & 255];\n\t}\n\n\tArcfour.prototype.init = ARC4init;\n\tArcfour.prototype.next = ARC4next;\n\n\t// Plug in your RNG constructor here\n\tfunction prng_newstate() {\n\t return new Arcfour();\n\t}\n\n\t// Pool size must be a multiple of 4 and greater than 32.\n\t// An array of bytes the size of the pool will be passed to init()\n\tvar rng_psize = 256;\n\n BigInteger.SecureRandom = SecureRandom;\n BigInteger.BigInteger = BigInteger;\n if (typeof exports !== 'undefined') {\n exports = module.exports = BigInteger;\n } else {\n this.BigInteger = BigInteger;\n this.SecureRandom = SecureRandom;\n }\n\n}).call(this);\n","\"use strict\";\nconst path = require(\"path\");\nconst fs = require(\"fs\").promises;\nconst vm = require(\"vm\");\nconst toughCookie = require(\"tough-cookie\");\nconst sniffHTMLEncoding = require(\"html-encoding-sniffer\");\nconst whatwgURL = require(\"whatwg-url\");\nconst whatwgEncoding = require(\"whatwg-encoding\");\nconst { URL } = require(\"whatwg-url\");\nconst MIMEType = require(\"whatwg-mimetype\");\nconst idlUtils = require(\"./jsdom/living/generated/utils.js\");\nconst VirtualConsole = require(\"./jsdom/virtual-console.js\");\nconst { createWindow } = require(\"./jsdom/browser/Window.js\");\nconst { parseIntoDocument } = require(\"./jsdom/browser/parser\");\nconst { fragmentSerialization } = require(\"./jsdom/living/domparsing/serialization.js\");\nconst ResourceLoader = require(\"./jsdom/browser/resources/resource-loader.js\");\nconst NoOpResourceLoader = require(\"./jsdom/browser/resources/no-op-resource-loader.js\");\n\nclass CookieJar extends toughCookie.CookieJar {\n constructor(store, options) {\n // jsdom cookie jars must be loose by default\n super(store, { looseMode: true, ...options });\n }\n}\n\nconst window = Symbol(\"window\");\nlet sharedFragmentDocument = null;\n\nclass JSDOM {\n constructor(input = \"\", options = {}) {\n const mimeType = new MIMEType(options.contentType === undefined ? \"text/html\" : options.contentType);\n const { html, encoding } = normalizeHTML(input, mimeType);\n\n options = transformOptions(options, encoding, mimeType);\n\n this[window] = createWindow(options.windowOptions);\n\n const documentImpl = idlUtils.implForWrapper(this[window]._document);\n\n options.beforeParse(this[window]._globalProxy);\n\n parseIntoDocument(html, documentImpl);\n\n documentImpl.close();\n }\n\n get window() {\n // It's important to grab the global proxy, instead of just the result of `createWindow(...)`, since otherwise\n // things like `window.eval` don't exist.\n return this[window]._globalProxy;\n }\n\n get virtualConsole() {\n return this[window]._virtualConsole;\n }\n\n get cookieJar() {\n // TODO NEWAPI move _cookieJar to window probably\n return idlUtils.implForWrapper(this[window]._document)._cookieJar;\n }\n\n serialize() {\n return fragmentSerialization(idlUtils.implForWrapper(this[window]._document), { requireWellFormed: false });\n }\n\n nodeLocation(node) {\n if (!idlUtils.implForWrapper(this[window]._document)._parseOptions.sourceCodeLocationInfo) {\n throw new Error(\"Location information was not saved for this jsdom. Use includeNodeLocations during creation.\");\n }\n\n return idlUtils.implForWrapper(node).sourceCodeLocation;\n }\n\n getInternalVMContext() {\n if (!vm.isContext(this[window])) {\n throw new TypeError(\"This jsdom was not configured to allow script running. \" +\n \"Use the runScripts option during creation.\");\n }\n\n return this[window];\n }\n\n reconfigure(settings) {\n if (\"windowTop\" in settings) {\n this[window]._top = settings.windowTop;\n }\n\n if (\"url\" in settings) {\n const document = idlUtils.implForWrapper(this[window]._document);\n\n const url = whatwgURL.parseURL(settings.url);\n if (url === null) {\n throw new TypeError(`Could not parse \"${settings.url}\" as a URL`);\n }\n\n document._URL = url;\n document._origin = whatwgURL.serializeURLOrigin(document._URL);\n }\n }\n\n static fragment(string = \"\") {\n if (!sharedFragmentDocument) {\n sharedFragmentDocument = (new JSDOM()).window.document;\n }\n\n const template = sharedFragmentDocument.createElement(\"template\");\n template.innerHTML = string;\n return template.content;\n }\n\n static fromURL(url, options = {}) {\n return Promise.resolve().then(() => {\n // Remove the hash while sending this through the research loader fetch().\n // It gets added back a few lines down when constructing the JSDOM object.\n const parsedURL = new URL(url);\n const originalHash = parsedURL.hash;\n parsedURL.hash = \"\";\n url = parsedURL.href;\n\n options = normalizeFromURLOptions(options);\n\n const resourceLoader = resourcesToResourceLoader(options.resources);\n const resourceLoaderForInitialRequest = resourceLoader.constructor === NoOpResourceLoader ?\n new ResourceLoader() :\n resourceLoader;\n\n const req = resourceLoaderForInitialRequest.fetch(url, {\n accept: \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\",\n cookieJar: options.cookieJar,\n referrer: options.referrer\n });\n\n return req.then(body => {\n const res = req.response;\n\n options = Object.assign(options, {\n url: req.href + originalHash,\n contentType: res.headers[\"content-type\"],\n referrer: req.getHeader(\"referer\")\n });\n\n return new JSDOM(body, options);\n });\n });\n }\n\n static async fromFile(filename, options = {}) {\n options = normalizeFromFileOptions(filename, options);\n const buffer = await fs.readFile(filename);\n\n return new JSDOM(buffer, options);\n }\n}\n\nfunction normalizeFromURLOptions(options) {\n // Checks on options that are invalid for `fromURL`\n if (options.url !== undefined) {\n throw new TypeError(\"Cannot supply a url option when using fromURL\");\n }\n if (options.contentType !== undefined) {\n throw new TypeError(\"Cannot supply a contentType option when using fromURL\");\n }\n\n // Normalization of options which must be done before the rest of the fromURL code can use them, because they are\n // given to request()\n const normalized = { ...options };\n\n if (options.referrer !== undefined) {\n normalized.referrer = (new URL(options.referrer)).href;\n }\n\n if (options.cookieJar === undefined) {\n normalized.cookieJar = new CookieJar();\n }\n\n return normalized;\n\n // All other options don't need to be processed yet, and can be taken care of in the normal course of things when\n // `fromURL` calls `new JSDOM(html, options)`.\n}\n\nfunction normalizeFromFileOptions(filename, options) {\n const normalized = { ...options };\n\n if (normalized.contentType === undefined) {\n const extname = path.extname(filename);\n if (extname === \".xhtml\" || extname === \".xht\" || extname === \".xml\") {\n normalized.contentType = \"application/xhtml+xml\";\n }\n }\n\n if (normalized.url === undefined) {\n normalized.url = new URL(\"file:\" + path.resolve(filename));\n }\n\n return normalized;\n}\n\nfunction transformOptions(options, encoding, mimeType) {\n const transformed = {\n windowOptions: {\n // Defaults\n url: \"about:blank\",\n referrer: \"\",\n contentType: \"text/html\",\n parsingMode: \"html\",\n parseOptions: {\n sourceCodeLocationInfo: false,\n scriptingEnabled: false\n },\n runScripts: undefined,\n encoding,\n pretendToBeVisual: false,\n storageQuota: 5000000,\n\n // Defaults filled in later\n resourceLoader: undefined,\n virtualConsole: undefined,\n cookieJar: undefined\n },\n\n // Defaults\n beforeParse() { }\n };\n\n // options.contentType was parsed into mimeType by the caller.\n if (!mimeType.isHTML() && !mimeType.isXML()) {\n throw new RangeError(`The given content type of \"${options.contentType}\" was not a HTML or XML content type`);\n }\n\n transformed.windowOptions.contentType = mimeType.essence;\n transformed.windowOptions.parsingMode = mimeType.isHTML() ? \"html\" : \"xml\";\n\n if (options.url !== undefined) {\n transformed.windowOptions.url = (new URL(options.url)).href;\n }\n\n if (options.referrer !== undefined) {\n transformed.windowOptions.referrer = (new URL(options.referrer)).href;\n }\n\n if (options.includeNodeLocations) {\n if (transformed.windowOptions.parsingMode === \"xml\") {\n throw new TypeError(\"Cannot set includeNodeLocations to true with an XML content type\");\n }\n\n transformed.windowOptions.parseOptions = { sourceCodeLocationInfo: true };\n }\n\n transformed.windowOptions.cookieJar = options.cookieJar === undefined ?\n new CookieJar() :\n options.cookieJar;\n\n transformed.windowOptions.virtualConsole = options.virtualConsole === undefined ?\n (new VirtualConsole()).sendTo(console) :\n options.virtualConsole;\n\n if (!(transformed.windowOptions.virtualConsole instanceof VirtualConsole)) {\n throw new TypeError(\"virtualConsole must be an instance of VirtualConsole\");\n }\n\n transformed.windowOptions.resourceLoader = resourcesToResourceLoader(options.resources);\n\n if (options.runScripts !== undefined) {\n transformed.windowOptions.runScripts = String(options.runScripts);\n if (transformed.windowOptions.runScripts === \"dangerously\") {\n transformed.windowOptions.parseOptions.scriptingEnabled = true;\n } else if (transformed.windowOptions.runScripts !== \"outside-only\") {\n throw new RangeError(`runScripts must be undefined, \"dangerously\", or \"outside-only\"`);\n }\n }\n\n if (options.beforeParse !== undefined) {\n transformed.beforeParse = options.beforeParse;\n }\n\n if (options.pretendToBeVisual !== undefined) {\n transformed.windowOptions.pretendToBeVisual = Boolean(options.pretendToBeVisual);\n }\n\n if (options.storageQuota !== undefined) {\n transformed.windowOptions.storageQuota = Number(options.storageQuota);\n }\n\n return transformed;\n}\n\nfunction normalizeHTML(html, mimeType) {\n let encoding = \"UTF-8\";\n\n if (ArrayBuffer.isView(html)) {\n html = Buffer.from(html.buffer, html.byteOffset, html.byteLength);\n } else if (html instanceof ArrayBuffer) {\n html = Buffer.from(html);\n }\n\n if (Buffer.isBuffer(html)) {\n encoding = sniffHTMLEncoding(html, {\n defaultEncoding: mimeType.isXML() ? \"UTF-8\" : \"windows-1252\",\n transportLayerEncodingLabel: mimeType.parameters.get(\"charset\")\n });\n html = whatwgEncoding.decode(html, encoding);\n } else {\n html = String(html);\n }\n\n return { html, encoding };\n}\n\nfunction resourcesToResourceLoader(resources) {\n switch (resources) {\n case undefined: {\n return new NoOpResourceLoader();\n }\n case \"usable\": {\n return new ResourceLoader();\n }\n default: {\n if (!(resources instanceof ResourceLoader)) {\n throw new TypeError(\"resources must be an instance of ResourceLoader\");\n }\n return resources;\n }\n }\n}\n\nexports.JSDOM = JSDOM;\n\nexports.VirtualConsole = VirtualConsole;\nexports.CookieJar = CookieJar;\nexports.ResourceLoader = ResourceLoader;\n\nexports.toughCookie = toughCookie;\n","\"use strict\";\nconst vm = require(\"vm\");\nconst webIDLConversions = require(\"webidl-conversions\");\nconst { CSSStyleDeclaration } = require(\"cssstyle\");\nconst { Performance: RawPerformance } = require(\"w3c-hr-time\");\nconst notImplemented = require(\"./not-implemented\");\nconst { installInterfaces } = require(\"../living/interfaces\");\nconst { define, mixin } = require(\"../utils\");\nconst Element = require(\"../living/generated/Element\");\nconst EventTarget = require(\"../living/generated/EventTarget\");\nconst EventHandlerNonNull = require(\"../living/generated/EventHandlerNonNull\");\nconst OnBeforeUnloadEventHandlerNonNull = require(\"../living/generated/OnBeforeUnloadEventHandlerNonNull\");\nconst OnErrorEventHandlerNonNull = require(\"../living/generated/OnErrorEventHandlerNonNull\");\nconst PageTransitionEvent = require(\"../living/generated/PageTransitionEvent\");\nconst namedPropertiesWindow = require(\"../living/named-properties-window\");\nconst postMessage = require(\"../living/post-message\");\nconst DOMException = require(\"domexception/webidl2js-wrapper\");\nconst { btoa, atob } = require(\"abab\");\nconst idlUtils = require(\"../living/generated/utils\");\nconst WebSocketImpl = require(\"../living/websockets/WebSocket-impl\").implementation;\nconst BarProp = require(\"../living/generated/BarProp\");\nconst documents = require(\"../living/documents.js\");\nconst External = require(\"../living/generated/External\");\nconst Navigator = require(\"../living/generated/Navigator\");\nconst Performance = require(\"../living/generated/Performance\");\nconst Screen = require(\"../living/generated/Screen\");\nconst Storage = require(\"../living/generated/Storage\");\nconst Selection = require(\"../living/generated/Selection\");\nconst reportException = require(\"../living/helpers/runtime-script-errors\");\nconst { getCurrentEventHandlerValue } = require(\"../living/helpers/create-event-accessor.js\");\nconst { fireAnEvent } = require(\"../living/helpers/events\");\nconst SessionHistory = require(\"../living/window/SessionHistory\");\nconst { forEachMatchingSheetRuleOfElement, getResolvedValue, propertiesWithResolvedValueImplemented,\n SHADOW_DOM_PSEUDO_REGEXP } = require(\"../living/helpers/style-rules.js\");\nconst CustomElementRegistry = require(\"../living/generated/CustomElementRegistry\");\nconst jsGlobals = require(\"./js-globals.json\");\n\nconst GlobalEventHandlersImpl = require(\"../living/nodes/GlobalEventHandlers-impl\").implementation;\nconst WindowEventHandlersImpl = require(\"../living/nodes/WindowEventHandlers-impl\").implementation;\n\nconst events = new Set([\n // GlobalEventHandlers\n \"abort\", \"autocomplete\",\n \"autocompleteerror\", \"blur\",\n \"cancel\", \"canplay\", \"canplaythrough\",\n \"change\", \"click\",\n \"close\", \"contextmenu\",\n \"cuechange\", \"dblclick\",\n \"drag\", \"dragend\",\n \"dragenter\",\n \"dragleave\", \"dragover\",\n \"dragstart\", \"drop\",\n \"durationchange\", \"emptied\",\n \"ended\", \"focus\",\n \"input\", \"invalid\",\n \"keydown\", \"keypress\",\n \"keyup\", \"load\", \"loadeddata\",\n \"loadedmetadata\", \"loadstart\",\n \"mousedown\", \"mouseenter\",\n \"mouseleave\", \"mousemove\",\n \"mouseout\", \"mouseover\",\n \"mouseup\", \"wheel\",\n \"pause\", \"play\",\n \"playing\", \"progress\",\n \"ratechange\", \"reset\",\n \"resize\", \"scroll\",\n \"securitypolicyviolation\",\n \"seeked\", \"seeking\",\n \"select\", \"sort\", \"stalled\",\n \"submit\", \"suspend\",\n \"timeupdate\", \"toggle\",\n \"volumechange\", \"waiting\",\n\n // WindowEventHandlers\n \"afterprint\",\n \"beforeprint\",\n \"hashchange\",\n \"languagechange\",\n \"message\",\n \"messageerror\",\n \"offline\",\n \"online\",\n \"pagehide\",\n \"pageshow\",\n \"popstate\",\n \"rejectionhandled\",\n \"storage\",\n \"unhandledrejection\",\n \"unload\"\n\n // \"error\" and \"beforeunload\" are added separately\n]);\n\nexports.createWindow = function (options) {\n return new Window(options);\n};\n\nconst jsGlobalEntriesToInstall = Object.entries(jsGlobals).filter(([name]) => name in global);\n\n// TODO remove when we drop Node v10 support.\nconst anyNodeVersionQueueMicrotask = typeof queueMicrotask === \"function\" ? queueMicrotask : process.nextTick;\n\n// https://html.spec.whatwg.org/#the-window-object\nfunction setupWindow(windowInstance, { runScripts }) {\n if (runScripts === \"outside-only\" || runScripts === \"dangerously\") {\n contextifyWindow(windowInstance);\n\n // Without this, these globals will only appear to scripts running inside the context using vm.runScript; they will\n // not appear to scripts running from the outside, including to JSDOM implementation code.\n for (const [globalName, globalPropDesc] of jsGlobalEntriesToInstall) {\n const propDesc = { ...globalPropDesc, value: vm.runInContext(globalName, windowInstance) };\n Object.defineProperty(windowInstance, globalName, propDesc);\n }\n } else {\n // Without contextifying the window, none of the globals will exist. So, let's at least alias them from the Node.js\n // context. See https://github.com/jsdom/jsdom/issues/2727 for more background and discussion.\n for (const [globalName, globalPropDesc] of jsGlobalEntriesToInstall) {\n const propDesc = { ...globalPropDesc, value: global[globalName] };\n Object.defineProperty(windowInstance, globalName, propDesc);\n }\n }\n\n installInterfaces(windowInstance, [\"Window\"]);\n\n const EventTargetConstructor = windowInstance.EventTarget;\n\n // eslint-disable-next-line func-name-matching, func-style, no-shadow\n const windowConstructor = function Window() {\n throw new TypeError(\"Illegal constructor\");\n };\n Object.setPrototypeOf(windowConstructor, EventTargetConstructor);\n\n Object.defineProperty(windowInstance, \"Window\", {\n configurable: true,\n writable: true,\n value: windowConstructor\n });\n\n const windowPrototype = Object.create(EventTargetConstructor.prototype);\n Object.defineProperties(windowPrototype, {\n constructor: {\n value: windowConstructor,\n writable: true,\n configurable: true\n },\n [Symbol.toStringTag]: {\n value: \"Window\",\n configurable: true\n }\n });\n\n windowConstructor.prototype = windowPrototype;\n Object.setPrototypeOf(windowInstance, windowPrototype);\n\n EventTarget.setup(windowInstance, windowInstance);\n mixin(windowInstance, WindowEventHandlersImpl.prototype);\n mixin(windowInstance, GlobalEventHandlersImpl.prototype);\n windowInstance._initGlobalEvents();\n\n Object.defineProperty(windowInstance, \"onbeforeunload\", {\n configurable: true,\n enumerable: true,\n get() {\n return idlUtils.tryWrapperForImpl(getCurrentEventHandlerValue(this, \"beforeunload\"));\n },\n set(V) {\n if (!idlUtils.isObject(V)) {\n V = null;\n } else {\n V = OnBeforeUnloadEventHandlerNonNull.convert(V, {\n context: \"Failed to set the 'onbeforeunload' property on 'Window': The provided value\"\n });\n }\n this._setEventHandlerFor(\"beforeunload\", V);\n }\n });\n\n Object.defineProperty(windowInstance, \"onerror\", {\n configurable: true,\n enumerable: true,\n get() {\n return idlUtils.tryWrapperForImpl(getCurrentEventHandlerValue(this, \"error\"));\n },\n set(V) {\n if (!idlUtils.isObject(V)) {\n V = null;\n } else {\n V = OnErrorEventHandlerNonNull.convert(V, {\n context: \"Failed to set the 'onerror' property on 'Window': The provided value\"\n });\n }\n this._setEventHandlerFor(\"error\", V);\n }\n });\n\n for (const event of events) {\n Object.defineProperty(windowInstance, `on${event}`, {\n configurable: true,\n enumerable: true,\n get() {\n return idlUtils.tryWrapperForImpl(getCurrentEventHandlerValue(this, event));\n },\n set(V) {\n if (!idlUtils.isObject(V)) {\n V = null;\n } else {\n V = EventHandlerNonNull.convert(V, {\n context: `Failed to set the 'on${event}' property on 'Window': The provided value`\n });\n }\n this._setEventHandlerFor(event, V);\n }\n });\n }\n\n windowInstance._globalObject = windowInstance;\n}\n\n// NOTE: per https://heycam.github.io/webidl/#Global, all properties on the Window object must be own-properties.\n// That is why we assign everything inside of the constructor, instead of using a shared prototype.\n// You can verify this in e.g. Firefox or Internet Explorer, which do a good job with Web IDL compliance.\nfunction Window(options) {\n setupWindow(this, { runScripts: options.runScripts });\n\n const rawPerformance = new RawPerformance();\n const windowInitialized = rawPerformance.now();\n\n const window = this;\n\n // ### PRIVATE DATA PROPERTIES\n\n this._resourceLoader = options.resourceLoader;\n\n // vm initialization is deferred until script processing is activated\n this._globalProxy = this;\n Object.defineProperty(idlUtils.implForWrapper(this), idlUtils.wrapperSymbol, { get: () => this._globalProxy });\n\n // List options explicitly to be clear which are passed through\n this._document = documents.createWrapper(window, {\n parsingMode: options.parsingMode,\n contentType: options.contentType,\n encoding: options.encoding,\n cookieJar: options.cookieJar,\n url: options.url,\n lastModified: options.lastModified,\n referrer: options.referrer,\n parseOptions: options.parseOptions,\n defaultView: this._globalProxy,\n global: this,\n parentOrigin: options.parentOrigin\n }, { alwaysUseDocumentClass: true });\n\n if (vm.isContext(window)) {\n const documentImpl = idlUtils.implForWrapper(window._document);\n documentImpl._defaultView = window._globalProxy = vm.runInContext(\"this\", window);\n }\n\n const documentOrigin = idlUtils.implForWrapper(this._document)._origin;\n this._origin = documentOrigin;\n\n // https://html.spec.whatwg.org/#session-history\n this._sessionHistory = new SessionHistory({\n document: idlUtils.implForWrapper(this._document),\n url: idlUtils.implForWrapper(this._document)._URL,\n stateObject: null\n }, this);\n\n this._virtualConsole = options.virtualConsole;\n\n this._runScripts = options.runScripts;\n\n // Set up the window as if it's a top level window.\n // If it's not, then references will be corrected by frame/iframe code.\n this._parent = this._top = this._globalProxy;\n this._frameElement = null;\n\n // This implements window.frames.length, since window.frames returns a\n // self reference to the window object. This value is incremented in the\n // HTMLFrameElement implementation.\n this._length = 0;\n\n // https://dom.spec.whatwg.org/#window-current-event\n this._currentEvent = undefined;\n\n this._pretendToBeVisual = options.pretendToBeVisual;\n this._storageQuota = options.storageQuota;\n\n // Some properties (such as localStorage and sessionStorage) share data\n // between windows in the same origin. This object is intended\n // to contain such data.\n if (options.commonForOrigin && options.commonForOrigin[documentOrigin]) {\n this._commonForOrigin = options.commonForOrigin;\n } else {\n this._commonForOrigin = {\n [documentOrigin]: {\n localStorageArea: new Map(),\n sessionStorageArea: new Map(),\n windowsInSameOrigin: [this]\n }\n };\n }\n\n this._currentOriginData = this._commonForOrigin[documentOrigin];\n\n // ### WEB STORAGE\n\n this._localStorage = Storage.create(window, [], {\n associatedWindow: this,\n storageArea: this._currentOriginData.localStorageArea,\n type: \"localStorage\",\n url: this._document.documentURI,\n storageQuota: this._storageQuota\n });\n this._sessionStorage = Storage.create(window, [], {\n associatedWindow: this,\n storageArea: this._currentOriginData.sessionStorageArea,\n type: \"sessionStorage\",\n url: this._document.documentURI,\n storageQuota: this._storageQuota\n });\n\n // ### SELECTION\n\n // https://w3c.github.io/selection-api/#dfn-selection\n this._selection = Selection.createImpl(window);\n\n // https://w3c.github.io/selection-api/#dom-window\n this.getSelection = function () {\n return window._selection;\n };\n\n // ### GETTERS\n\n const locationbar = BarProp.create(window);\n const menubar = BarProp.create(window);\n const personalbar = BarProp.create(window);\n const scrollbars = BarProp.create(window);\n const statusbar = BarProp.create(window);\n const toolbar = BarProp.create(window);\n const external = External.create(window);\n const navigator = Navigator.create(window, [], { userAgent: this._resourceLoader._userAgent });\n const performance = Performance.create(window, [], { rawPerformance });\n const screen = Screen.create(window);\n const customElementRegistry = CustomElementRegistry.create(window);\n\n define(this, {\n get length() {\n return window._length;\n },\n get window() {\n return window._globalProxy;\n },\n get frameElement() {\n return idlUtils.wrapperForImpl(window._frameElement);\n },\n get frames() {\n return window._globalProxy;\n },\n get self() {\n return window._globalProxy;\n },\n get parent() {\n return window._parent;\n },\n get top() {\n return window._top;\n },\n get document() {\n return window._document;\n },\n get external() {\n return external;\n },\n get location() {\n return idlUtils.wrapperForImpl(idlUtils.implForWrapper(window._document)._location);\n },\n get history() {\n return idlUtils.wrapperForImpl(idlUtils.implForWrapper(window._document)._history);\n },\n get navigator() {\n return navigator;\n },\n get locationbar() {\n return locationbar;\n },\n get menubar() {\n return menubar;\n },\n get personalbar() {\n return personalbar;\n },\n get scrollbars() {\n return scrollbars;\n },\n get statusbar() {\n return statusbar;\n },\n get toolbar() {\n return toolbar;\n },\n get performance() {\n return performance;\n },\n get screen() {\n return screen;\n },\n get origin() {\n return window._origin;\n },\n // The origin IDL attribute is defined with [Replaceable].\n set origin(value) {\n Object.defineProperty(this, \"origin\", {\n value,\n writable: true,\n enumerable: true,\n configurable: true\n });\n },\n get localStorage() {\n if (idlUtils.implForWrapper(this._document)._origin === \"null\") {\n throw DOMException.create(window, [\n \"localStorage is not available for opaque origins\",\n \"SecurityError\"\n ]);\n }\n\n return this._localStorage;\n },\n get sessionStorage() {\n if (idlUtils.implForWrapper(this._document)._origin === \"null\") {\n throw DOMException.create(window, [\n \"sessionStorage is not available for opaque origins\",\n \"SecurityError\"\n ]);\n }\n\n return this._sessionStorage;\n },\n get customElements() {\n return customElementRegistry;\n },\n get event() {\n return window._currentEvent ? idlUtils.wrapperForImpl(window._currentEvent) : undefined;\n },\n set event(value) {\n Object.defineProperty(window, \"event\", { configurable: true, enumerable: true, writable: true, value });\n }\n });\n\n namedPropertiesWindow.initializeWindow(this, this._globalProxy);\n\n // ### METHODS\n\n // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers\n\n // In the spec the list of active timers is a set of IDs. We make it a map of IDs to Node.js timer objects, so that\n // we can call Node.js-side clearTimeout() when clearing, and thus allow process shutdown faster.\n const listOfActiveTimers = new Map();\n let latestTimerId = 0;\n\n this.setTimeout = function (handler, timeout = 0, ...args) {\n if (typeof handler !== \"function\") {\n handler = webIDLConversions.DOMString(handler);\n }\n timeout = webIDLConversions.long(timeout);\n\n return timerInitializationSteps(handler, timeout, args, { methodContext: window, repeat: false });\n };\n this.setInterval = function (handler, timeout = 0, ...args) {\n if (typeof handler !== \"function\") {\n handler = webIDLConversions.DOMString(handler);\n }\n timeout = webIDLConversions.long(timeout);\n\n return timerInitializationSteps(handler, timeout, args, { methodContext: window, repeat: true });\n };\n\n this.clearTimeout = function (handle = 0) {\n handle = webIDLConversions.long(handle);\n\n const nodejsTimer = listOfActiveTimers.get(handle);\n if (nodejsTimer) {\n clearTimeout(nodejsTimer);\n listOfActiveTimers.delete(handle);\n }\n };\n this.clearInterval = function (handle = 0) {\n handle = webIDLConversions.long(handle);\n\n const nodejsTimer = listOfActiveTimers.get(handle);\n if (nodejsTimer) {\n // We use setTimeout() in timerInitializationSteps even for this.setInterval().\n clearTimeout(nodejsTimer);\n listOfActiveTimers.delete(handle);\n }\n };\n\n function timerInitializationSteps(handler, timeout, args, { methodContext, repeat, previousHandle }) {\n // This appears to be unspecced, but matches browser behavior for close()ed windows.\n if (!methodContext._document) {\n return 0;\n }\n\n // TODO: implement timer nesting level behavior.\n\n const methodContextProxy = methodContext._globalProxy;\n const handle = previousHandle !== undefined ? previousHandle : ++latestTimerId;\n\n function task() {\n if (!listOfActiveTimers.has(handle)) {\n return;\n }\n\n try {\n if (typeof handler === \"function\") {\n handler.apply(methodContextProxy, args);\n } else if (window._runScripts === \"dangerously\") {\n vm.runInContext(handler, window, { filename: window.location.href, displayErrors: false });\n }\n } catch (e) {\n reportException(window, e, window.location.href);\n }\n\n if (listOfActiveTimers.has(handle)) {\n if (repeat) {\n timerInitializationSteps(handler, timeout, args, { methodContext, repeat: true, previousHandle: handle });\n } else {\n listOfActiveTimers.delete(handle);\n }\n }\n }\n\n if (timeout < 0) {\n timeout = 0;\n }\n\n const nodejsTimer = setTimeout(task, timeout);\n listOfActiveTimers.set(handle, nodejsTimer);\n\n return handle;\n }\n\n // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#microtask-queuing\n\n this.queueMicrotask = function (callback) {\n callback = webIDLConversions.Function(callback);\n\n anyNodeVersionQueueMicrotask(() => {\n try {\n callback();\n } catch (e) {\n reportException(window, e, window.location.href);\n }\n });\n };\n\n // https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames\n\n let animationFrameCallbackId = 0;\n const mapOfAnimationFrameCallbacks = new Map();\n let animationFrameNodejsInterval = null;\n\n // Unlike the spec, where an animation frame happens every 60 Hz regardless, we optimize so that if there are no\n // requestAnimationFrame() calls outstanding, we don't fire the timer. This helps us track that.\n let numberOfOngoingAnimationFrameCallbacks = 0;\n\n if (this._pretendToBeVisual) {\n this.requestAnimationFrame = function (callback) {\n callback = webIDLConversions.Function(callback);\n\n const handle = ++animationFrameCallbackId;\n mapOfAnimationFrameCallbacks.set(handle, callback);\n\n ++numberOfOngoingAnimationFrameCallbacks;\n if (numberOfOngoingAnimationFrameCallbacks === 1) {\n animationFrameNodejsInterval = setInterval(() => {\n runAnimationFrameCallbacks(rawPerformance.now() - windowInitialized);\n }, 1000 / 60);\n }\n\n return handle;\n };\n\n this.cancelAnimationFrame = function (handle) {\n handle = webIDLConversions[\"unsigned long\"](handle);\n\n removeAnimationFrameCallback(handle);\n };\n\n function runAnimationFrameCallbacks(now) {\n // Converting to an array is important to get a sync snapshot and thus match spec semantics.\n const callbackHandles = [...mapOfAnimationFrameCallbacks.keys()];\n for (const handle of callbackHandles) {\n // This has() can be false if a callback calls cancelAnimationFrame().\n if (mapOfAnimationFrameCallbacks.has(handle)) {\n const callback = mapOfAnimationFrameCallbacks.get(handle);\n removeAnimationFrameCallback(handle);\n try {\n callback(now);\n } catch (e) {\n reportException(window, e, window.location.href);\n }\n }\n }\n }\n\n function removeAnimationFrameCallback(handle) {\n if (mapOfAnimationFrameCallbacks.has(handle)) {\n --numberOfOngoingAnimationFrameCallbacks;\n if (numberOfOngoingAnimationFrameCallbacks === 0) {\n clearInterval(animationFrameNodejsInterval);\n }\n }\n\n mapOfAnimationFrameCallbacks.delete(handle);\n }\n }\n\n function stopAllTimers() {\n for (const nodejsTimer of listOfActiveTimers.values()) {\n clearTimeout(nodejsTimer);\n }\n listOfActiveTimers.clear();\n\n clearInterval(animationFrameNodejsInterval);\n }\n\n function Option(text, value, defaultSelected, selected) {\n if (text === undefined) {\n text = \"\";\n }\n text = webIDLConversions.DOMString(text);\n\n if (value !== undefined) {\n value = webIDLConversions.DOMString(value);\n }\n\n defaultSelected = webIDLConversions.boolean(defaultSelected);\n selected = webIDLConversions.boolean(selected);\n\n const option = window._document.createElement(\"option\");\n const impl = idlUtils.implForWrapper(option);\n\n if (text !== \"\") {\n impl.text = text;\n }\n if (value !== undefined) {\n impl.setAttributeNS(null, \"value\", value);\n }\n if (defaultSelected) {\n impl.setAttributeNS(null, \"selected\", \"\");\n }\n impl._selectedness = selected;\n\n return option;\n }\n Object.defineProperty(Option, \"prototype\", {\n value: this.HTMLOptionElement.prototype,\n configurable: false,\n enumerable: false,\n writable: false\n });\n Object.defineProperty(window, \"Option\", {\n value: Option,\n configurable: true,\n enumerable: false,\n writable: true\n });\n\n function Image(...args) {\n const img = window._document.createElement(\"img\");\n const impl = idlUtils.implForWrapper(img);\n\n if (args.length > 0) {\n impl.setAttributeNS(null, \"width\", String(args[0]));\n }\n if (args.length > 1) {\n impl.setAttributeNS(null, \"height\", String(args[1]));\n }\n\n return img;\n }\n Object.defineProperty(Image, \"prototype\", {\n value: this.HTMLImageElement.prototype,\n configurable: false,\n enumerable: false,\n writable: false\n });\n Object.defineProperty(window, \"Image\", {\n value: Image,\n configurable: true,\n enumerable: false,\n writable: true\n });\n\n function Audio(src) {\n const audio = window._document.createElement(\"audio\");\n const impl = idlUtils.implForWrapper(audio);\n impl.setAttributeNS(null, \"preload\", \"auto\");\n\n if (src !== undefined) {\n impl.setAttributeNS(null, \"src\", String(src));\n }\n\n return audio;\n }\n Object.defineProperty(Audio, \"prototype\", {\n value: this.HTMLAudioElement.prototype,\n configurable: false,\n enumerable: false,\n writable: false\n });\n Object.defineProperty(window, \"Audio\", {\n value: Audio,\n configurable: true,\n enumerable: false,\n writable: true\n });\n\n this.postMessage = postMessage(window);\n\n this.atob = function (str) {\n const result = atob(str);\n if (result === null) {\n throw DOMException.create(window, [\n \"The string to be decoded contains invalid characters.\",\n \"InvalidCharacterError\"\n ]);\n }\n return result;\n };\n\n this.btoa = function (str) {\n const result = btoa(str);\n if (result === null) {\n throw DOMException.create(window, [\n \"The string to be encoded contains invalid characters.\",\n \"InvalidCharacterError\"\n ]);\n }\n return result;\n };\n\n this.stop = function () {\n const manager = idlUtils.implForWrapper(this._document)._requestManager;\n if (manager) {\n manager.close();\n }\n };\n\n this.close = function () {\n // Recursively close child frame windows, then ourselves (depth-first).\n for (let i = 0; i < this.length; ++i) {\n this[i].close();\n }\n\n // Clear out all listeners. Any in-flight or upcoming events should not get delivered.\n idlUtils.implForWrapper(this)._eventListeners = Object.create(null);\n\n if (this._document) {\n if (this._document.body) {\n this._document.body.innerHTML = \"\";\n }\n\n if (this._document.close) {\n // It's especially important to clear out the listeners here because document.close() causes a \"load\" event to\n // fire.\n idlUtils.implForWrapper(this._document)._eventListeners = Object.create(null);\n this._document.close();\n }\n const doc = idlUtils.implForWrapper(this._document);\n if (doc._requestManager) {\n doc._requestManager.close();\n }\n delete this._document;\n }\n\n stopAllTimers();\n WebSocketImpl.cleanUpWindow(this);\n };\n\n this.getComputedStyle = function (elt, pseudoElt = undefined) {\n elt = Element.convert(elt);\n if (pseudoElt !== undefined && pseudoElt !== null) {\n pseudoElt = webIDLConversions.DOMString(pseudoElt);\n }\n\n if (pseudoElt !== undefined && pseudoElt !== null && pseudoElt !== \"\") {\n // TODO: Parse pseudoElt\n\n if (SHADOW_DOM_PSEUDO_REGEXP.test(pseudoElt)) {\n throw new TypeError(\"Tried to get the computed style of a Shadow DOM pseudo-element.\");\n }\n\n notImplemented(\"window.computedStyle(elt, pseudoElt)\", this);\n }\n\n const declaration = new CSSStyleDeclaration();\n const { forEach } = Array.prototype;\n const { style } = elt;\n\n forEachMatchingSheetRuleOfElement(elt, rule => {\n forEach.call(rule.style, property => {\n declaration.setProperty(\n property,\n rule.style.getPropertyValue(property),\n rule.style.getPropertyPriority(property)\n );\n });\n });\n\n // https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle\n const declarations = Object.keys(propertiesWithResolvedValueImplemented);\n forEach.call(declarations, property => {\n declaration.setProperty(property, getResolvedValue(elt, property));\n });\n\n forEach.call(style, property => {\n declaration.setProperty(property, style.getPropertyValue(property), style.getPropertyPriority(property));\n });\n\n return declaration;\n };\n\n this.getSelection = function () {\n return window._document.getSelection();\n };\n\n // The captureEvents() and releaseEvents() methods must do nothing\n this.captureEvents = function () {};\n\n this.releaseEvents = function () {};\n\n // ### PUBLIC DATA PROPERTIES (TODO: should be getters)\n\n function wrapConsoleMethod(method) {\n return (...args) => {\n window._virtualConsole.emit(method, ...args);\n };\n }\n\n this.console = {\n assert: wrapConsoleMethod(\"assert\"),\n clear: wrapConsoleMethod(\"clear\"),\n count: wrapConsoleMethod(\"count\"),\n countReset: wrapConsoleMethod(\"countReset\"),\n debug: wrapConsoleMethod(\"debug\"),\n dir: wrapConsoleMethod(\"dir\"),\n dirxml: wrapConsoleMethod(\"dirxml\"),\n error: wrapConsoleMethod(\"error\"),\n group: wrapConsoleMethod(\"group\"),\n groupCollapsed: wrapConsoleMethod(\"groupCollapsed\"),\n groupEnd: wrapConsoleMethod(\"groupEnd\"),\n info: wrapConsoleMethod(\"info\"),\n log: wrapConsoleMethod(\"log\"),\n table: wrapConsoleMethod(\"table\"),\n time: wrapConsoleMethod(\"time\"),\n timeLog: wrapConsoleMethod(\"timeLog\"),\n timeEnd: wrapConsoleMethod(\"timeEnd\"),\n trace: wrapConsoleMethod(\"trace\"),\n warn: wrapConsoleMethod(\"warn\")\n };\n\n function notImplementedMethod(name) {\n return function () {\n notImplemented(name, window);\n };\n }\n\n define(this, {\n name: \"\",\n status: \"\",\n devicePixelRatio: 1,\n innerWidth: 1024,\n innerHeight: 768,\n outerWidth: 1024,\n outerHeight: 768,\n pageXOffset: 0,\n pageYOffset: 0,\n screenX: 0,\n screenLeft: 0,\n screenY: 0,\n screenTop: 0,\n scrollX: 0,\n scrollY: 0,\n\n alert: notImplementedMethod(\"window.alert\"),\n blur: notImplementedMethod(\"window.blur\"),\n confirm: notImplementedMethod(\"window.confirm\"),\n focus: notImplementedMethod(\"window.focus\"),\n moveBy: notImplementedMethod(\"window.moveBy\"),\n moveTo: notImplementedMethod(\"window.moveTo\"),\n open: notImplementedMethod(\"window.open\"),\n print: notImplementedMethod(\"window.print\"),\n prompt: notImplementedMethod(\"window.prompt\"),\n resizeBy: notImplementedMethod(\"window.resizeBy\"),\n resizeTo: notImplementedMethod(\"window.resizeTo\"),\n scroll: notImplementedMethod(\"window.scroll\"),\n scrollBy: notImplementedMethod(\"window.scrollBy\"),\n scrollTo: notImplementedMethod(\"window.scrollTo\")\n });\n\n // ### INITIALIZATION\n\n process.nextTick(() => {\n if (!window.document) {\n return; // window might've been closed already\n }\n\n const documentImpl = idlUtils.implForWrapper(window._document);\n\n if (window.document.readyState === \"complete\") {\n fireAnEvent(\"load\", window, undefined, {}, documentImpl);\n } else {\n window.document.addEventListener(\"load\", () => {\n fireAnEvent(\"load\", window, undefined, {}, documentImpl);\n\n if (!documentImpl._pageShowingFlag) {\n documentImpl._pageShowingFlag = true;\n fireAnEvent(\"pageshow\", window, PageTransitionEvent, { persisted: false }, documentImpl);\n }\n });\n }\n });\n}\n\nfunction contextifyWindow(window) {\n if (vm.isContext(window)) {\n return;\n }\n\n vm.createContext(window);\n}\n","// Ideally, we would use\n// https://html.spec.whatwg.org/multipage/rendering.html#the-css-user-agent-style-sheet-and-presentational-hints\n// but for now, just use the version from blink. This file is copied from\n// https://chromium.googlesource.com/chromium/blink/+/96aa3a280ab7d67178c8f122a04949ce5f8579e0/Source/core/css/html.css\n// (removed a line which had octal literals inside since octal literals are not allowed in template strings)\n\n// We use a .js file because otherwise we can't browserify this. (brfs is unusable due to lack of ES2015 support)\n\nmodule.exports = `\n/*\n * The default style sheet used to render HTML.\n *\n * Copyright (C) 2000 Lars Knoll (knoll@kde.org)\n * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Library General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Library General Public License\n * along with this library; see the file COPYING.LIB. If not, write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA 02110-1301, USA.\n *\n */\n\n@namespace \"http://www.w3.org/1999/xhtml\";\n\nhtml {\n display: block\n}\n\n:root {\n scroll-blocks-on: start-touch wheel-event\n}\n\n/* children of the element all have display:none */\nhead {\n display: none\n}\n\nmeta {\n display: none\n}\n\ntitle {\n display: none\n}\n\nlink {\n display: none\n}\n\nstyle {\n display: none\n}\n\nscript {\n display: none\n}\n\n/* generic block-level elements */\n\nbody {\n display: block;\n margin: 8px\n}\n\np {\n display: block;\n -webkit-margin-before: 1__qem;\n -webkit-margin-after: 1__qem;\n -webkit-margin-start: 0;\n -webkit-margin-end: 0;\n}\n\ndiv {\n display: block\n}\n\nlayer {\n display: block\n}\n\narticle, aside, footer, header, hgroup, main, nav, section {\n display: block\n}\n\nmarquee {\n display: inline-block;\n}\n\naddress {\n display: block\n}\n\nblockquote {\n display: block;\n -webkit-margin-before: 1__qem;\n -webkit-margin-after: 1em;\n -webkit-margin-start: 40px;\n -webkit-margin-end: 40px;\n}\n\nfigcaption {\n display: block\n}\n\nfigure {\n display: block;\n -webkit-margin-before: 1em;\n -webkit-margin-after: 1em;\n -webkit-margin-start: 40px;\n -webkit-margin-end: 40px;\n}\n\nq {\n display: inline\n}\n\n/* nwmatcher does not support ::before and ::after, so we can't render q\ncorrectly: https://html.spec.whatwg.org/multipage/rendering.html#phrasing-content-3\nTODO: add q::before and q::after selectors\n*/\n\ncenter {\n display: block;\n /* special centering to be able to emulate the html4/netscape behaviour */\n text-align: -webkit-center\n}\n\nhr {\n display: block;\n -webkit-margin-before: 0.5em;\n -webkit-margin-after: 0.5em;\n -webkit-margin-start: auto;\n -webkit-margin-end: auto;\n border-style: inset;\n border-width: 1px;\n box-sizing: border-box\n}\n\nmap {\n display: inline\n}\n\nvideo {\n object-fit: contain;\n}\n\n/* heading elements */\n\nh1 {\n display: block;\n font-size: 2em;\n -webkit-margin-before: 0.67__qem;\n -webkit-margin-after: 0.67em;\n -webkit-margin-start: 0;\n -webkit-margin-end: 0;\n font-weight: bold\n}\n\narticle h1,\naside h1,\nnav h1,\nsection h1 {\n font-size: 1.5em;\n -webkit-margin-before: 0.83__qem;\n -webkit-margin-after: 0.83em;\n}\n\narticle article h1,\narticle aside h1,\narticle nav h1,\narticle section h1,\naside article h1,\naside aside h1,\naside nav h1,\naside section h1,\nnav article h1,\nnav aside h1,\nnav nav h1,\nnav section h1,\nsection article h1,\nsection aside h1,\nsection nav h1,\nsection section h1 {\n font-size: 1.17em;\n -webkit-margin-before: 1__qem;\n -webkit-margin-after: 1em;\n}\n\n/* Remaining selectors are deleted because nwmatcher does not support\n:matches() and expanding the selectors manually would be far too verbose.\nAlso see https://html.spec.whatwg.org/multipage/rendering.html#sections-and-headings\nTODO: rewrite to use :matches() when nwmatcher supports it.\n*/\n\nh2 {\n display: block;\n font-size: 1.5em;\n -webkit-margin-before: 0.83__qem;\n -webkit-margin-after: 0.83em;\n -webkit-margin-start: 0;\n -webkit-margin-end: 0;\n font-weight: bold\n}\n\nh3 {\n display: block;\n font-size: 1.17em;\n -webkit-margin-before: 1__qem;\n -webkit-margin-after: 1em;\n -webkit-margin-start: 0;\n -webkit-margin-end: 0;\n font-weight: bold\n}\n\nh4 {\n display: block;\n -webkit-margin-before: 1.33__qem;\n -webkit-margin-after: 1.33em;\n -webkit-margin-start: 0;\n -webkit-margin-end: 0;\n font-weight: bold\n}\n\nh5 {\n display: block;\n font-size: .83em;\n -webkit-margin-before: 1.67__qem;\n -webkit-margin-after: 1.67em;\n -webkit-margin-start: 0;\n -webkit-margin-end: 0;\n font-weight: bold\n}\n\nh6 {\n display: block;\n font-size: .67em;\n -webkit-margin-before: 2.33__qem;\n -webkit-margin-after: 2.33em;\n -webkit-margin-start: 0;\n -webkit-margin-end: 0;\n font-weight: bold\n}\n\n/* tables */\n\ntable {\n display: table;\n border-collapse: separate;\n border-spacing: 2px;\n border-color: gray\n}\n\nthead {\n display: table-header-group;\n vertical-align: middle;\n border-color: inherit\n}\n\ntbody {\n display: table-row-group;\n vertical-align: middle;\n border-color: inherit\n}\n\ntfoot {\n display: table-footer-group;\n vertical-align: middle;\n border-color: inherit\n}\n\n/* for tables without table section elements (can happen with XHTML or dynamically created tables) */\ntable > tr {\n vertical-align: middle;\n}\n\ncol {\n display: table-column\n}\n\ncolgroup {\n display: table-column-group\n}\n\ntr {\n display: table-row;\n vertical-align: inherit;\n border-color: inherit\n}\n\ntd, th {\n display: table-cell;\n vertical-align: inherit\n}\n\nth {\n font-weight: bold\n}\n\ncaption {\n display: table-caption;\n text-align: -webkit-center\n}\n\n/* lists */\n\nul, menu, dir {\n display: block;\n list-style-type: disc;\n -webkit-margin-before: 1__qem;\n -webkit-margin-after: 1em;\n -webkit-margin-start: 0;\n -webkit-margin-end: 0;\n -webkit-padding-start: 40px\n}\n\nol {\n display: block;\n list-style-type: decimal;\n -webkit-margin-before: 1__qem;\n -webkit-margin-after: 1em;\n -webkit-margin-start: 0;\n -webkit-margin-end: 0;\n -webkit-padding-start: 40px\n}\n\nli {\n display: list-item;\n text-align: -webkit-match-parent;\n}\n\nul ul, ol ul {\n list-style-type: circle\n}\n\nol ol ul, ol ul ul, ul ol ul, ul ul ul {\n list-style-type: square\n}\n\ndd {\n display: block;\n -webkit-margin-start: 40px\n}\n\ndl {\n display: block;\n -webkit-margin-before: 1__qem;\n -webkit-margin-after: 1em;\n -webkit-margin-start: 0;\n -webkit-margin-end: 0;\n}\n\ndt {\n display: block\n}\n\nol ul, ul ol, ul ul, ol ol {\n -webkit-margin-before: 0;\n -webkit-margin-after: 0\n}\n\n/* form elements */\n\nform {\n display: block;\n margin-top: 0__qem;\n}\n\nlabel {\n cursor: default;\n}\n\nlegend {\n display: block;\n -webkit-padding-start: 2px;\n -webkit-padding-end: 2px;\n border: none\n}\n\nfieldset {\n display: block;\n -webkit-margin-start: 2px;\n -webkit-margin-end: 2px;\n -webkit-padding-before: 0.35em;\n -webkit-padding-start: 0.75em;\n -webkit-padding-end: 0.75em;\n -webkit-padding-after: 0.625em;\n border: 2px groove ThreeDFace;\n min-width: -webkit-min-content;\n}\n\nbutton {\n -webkit-appearance: button;\n}\n\n/* Form controls don't go vertical. */\ninput, textarea, select, button, meter, progress {\n -webkit-writing-mode: horizontal-tb !important;\n}\n\ninput, textarea, select, button {\n margin: 0__qem;\n font: -webkit-small-control;\n text-rendering: auto; /* FIXME: Remove when tabs work with optimizeLegibility. */\n color: initial;\n letter-spacing: normal;\n word-spacing: normal;\n line-height: normal;\n text-transform: none;\n text-indent: 0;\n text-shadow: none;\n display: inline-block;\n text-align: start;\n}\n\n/* TODO: Add \" i\" to attribute matchers to support case-insensitive matching */\ninput[type=\"hidden\"] {\n display: none\n}\n\ninput {\n -webkit-appearance: textfield;\n padding: 1px;\n background-color: white;\n border: 2px inset;\n -webkit-rtl-ordering: logical;\n -webkit-user-select: text;\n cursor: auto;\n}\n\ninput[type=\"search\"] {\n -webkit-appearance: searchfield;\n box-sizing: border-box;\n}\n\nselect {\n border-radius: 5px;\n}\n\ntextarea {\n -webkit-appearance: textarea;\n background-color: white;\n border: 1px solid;\n -webkit-rtl-ordering: logical;\n -webkit-user-select: text;\n flex-direction: column;\n resize: auto;\n cursor: auto;\n padding: 2px;\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n\ninput[type=\"password\"] {\n -webkit-text-security: disc !important;\n}\n\ninput[type=\"hidden\"], input[type=\"image\"], input[type=\"file\"] {\n -webkit-appearance: initial;\n padding: initial;\n background-color: initial;\n border: initial;\n}\n\ninput[type=\"file\"] {\n align-items: baseline;\n color: inherit;\n text-align: start !important;\n}\n\ninput[type=\"radio\"], input[type=\"checkbox\"] {\n margin: 3px 0.5ex;\n padding: initial;\n background-color: initial;\n border: initial;\n}\n\ninput[type=\"button\"], input[type=\"submit\"], input[type=\"reset\"] {\n -webkit-appearance: push-button;\n -webkit-user-select: none;\n white-space: pre\n}\n\ninput[type=\"button\"], input[type=\"submit\"], input[type=\"reset\"], button {\n align-items: flex-start;\n text-align: center;\n cursor: default;\n color: ButtonText;\n padding: 2px 6px 3px 6px;\n border: 2px outset ButtonFace;\n background-color: ButtonFace;\n box-sizing: border-box\n}\n\ninput[type=\"range\"] {\n -webkit-appearance: slider-horizontal;\n padding: initial;\n border: initial;\n margin: 2px;\n color: #909090;\n}\n\ninput[type=\"button\"]:disabled, input[type=\"submit\"]:disabled, input[type=\"reset\"]:disabled,\nbutton:disabled, select:disabled, optgroup:disabled, option:disabled,\nselect[disabled]>option {\n color: GrayText\n}\n\ninput[type=\"button\"]:active, input[type=\"submit\"]:active, input[type=\"reset\"]:active, button:active {\n border-style: inset\n}\n\ninput[type=\"button\"]:active:disabled, input[type=\"submit\"]:active:disabled, input[type=\"reset\"]:active:disabled, button:active:disabled {\n border-style: outset\n}\n\ndatalist {\n display: none\n}\n\narea {\n display: inline;\n cursor: pointer;\n}\n\nparam {\n display: none\n}\n\ninput[type=\"checkbox\"] {\n -webkit-appearance: checkbox;\n box-sizing: border-box;\n}\n\ninput[type=\"radio\"] {\n -webkit-appearance: radio;\n box-sizing: border-box;\n}\n\ninput[type=\"color\"] {\n -webkit-appearance: square-button;\n width: 44px;\n height: 23px;\n background-color: ButtonFace;\n /* Same as native_theme_base. */\n border: 1px #a9a9a9 solid;\n padding: 1px 2px;\n}\n\ninput[type=\"color\"][list] {\n -webkit-appearance: menulist;\n width: 88px;\n height: 23px\n}\n\nselect {\n -webkit-appearance: menulist;\n box-sizing: border-box;\n align-items: center;\n border: 1px solid;\n white-space: pre;\n -webkit-rtl-ordering: logical;\n color: black;\n background-color: white;\n cursor: default;\n}\n\noptgroup {\n font-weight: bolder;\n display: block;\n}\n\noption {\n font-weight: normal;\n display: block;\n padding: 0 2px 1px 2px;\n white-space: pre;\n min-height: 1.2em;\n}\n\noutput {\n display: inline;\n}\n\n/* meter */\n\nmeter {\n -webkit-appearance: meter;\n box-sizing: border-box;\n display: inline-block;\n height: 1em;\n width: 5em;\n vertical-align: -0.2em;\n}\n\n/* progress */\n\nprogress {\n -webkit-appearance: progress-bar;\n box-sizing: border-box;\n display: inline-block;\n height: 1em;\n width: 10em;\n vertical-align: -0.2em;\n}\n\n/* inline elements */\n\nu, ins {\n text-decoration: underline\n}\n\nstrong, b {\n font-weight: bold\n}\n\ni, cite, em, var, address, dfn {\n font-style: italic\n}\n\ntt, code, kbd, samp {\n font-family: monospace\n}\n\npre, xmp, plaintext, listing {\n display: block;\n font-family: monospace;\n white-space: pre;\n margin: 1__qem 0\n}\n\nmark {\n background-color: yellow;\n color: black\n}\n\nbig {\n font-size: larger\n}\n\nsmall {\n font-size: smaller\n}\n\ns, strike, del {\n text-decoration: line-through\n}\n\nsub {\n vertical-align: sub;\n font-size: smaller\n}\n\nsup {\n vertical-align: super;\n font-size: smaller\n}\n\nnobr {\n white-space: nowrap\n}\n\n/* states */\n\n:focus {\n outline: auto 5px -webkit-focus-ring-color\n}\n\n/* Read-only text fields do not show a focus ring but do still receive focus */\nhtml:focus, body:focus, input[readonly]:focus {\n outline: none\n}\n\nembed:focus, iframe:focus, object:focus {\n outline: none\n}\n\ninput:focus, textarea:focus, select:focus {\n outline-offset: -2px\n}\n\ninput[type=\"button\"]:focus,\ninput[type=\"checkbox\"]:focus,\ninput[type=\"file\"]:focus,\ninput[type=\"hidden\"]:focus,\ninput[type=\"image\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"reset\"]:focus,\ninput[type=\"search\"]:focus,\ninput[type=\"submit\"]:focus {\n outline-offset: 0\n}\n\n/* HTML5 ruby elements */\n\nruby, rt {\n text-indent: 0; /* blocks used for ruby rendering should not trigger this */\n}\n\nrt {\n line-height: normal;\n -webkit-text-emphasis: none;\n}\n\nruby > rt {\n display: block;\n font-size: 50%;\n text-align: start;\n}\n\nruby > rp {\n display: none;\n}\n\n/* other elements */\n\nnoframes {\n display: none\n}\n\nframeset, frame {\n display: block\n}\n\nframeset {\n border-color: inherit\n}\n\niframe {\n border: 2px inset\n}\n\ndetails {\n display: block\n}\n\nsummary {\n display: block\n}\n\ntemplate {\n display: none\n}\n\nbdi, output {\n unicode-bidi: -webkit-isolate;\n}\n\nbdo {\n unicode-bidi: bidi-override;\n}\n\ntextarea[dir=auto] {\n unicode-bidi: -webkit-plaintext;\n}\n\ndialog:not([open]) {\n display: none\n}\n\ndialog {\n position: absolute;\n left: 0;\n right: 0;\n width: -webkit-fit-content;\n height: -webkit-fit-content;\n margin: auto;\n border: solid;\n padding: 1em;\n background: white;\n color: black\n}\n\n[hidden] {\n display: none\n}\n\n/* noscript is handled internally, as it depends on settings. */\n\n`;\n","\"use strict\";\n\nmodule.exports = function (nameForErrorMessage, window) {\n if (!window) {\n // Do nothing for window-less documents.\n return;\n }\n\n const error = new Error(`Not implemented: ${nameForErrorMessage}`);\n error.type = \"not implemented\";\n\n window._virtualConsole.emit(\"jsdomError\", error);\n};\n","\"use strict\";\n\nconst parse5 = require(\"parse5\");\n\nconst { createElement } = require(\"../../living/helpers/create-element\");\nconst { HTML_NS } = require(\"../../living/helpers/namespaces\");\n\nconst DocumentType = require(\"../../living/generated/DocumentType\");\nconst DocumentFragment = require(\"../../living/generated/DocumentFragment\");\nconst Text = require(\"../../living/generated/Text\");\nconst Comment = require(\"../../living/generated/Comment\");\n\nconst attributes = require(\"../../living/attributes\");\nconst nodeTypes = require(\"../../living/node-type\");\n\nconst serializationAdapter = require(\"../../living/domparsing/parse5-adapter-serialization\");\nconst {\n customElementReactionsStack, invokeCEReactions, lookupCEDefinition\n} = require(\"../../living/helpers/custom-elements\");\n\n// Horrible monkey-patch to implement https://github.com/inikulin/parse5/issues/237 and\n// https://github.com/inikulin/parse5/issues/285.\nconst OpenElementStack = require(\"parse5/lib/parser/open-element-stack\");\n\nconst openElementStackOriginalPush = OpenElementStack.prototype.push;\nOpenElementStack.prototype.push = function (...args) {\n openElementStackOriginalPush.apply(this, args);\n this.treeAdapter._currentElement = this.current;\n\n const after = this.items[this.stackTop];\n if (after._pushedOnStackOfOpenElements) {\n after._pushedOnStackOfOpenElements();\n }\n};\n\nconst openElementStackOriginalPop = OpenElementStack.prototype.pop;\nOpenElementStack.prototype.pop = function (...args) {\n const before = this.items[this.stackTop];\n\n openElementStackOriginalPop.apply(this, args);\n this.treeAdapter._currentElement = this.current;\n\n if (before._poppedOffStackOfOpenElements) {\n before._poppedOffStackOfOpenElements();\n }\n};\n\nclass JSDOMParse5Adapter {\n constructor(documentImpl, options = {}) {\n this._documentImpl = documentImpl;\n this._globalObject = documentImpl._globalObject;\n this._fragment = options.fragment || false;\n\n // Since the createElement hook doesn't provide the parent element, we keep track of this using _currentElement:\n // https://github.com/inikulin/parse5/issues/285. See above horrible monkey-patch for how this is maintained.\n this._currentElement = undefined;\n }\n\n _ownerDocument() {\n const { _currentElement } = this;\n\n // The _currentElement is undefined when parsing elements at the root of the document.\n if (_currentElement) {\n return _currentElement.localName === \"template\" && _currentElement.namespaceURI === HTML_NS ?\n _currentElement.content._ownerDocument :\n _currentElement._ownerDocument;\n }\n\n return this._documentImpl;\n }\n\n createDocument() {\n // parse5's model assumes that parse(html) will call into here to create the new Document, then return it. However,\n // jsdom's model assumes we can create a Window (and through that create an empty Document), do some other setup\n // stuff, and then parse, stuffing nodes into that Document as we go. So to adapt between these two models, we just\n // return the already-created Document when asked by parse5 to \"create\" a Document.\n return this._documentImpl;\n }\n\n createDocumentFragment() {\n const ownerDocument = this._ownerDocument();\n return DocumentFragment.createImpl(this._globalObject, [], { ownerDocument });\n }\n\n // https://html.spec.whatwg.org/#create-an-element-for-the-token\n createElement(localName, namespace, attrs) {\n const ownerDocument = this._ownerDocument();\n\n const isAttribute = attrs.find(attr => attr.name === \"is\");\n const isValue = isAttribute ? isAttribute.value : null;\n\n const definition = lookupCEDefinition(ownerDocument, namespace, localName);\n\n let willExecuteScript = false;\n if (definition !== null && !this._fragment) {\n willExecuteScript = true;\n }\n\n if (willExecuteScript) {\n ownerDocument._throwOnDynamicMarkupInsertionCounter++;\n customElementReactionsStack.push([]);\n }\n\n const element = createElement(ownerDocument, localName, namespace, null, isValue, willExecuteScript);\n this.adoptAttributes(element, attrs);\n\n if (willExecuteScript) {\n const queue = customElementReactionsStack.pop();\n invokeCEReactions(queue);\n ownerDocument._throwOnDynamicMarkupInsertionCounter--;\n }\n\n if (\"_parserInserted\" in element) {\n element._parserInserted = true;\n }\n\n return element;\n }\n\n createCommentNode(data) {\n const ownerDocument = this._ownerDocument();\n return Comment.createImpl(this._globalObject, [], { data, ownerDocument });\n }\n\n appendChild(parentNode, newNode) {\n parentNode._append(newNode);\n }\n\n insertBefore(parentNode, newNode, referenceNode) {\n parentNode._insert(newNode, referenceNode);\n }\n\n setTemplateContent(templateElement, contentFragment) {\n // This code makes the glue between jsdom and parse5 HTMLTemplateElement parsing:\n //\n // * jsdom during the construction of the HTMLTemplateElement (for example when create via\n // `document.createElement(\"template\")`), creates a DocumentFragment and set it into _templateContents.\n // * parse5 when parsing a